summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-08-31 17:27:32 -0500
committerEndi S. Dewata <edewata@redhat.com>2011-09-01 14:13:00 +0000
commit3b77268cf298124b0906c98fdd1d31fd1e6700b3 (patch)
tree2dcf589f2135b41c38f41b261559a89d7f8910fe
parente68fc9069d6053825e1510a938cf2ff57fdca257 (diff)
downloadfreeipa-3b77268cf298124b0906c98fdd1d31fd1e6700b3.zip
freeipa-3b77268cf298124b0906c98fdd1d31fd1e6700b3.tar.gz
freeipa-3b77268cf298124b0906c98fdd1d31fd1e6700b3.tar.xz
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
-rw-r--r--install/ui/aci.js33
1 files changed, 14 insertions, 19 deletions
diff --git a/install/ui/aci.js b/install/ui/aci.js
index 112bff2..a0399f5 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<target_types.length; i++) {
+ if (target_types[i].name === type_to_show) {
target_type = target_types[i];
target_type.container.css('display', 'block');
- }else{
+ } else {
target_types[i].container.css('display', 'none');
}
}
-
}
+
that.create = function(container) {
var dl = $('<dl/>', {
@@ -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);
}
};