From df18a3bc040299dae2dc573667ec7ee2db45a8e5 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Wed, 19 Mar 2014 17:06:19 +0100 Subject: 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 --- install/ui/src/freeipa/service.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'install/ui/src/freeipa/service.js') diff --git a/install/ui/src/freeipa/service.js b/install/ui/src/freeipa/service.js index bd1d3842b..b2f4c283f 100644 --- a/install/ui/src/freeipa/service.js +++ b/install/ui/src/freeipa/service.js @@ -333,8 +333,7 @@ IPA.service_provisioning_status_widget = function (spec) { that.update = function(values) { that.status = values && values.length ? values[0] : false; set_status(that.status ? 'valid' : 'missing'); - that.updated.notify([], that); - that.emit('update', { source: that }); + that.on_value_changed(); }; that.clear = function() { -- cgit