mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
N°637 Portal: Better feedback on exceptions and user session timeout on AJAX calls
SVN:trunk[4671]
This commit is contained in:
@@ -451,6 +451,13 @@ EOF
|
||||
sFormPath: '{$this->oField->GetFormPath()}',
|
||||
sFieldId: '{$this->oField->GetId()}',
|
||||
aObjectIdsToIgnore : aObjectIdsToIgnore
|
||||
},
|
||||
function(sResponseText, sStatus, oXHR){
|
||||
// Hiding modal in case of error as the general AJAX error handler will display a message
|
||||
if(sStatus === 'error')
|
||||
{
|
||||
oModalElem.modal('hide');
|
||||
}
|
||||
}
|
||||
);
|
||||
oModalElem.modal('show');
|
||||
|
||||
@@ -75,7 +75,6 @@ class BsSelectObjectFieldRenderer extends FieldRenderer
|
||||
$oCountSet = new DBObjectSet($oSearch);
|
||||
$iSetCount = $oCountSet->Count();
|
||||
// Note : Autocomplete/Search is disabled for template fields as they are not external keys, thus they will just be displayed as regular select.
|
||||
//$bRegularSelect = ($iSetCount <= $this->oField->GetMaximumComboLength());
|
||||
$bRegularSelect = ( ($iSetCount <= $this->oField->GetMaximumComboLength()) || ($this->oField->GetSearchEndpoint() === null) || ($this->oField->GetSearchEndpoint() === '') );
|
||||
unset($oCountSet);
|
||||
|
||||
@@ -386,7 +385,14 @@ EOF
|
||||
{
|
||||
sFormPath: '{$this->oField->GetFormPath()}',
|
||||
sFieldId: '{$this->oField->GetId()}'
|
||||
}
|
||||
},
|
||||
function(sResponseText, sStatus, oXHR){
|
||||
// Hiding modal in case of error as the general AJAX error handler will display a message
|
||||
if(sStatus === 'error')
|
||||
{
|
||||
oModalElem.modal('hide');
|
||||
}
|
||||
}
|
||||
);
|
||||
oModalElem.modal('show');
|
||||
});
|
||||
@@ -433,7 +439,14 @@ EOF
|
||||
formmanager_class: $(this).closest('.portal_form_handler').portal_form_handler('getOptions').formmanager_class,
|
||||
formmanager_data: JSON.stringify($(this).closest('.portal_form_handler').portal_form_handler('getOptions').formmanager_data),
|
||||
current_values: $(this).closest('.portal_form_handler').portal_form_handler('getCurrentValues')
|
||||
}
|
||||
},
|
||||
function(sResponseText, sStatus, oXHR){
|
||||
// Hiding modal in case of error as the general AJAX error handler will display a message
|
||||
if(sStatus === 'error')
|
||||
{
|
||||
oModalElem.modal('hide');
|
||||
}
|
||||
}
|
||||
);
|
||||
oModalElem.modal('show');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user