diff options
Diffstat (limited to 'install/ui/widget.js')
-rw-r--r-- | install/ui/widget.js | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/install/ui/widget.js b/install/ui/widget.js index e7a837f99..d3dbd4c37 100644 --- a/install/ui/widget.js +++ b/install/ui/widget.js @@ -193,6 +193,11 @@ IPA.input_widget = function(spec) { } }; + that.on_value_changed = function() { + var value = that.save(); + that.value_changed.notify([value], that); + }; + that.focus_input = function() {}; that.set_deleted = function() {}; @@ -249,10 +254,14 @@ IPA.text_widget = function(spec) { size: that.size, title: that.tooltip, keyup: function() { - that.value_changed.notify([], that); + that.on_value_changed(); } }).appendTo(container); + that.input.bind('input', function() { + that.on_value_changed(); + }); + if (that.undo) { that.create_undo(container); } @@ -970,10 +979,14 @@ IPA.textarea_widget = function (spec) { disabled: that.disabled, title: that.tooltip, keyup: function() { - that.value_changed.notify([], that); + that.on_value_changed(); } }).appendTo(container); + that.input.bind('input', function() { + that.on_value_changed(); + }); + if (that.undo) { that.create_undo(container); } @@ -2128,6 +2141,10 @@ IPA.combobox_widget = function(spec) { } }).appendTo(that.input_container); + that.input.bind('input', function() { + that.input_field_changed.notify([], that); + }); + that.open_button = IPA.action_button({ name: 'open', icon: 'combobox-icon', |