forked from extern/egroupware
Etemplate - make sure nextmatch action popups get properly closed
This commit is contained in:
parent
ac2dd9193a
commit
335b3d2f9e
@ -420,6 +420,10 @@ function nm_open_popup(_action, _selected)
|
|||||||
var d_buttons = [];
|
var d_buttons = [];
|
||||||
var action = _action;
|
var action = _action;
|
||||||
popup.show();
|
popup.show();
|
||||||
|
var close_function = function()
|
||||||
|
{
|
||||||
|
dialog_parent.append(dialog);
|
||||||
|
};
|
||||||
jQuery('button:visible',popup).each(function(index) {
|
jQuery('button:visible',popup).each(function(index) {
|
||||||
var but = jQuery(this);
|
var but = jQuery(this);
|
||||||
if(but.attr("id"))
|
if(but.attr("id"))
|
||||||
@ -435,9 +439,11 @@ function nm_open_popup(_action, _selected)
|
|||||||
jQuery(this).dialog("close");
|
jQuery(this).dialog("close");
|
||||||
nm_popup_action = action;
|
nm_popup_action = action;
|
||||||
button.onclick.apply(button, e.currentTarget);
|
button.onclick.apply(button, e.currentTarget);
|
||||||
|
close_function();
|
||||||
} : function(e) {
|
} : function(e) {
|
||||||
jQuery(this).dialog("close");
|
jQuery(this).dialog("close");
|
||||||
nm_popup_action = null;
|
nm_popup_action = null;
|
||||||
|
close_function();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if(button && button.options && button.options.image)
|
if(button && button.options && button.options.image)
|
||||||
@ -448,9 +454,8 @@ function nm_open_popup(_action, _selected)
|
|||||||
});
|
});
|
||||||
|
|
||||||
popup.hide();
|
popup.hide();
|
||||||
var _dialog = et2_dialog.show_dialog(function() {
|
var _dialog = et2_dialog.show_dialog(
|
||||||
dialog_parent.append(dialog);
|
close_function,
|
||||||
},
|
|
||||||
'',
|
'',
|
||||||
jQuery('.promptheader',popup).text(),
|
jQuery('.promptheader',popup).text(),
|
||||||
{},
|
{},
|
||||||
|
Loading…
Reference in New Issue
Block a user