From 3b77268cf298124b0906c98fdd1d31fd1e6700b3 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Wed, 31 Aug 2011 17:27:32 -0500 Subject: Fixed missing permission filter field. Due to a recent change, all dialog boxes are now reset initially. The IPA.target_section has been modified to show the default target (i.e. filter) and the fields properly when reset. Ticket #1748 --- install/ui/aci.js | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/install/ui/aci.js b/install/ui/aci.js index 112bff233..a0399f501 100644 --- a/install/ui/aci.js +++ b/install/ui/aci.js @@ -601,17 +601,17 @@ IPA.target_section = function(spec) { var target_type = target_types[0]; - function show_target_type(type_to_show){ - for (var i =0 ; i < target_types.length; i +=1){ - if ( target_types[i].name === type_to_show){ + function show_target_type(type_to_show) { + for (var i=0; i', { @@ -646,15 +646,9 @@ IPA.target_section = function(spec) { target_type.create(dl); target_type.container = dl; } - /* - default for the add dialog - */ - target_type = target_types[0]; - that.target_type_select.val( target_type.name); - target_type.container.css('display', 'block'); }; - function reset_target_widgets(){ + function reset_target_widgets() { that.filter_text.record = null; that.subtree_textarea.record = null; that.group_select.record = null; @@ -685,25 +679,26 @@ IPA.target_section = function(spec) { return; } - target_type.container.css('display', 'block'); - that.target_type_select.val( target_type_name); + that.target_type_select.val(target_type_name); + show_target_type(target_type_name); target_type.load(record); } + that.load = function(record){ that.section_load(record); that.reset(); }; + that.reset = function() { that.section_reset(); - for (var i = 0 ; i < target_types.length ; i +=1 ){ - target_types[i].container.css('display', 'none'); - } - if (that.record){ + if (that.record) { set_target_type(that.record); that.attribute_table.object_type = that.record.type; - }else{ + + } else { reset_target_widgets(); + show_target_type(target_types[0].name); } }; -- cgit