mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
N°8076 - Fix cancel and close buttons in a modal blocking all buttons for the underlying object
This commit is contained in:
@@ -3079,7 +3079,7 @@ JS
|
|||||||
} else {
|
} else {
|
||||||
$sCancelButtonOnClickScript .= "function() { BackToDetails('$sClass', $iKey, '$sDefaultUrl', $sJSToken)};";
|
$sCancelButtonOnClickScript .= "function() { BackToDetails('$sClass', $iKey, '$sDefaultUrl', $sJSToken)};";
|
||||||
}
|
}
|
||||||
$sCancelButtonOnClickScript .= "$('#form_{$this->m_iFormId} button.cancel').on('click', fOnClick{$this->m_iFormId}CancelButton);";
|
$sCancelButtonOnClickScript .= "$('#form_{$this->m_iFormId} button.cancel').on('click.navigation.itop', fOnClick{$this->m_iFormId}CancelButton);";
|
||||||
$oPage->add_ready_script($sCancelButtonOnClickScript);
|
$oPage->add_ready_script($sCancelButtonOnClickScript);
|
||||||
|
|
||||||
$iFieldsCount = count($aFieldsMap);
|
$iFieldsCount = count($aFieldsMap);
|
||||||
|
|||||||
@@ -717,8 +717,11 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper
|
|||||||
window[sPromiseId].then(function () {
|
window[sPromiseId].then(function () {
|
||||||
$('#ac_create_'+me.id).dialog('open');
|
$('#ac_create_'+me.id).dialog('open');
|
||||||
$('#ac_create_'+me.id).dialog("option", "close", me.OnCloseCreateObject);
|
$('#ac_create_'+me.id).dialog("option", "close", me.OnCloseCreateObject);
|
||||||
// Modify the action of the cancel button
|
// Modify the action of the cancel button and the close button
|
||||||
$('#ac_create_'+me.id+' button.cancel').off('click').on('click', me.CloseCreateObject);
|
$('#ac_create_'+me.id+' button.cancel').off('click.navigation.itop').on('click.navigation.itop', me.CloseCreateObject);
|
||||||
|
$('.ui-dialog-titlebar:has(+ #ac_create_'+me.id+') button.ui-dialog-titlebar-close').off('click').on('click', function() {
|
||||||
|
$('#ac_create_'+me.id+' button.cancel').trigger('click');
|
||||||
|
});
|
||||||
me.ajax_request = null;
|
me.ajax_request = null;
|
||||||
me.sTargetClass = sLocalTargetClass;
|
me.sTargetClass = sLocalTargetClass;
|
||||||
// Adjust the dialog's size to fit into the screen
|
// Adjust the dialog's size to fit into the screen
|
||||||
|
|||||||
Reference in New Issue
Block a user