diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2012-10-25 14:10:47 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2013-01-07 10:53:59 +0100 |
commit | 14b353b097705678b6a07171e64efb22218c80c3 (patch) | |
tree | ee703373c00d6a16998454efc326b35a8c5fc3ae | |
parent | e433379c469ab8dba80cb76f906d794e4f61b132 (diff) | |
download | freeipa-14b353b097705678b6a07171e64efb22218c80c3.tar.gz freeipa-14b353b097705678b6a07171e64efb22218c80c3.tar.xz freeipa-14b353b097705678b6a07171e64efb22218c80c3.zip |
Focus first input element after 'Add and Add another'
When using 'Add and Add Another' button in entity adder dialog the dialog lose focus when an item is successfully added.
It caused by search dialog filter input. It gets focus in search facet's refresh. The refresh is happening when item is added.
This patch is disabling this focus and additionally is focusing first input element to allow imidiate definion of another item
-rw-r--r-- | install/ui/add.js | 1 | ||||
-rw-r--r-- | install/ui/search.js | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/install/ui/add.js b/install/ui/add.js index 2fd50ee63..6d3f454be 100644 --- a/install/ui/add.js +++ b/install/ui/add.js @@ -63,6 +63,7 @@ IPA.entity_adder_dialog = function(spec) { var facet = IPA.current_entity.get_facet(); facet.refresh(); that.reset(); + that.focus_first_element(); }, that.on_error); } diff --git a/install/ui/search.js b/install/ui/search.js index 28723d3e6..b54c375f7 100644 --- a/install/ui/search.js +++ b/install/ui/search.js @@ -215,7 +215,7 @@ IPA.search_facet = function(spec, no_init) { var command = that.create_refresh_command(); command.on_success = function(data, text_status, xhr) { - that.filter.focus(); + if (!IPA.opened_dialogs.dialogs.length) that.filter.focus(); that.load(data); that.show_content(); }; |