summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2013-10-04 19:00:21 +0200
committerAlexander Bokovoy <abokovoy@redhat.com>2014-02-11 15:02:51 +0200
commit1b156ff13bbab777a42c7d53991ba6a1ff8c1644 (patch)
tree9864c4c0b4d747cddc623423fc934379f02079f7 /install/ui/src/freeipa
parent3e1e164891e6b8c7f2b51173666d948ff7e6e4f2 (diff)
downloadfreeipa-1b156ff13bbab777a42c7d53991ba6a1ff8c1644.tar.gz
freeipa-1b156ff13bbab777a42c7d53991ba6a1ff8c1644.tar.xz
freeipa-1b156ff13bbab777a42c7d53991ba6a1ff8c1644.zip
Fix handling of action visibility change in action panel
Diffstat (limited to 'install/ui/src/freeipa')
-rw-r--r--install/ui/src/freeipa/facet.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/install/ui/src/freeipa/facet.js b/install/ui/src/freeipa/facet.js
index 5127489d2..6afc79d61 100644
--- a/install/ui/src/freeipa/facet.js
+++ b/install/ui/src/freeipa/facet.js
@@ -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
@@ -3316,6 +3317,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}
*/