diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2012-10-25 13:37:54 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2013-01-07 10:53:58 +0100 |
commit | 3df18f5583ff96d505fe9249949bd4493df68172 (patch) | |
tree | dcee2959847c176152007275cefe73cec766b819 | |
parent | 731fce88a103610578a005d143eda55a12d3cd1f (diff) | |
download | freeipa-3df18f5583ff96d505fe9249949bd4493df68172.tar.gz freeipa-3df18f5583ff96d505fe9249949bd4493df68172.tar.xz freeipa-3df18f5583ff96d505fe9249949bd4493df68172.zip |
Confirm association dialogs by enter
Support for confirm mixin in association dialog.
https://fedorahosted.org/freeipa/ticket/3200
-rw-r--r-- | install/ui/dialog.js | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/install/ui/dialog.js b/install/ui/dialog.js index d0d51533e..4e603155a 100644 --- a/install/ui/dialog.js +++ b/install/ui/dialog.js @@ -350,6 +350,8 @@ IPA.adder_dialog = function(spec) { var that = IPA.dialog(spec); + IPA.confirm_mixin().apply(that); + that.external = spec.external; that.width = spec.width || 600; that.height = spec.height || 360; @@ -428,7 +430,13 @@ IPA.adder_dialog = function(spec) { $('<input/>', { type: 'text', - name: 'filter' + name: 'filter', + keyup: function(event) { + if (event.keyCode === $.ui.keyCode.ENTER) { + that.search(); + return false; + } + } }).appendTo(top_panel); top_panel.append(' '); @@ -606,6 +614,14 @@ IPA.adder_dialog = function(spec) { that.execute = function() { }; + that.on_confirm = function() { + + var add_button = that.get_button('add'); + if (add_button.is_enabled()) { + that.execute(); + } + }; + init(); that.adder_dialog_create = that.create; |