diff options
author | Pavel Vomacka <pvomacka@redhat.com> | 2016-06-09 16:14:51 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2016-06-14 18:27:31 +0200 |
commit | 31faf1c21d5635edfa9da23005a1942452a0248c (patch) | |
tree | 4d118de1868217d46cfdfb1af466c66007d0a5c4 /install/ui | |
parent | 1eb57600185f96e61d0894148a5f50870173c7cd (diff) | |
download | freeipa-31faf1c21d5635edfa9da23005a1942452a0248c.tar.gz freeipa-31faf1c21d5635edfa9da23005a1942452a0248c.tar.xz freeipa-31faf1c21d5635edfa9da23005a1942452a0248c.zip |
Search facet can be without search field
Add attribute 'disable_search_field' which hides search field on search or
nested_search facet.
Part of: https://fedorahosted.org/freeipa/ticket/5906
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
Diffstat (limited to 'install/ui')
-rw-r--r-- | install/ui/src/freeipa/search.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/install/ui/src/freeipa/search.js b/install/ui/src/freeipa/search.js index 941597561..25f21e70d 100644 --- a/install/ui/src/freeipa/search.js +++ b/install/ui/src/freeipa/search.js @@ -114,10 +114,14 @@ IPA.search_facet = function(spec, no_init) { that.deleter_dialog = spec.deleter_dialog; + that.disable_search_field = !!spec.disable_search_field; + that.create_header = function(container) { that.facet_create_header(container); - that.create_search_filter(that.controls_left); + if (!that.disable_search_field) { + that.create_search_filter(that.controls_left); + } that.create_control_buttons(that.controls_right); that.create_action_dropdown(that.controls_right); }; @@ -282,7 +286,10 @@ IPA.search_facet = function(spec, no_init) { var command = that.create_refresh_command(); command.on_success = function(data, text_status, xhr) { - if (!IPA.opened_dialogs.dialogs.length) that.filter.focus(); + if (!IPA.opened_dialogs.dialogs.length && + !that.disable_search_field) { + that.filter.focus(); + } that.load(data); that.show_content(); }; |