mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-18 11:21:23 +01:00
Enhance auto-popup to only show visible buttons
This commit is contained in:
parent
08ecadcc99
commit
1aee6f3bed
@ -374,7 +374,8 @@ function nm_open_popup(_action, _ids)
|
|||||||
var dialog_parent = dialog.parent();
|
var dialog_parent = dialog.parent();
|
||||||
var d_buttons = [];
|
var d_buttons = [];
|
||||||
var action = _action;
|
var action = _action;
|
||||||
jQuery('button',popup).each(function(index) {
|
popup.show();
|
||||||
|
var buttons = jQuery('button:visible',popup).each(function(index) {
|
||||||
var but = jQuery(this);
|
var but = jQuery(this);
|
||||||
but.hide();
|
but.hide();
|
||||||
if(but.attr("id"))
|
if(but.attr("id"))
|
||||||
@ -395,6 +396,7 @@ function nm_open_popup(_action, _ids)
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
popup.hide();
|
||||||
dialog.dialog({
|
dialog.dialog({
|
||||||
title: jQuery('.promptheader',popup).text(),
|
title: jQuery('.promptheader',popup).text(),
|
||||||
modal: true,
|
modal: true,
|
||||||
@ -406,6 +408,7 @@ function nm_open_popup(_action, _ids)
|
|||||||
|
|
||||||
// Put it back where it came from, or et2 will error when clear() is called
|
// Put it back where it came from, or et2 will error when clear() is called
|
||||||
dialog.appendTo(dialog_parent);
|
dialog.appendTo(dialog_parent);
|
||||||
|
buttons.show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user