diff options
Diffstat (limited to 'install/ui/dialog.js')
-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 d0d51533..4e603155 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; |