summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/host.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-03-19 17:06:19 +0100
committerPetr Vobornik <pvoborni@redhat.com>2014-04-03 12:40:37 +0200
commitdf18a3bc040299dae2dc573667ec7ee2db45a8e5 (patch)
tree3c17bb0df6c2f7ad1d89bd323ee601e2535f978c /install/ui/src/freeipa/host.js
parentaadde0f849bc7f129ef5bfdd96391ebeee273829 (diff)
downloadfreeipa-df18a3bc040299dae2dc573667ec7ee2db45a8e5.tar.gz
freeipa-df18a3bc040299dae2dc573667ec7ee2db45a8e5.tar.xz
freeipa-df18a3bc040299dae2dc573667ec7ee2db45a8e5.zip
webui: change widget updated event into value change event
This change allow us to use proper two way binding between a field and a widget. In previous implementation field was not changed if something changed the value of a widget in 'update'. Now listeners are notified when the widget value is changed by: calling 'update', 'set_value' or by user change. Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
Diffstat (limited to 'install/ui/src/freeipa/host.js')
-rw-r--r--install/ui/src/freeipa/host.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/install/ui/src/freeipa/host.js b/install/ui/src/freeipa/host.js
index ab37b8771..aa08409c3 100644
--- a/install/ui/src/freeipa/host.js
+++ b/install/ui/src/freeipa/host.js
@@ -610,8 +610,7 @@ IPA.host_keytab_widget = function(spec) {
that.update = function(values) {
set_status(values[0] ? 'present' : 'missing');
- that.updated.notify([], that);
- that.emit('update', { source: that });
+ that.on_value_changed();
};
that.clear = function() {
@@ -771,8 +770,7 @@ IPA.host_password_widget = function(spec) {
that.update = function(values) {
set_status(values[0] ? 'present' : 'missing');
- that.updated.notify([], that);
- that.emit('update', { source: that });
+ that.on_value_changed();
};
that.clear = function() {