src/hg/js/hui.js 1.33
1.33 2009/09/10 04:43:10 tdreszer
Fixed bug which had independent boolshad hidden checkbox support fields erroneously updated by subtrack dependent cfg logic
Index: src/hg/js/hui.js
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/js/hui.js,v
retrieving revision 1.32
retrieving revision 1.33
diff -b -B -U 4 -r1.32 -r1.33
--- src/hg/js/hui.js 8 Sep 2009 21:11:48 -0000 1.32
+++ src/hg/js/hui.js 10 Sep 2009 04:43:10 -0000 1.33
@@ -251,13 +251,10 @@
if(suffix.length==0) {
alert("Unable to parse '"+inp.name+"'");
return true;
}
- var list = $("input[name$='"+suffix+"']").not("[name='"+inp.name+"']"); // Exclude self from list
- if($(list).length>0)
- $(list).val(inp.value);
- else {
- list = $("select[name$='"+suffix+"']").not("[name='"+inp.name+"']"); // Exclude self from list
+ if(inp.type.indexOf("select") == 0) {
+ var list = $("select[name$='"+suffix+"']").not("[name='"+inp.name+"']"); // Exclude self from list
if($(list).length>0) {
if(inp.multiple != true)
$(list).attr('selectedIndex',inp.selectedIndex);
else {
@@ -268,9 +265,20 @@
});
$(this).attr('size',$(inp).attr('size'));
});
}
- } else {
+ }
+ }
+ else if(inp.type.indexOf("checkbox") == 0) {
+ var list = $("checkbox[name$='"+suffix+"']").not("[name='"+inp.name+"']"); // Exclude self from list
+ if($(list).length>0)
+ $(list).attr("checked",$(inp).attr("checked"));
+ }
+ else { // Various types of inputs
+ var list = $("input[name$='"+suffix+"']").not("[name='"+inp.name+"']");//.not("[name^='boolshad.']"); // Exclude self from list
+ if($(list).length>0)
+ $(list).val(inp.value);
+ else {
alert("Unsupported type of multi-level cfg setting type='"+inp.type+"'");
return false;
}
}