mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-25 16:31:08 -06:00
Fix handling of action visibility change in action panel
Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
This commit is contained in:
parent
05a9c6de2b
commit
0700b13807
@ -3236,6 +3236,7 @@ exp.action_list_widget = IPA.action_list_widget = function(spec) {
|
||||
|
||||
for (i=0; i< actions.length; i++) {
|
||||
action = actions[i];
|
||||
if (!action.visible) continue;
|
||||
options.push({
|
||||
label: action.label,
|
||||
value: action.name
|
||||
@ -3315,6 +3316,23 @@ exp.action_list_widget = IPA.action_list_widget = function(spec) {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle action's `visible_changed` event.
|
||||
* @protected
|
||||
* @param {boolean} visible
|
||||
*/
|
||||
that.action_visible_changed = function(visible) {
|
||||
var action = this;
|
||||
var selected_action = that.get_selected();
|
||||
|
||||
that.init_options();
|
||||
that.recreate_options();
|
||||
|
||||
if (!action.visible && action === selected_action) {
|
||||
that.select_first_enabled();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Get selected action
|
||||
* @return {facet.action}
|
||||
|
Loading…
Reference in New Issue
Block a user