diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2012-04-25 14:28:17 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2012-05-11 18:30:48 +0200 |
commit | eeac88238ab6bca8098b1792532d8f40373b5ea5 (patch) | |
tree | 76d5e6009b822c49b8b7de913a4c2c41c493f238 /install/ui/search.js | |
parent | 29059cd45d84b61c3b5799124ec93cee4b8ac63b (diff) | |
download | freeipa-eeac88238ab6bca8098b1792532d8f40373b5ea5.tar.gz freeipa-eeac88238ab6bca8098b1792532d8f40373b5ea5.tar.xz freeipa-eeac88238ab6bca8098b1792532d8f40373b5ea5.zip |
Hide search facet add/delete buttons in self-service
Adds hiding/showing capabilities to action_button_widget. This patch is fixing regression caused replacing old details facet buttons with control_buttons_widget. The problem was that some buttons were not hidden in self-service mode.
https://fedorahosted.org/freeipa/ticket/2707
Diffstat (limited to 'install/ui/search.js')
-rw-r--r-- | install/ui/search.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/install/ui/search.js b/install/ui/search.js index 142e590db..50a5fa0ec 100644 --- a/install/ui/search.js +++ b/install/ui/search.js @@ -58,9 +58,10 @@ IPA.search_facet = function(spec, no_init) { name: 'remove', label: IPA.messages.buttons.remove, icon: 'remove-icon', + needs_confirm: true, + hide_cond: ['self-service'], action: { enable_cond: ['item-selected'], - disable_cond: ['self-service'], handler: function(facet) { facet.show_remove_dialog(); } @@ -70,8 +71,8 @@ IPA.search_facet = function(spec, no_init) { name: 'add', label: IPA.messages.buttons.add, icon: 'add-icon', + hide_cond: ['self-service'], action: { - disable_cond: ['self-service'], handler: function(facet) { facet.show_add_dialog(); } @@ -81,6 +82,9 @@ IPA.search_facet = function(spec, no_init) { cb.state_listeners.push( { factory: IPA.selected_state_listener + }, + { + factory: IPA.self_service_state_listener } ); |