From d6d24be28953f2ec3cf1f2400619fd61459cf45f Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Fri, 11 Nov 2011 22:33:05 -0600 Subject: Refactored permission target section. The permission target section has been modified to use widgets to create the target selection and handle multiple fields. Ticket #2098 --- install/ui/widget.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'install/ui/widget.js') diff --git a/install/ui/widget.js b/install/ui/widget.js index 2a3b952b..e9fffaf1 100644 --- a/install/ui/widget.js +++ b/install/ui/widget.js @@ -66,6 +66,7 @@ IPA.widget = function(spec) { that.valid = true; that.dirty_changed = IPA.observer(); + that.value_changed = IPA.observer(); var init = function() { if (!that.metadata && that.entity) { @@ -820,7 +821,6 @@ IPA.checkbox_widget = function (spec) { // default value that.checked = spec.checked || false; - that.value_changed = IPA.observer(); that.create = function(container) { @@ -1109,6 +1109,7 @@ IPA.select_widget = function(spec) { that.select = $('select[name="'+that.name+'"]', that.container); that.select.change(function() { that.set_dirty(that.test_dirty()); + that.value_changed.notify(that.save(), that); }); that.create_error_link(container); @@ -1141,7 +1142,7 @@ IPA.select_widget = function(spec) { }; that.clear = function() { - that.empty(); + $('option', that.select).attr('selected', ''); }; // methods that should be invoked by subclasses -- cgit