forked from extern/egroupware
fix sometimes not deleted infologs ("0 selected"), because global var got deleted, using now a closure as for the action
This commit is contained in:
parent
4f2ad476a6
commit
e3434b144d
@ -464,6 +464,7 @@ function nm_open_popup(_action, _selected)
|
||||
var dialog_parent = dialog.parent();
|
||||
var d_buttons = [];
|
||||
var action = _action;
|
||||
let selected = _selected;
|
||||
popup.show();
|
||||
var close_function = function()
|
||||
{
|
||||
@ -483,6 +484,7 @@ function nm_open_popup(_action, _selected)
|
||||
click: button && button.onclick ? function(e) {
|
||||
jQuery(this).dialog("close");
|
||||
nm_popup_action = action;
|
||||
nm_popup_ids = selected;
|
||||
button.onclick.apply(button, e.currentTarget);
|
||||
close_function();
|
||||
} : function(e) {
|
||||
@ -513,7 +515,7 @@ function nm_open_popup(_action, _selected)
|
||||
|
||||
// Reset global variables
|
||||
nm_popup_action = null;
|
||||
nm_popup_senders = null;
|
||||
nm_popup_ids = null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -567,7 +569,7 @@ function nm_hide_popup(element, div_id)
|
||||
popup.style.display = 'none';
|
||||
}
|
||||
nm_popup_action = null;
|
||||
nm_popup_senders = null;
|
||||
nm_popup_ids = null;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user