From 6f6d50f37f21db2a5591fa44c962eea04b82f596 Mon Sep 17 00:00:00 2001 From: Adam Young Date: Mon, 7 Feb 2011 23:02:43 -0500 Subject: target section without radio buttons ACI target section refactored into an array of widget-like objects. The radio buttons have been replaced by a select box. THe select is not visible on the details page. --- install/ui/widget.js | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'install/ui/widget.js') diff --git a/install/ui/widget.js b/install/ui/widget.js index eb2f70cfc..1bff1579d 100644 --- a/install/ui/widget.js +++ b/install/ui/widget.js @@ -59,6 +59,7 @@ IPA.widget = function(spec) { that.validate_input = spec.validate_input || validate_input; that.valid = true; that.param_info = spec.param_info; + that.values = []; that.__defineGetter__("entity_name", function(){ return that._entity_name; @@ -220,26 +221,25 @@ IPA.widget = function(spec) { }; that.create_undo = function(container) { - $('', { - name: 'undo', - style: 'display: none;', - 'class': 'ui-state-highlight ui-corner-all undo', - html: 'undo' - }).appendTo(container); + that.undo_span = + $('', { + name: 'undo', + style: 'display: none;', + 'class': 'ui-state-highlight ui-corner-all undo', + html: 'undo' + }).appendTo(container); }; that.get_undo = function() { - return $('span[name="undo"]', that.container); + return $(that.undo_span); }; that.show_undo = function() { - var undo = that.get_undo(); - undo.css('display', 'inline'); + $(that.undo_span).css('display', 'inline'); }; that.hide_undo = function() { - var undo = that.get_undo(); - undo.css('display', 'none'); + $(that.undo_span).css('display', 'none'); }; that.get_error_link = function() { @@ -876,9 +876,7 @@ IPA.select_widget = function(spec) { that.create_undo(container); } }; - that.setup = function(container) { - that.widget_setup(container); that.select = $('select[name="'+that.name+'"]', that.container); -- cgit