src/hg/js/hui.js 1.31
1.31 2009/09/05 01:20:14 tdreszer
Fix for crazy quantum entanglement bug that Brooke found on cons 44-way
Index: src/hg/js/hui.js
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/js/hui.js,v
retrieving revision 1.30
retrieving revision 1.31
diff -b -B -U 4 -r1.30 -r1.31
--- src/hg/js/hui.js 18 Aug 2009 23:22:51 -0000 1.30
+++ src/hg/js/hui.js 5 Sep 2009 01:20:14 -0000 1.31
@@ -244,23 +244,22 @@
function compositeCfgUpdateSubtrackCfgs(inp)
{
// Updates all subtrack configuration values when the composite cfg is changed
- var count=0;
var suffix = inp.name.substring(inp.name.indexOf("."));
- var list = inputArrayThatMatches(inp.type,"name","",suffix);
- for (var ix=0;ix<list.length;ix++) {
- list[ix].value = inp.value;
- count++;
- }
- if(list.length==0) {
- var list = document.getElementsByTagName('select');
- for (var ix=0;ix<list.length;ix++) {
- if(list[ix].name.lastIndexOf(suffix) == list[ix].name.length - suffix.length ) {
- list[ix].selectedIndex = inp.selectedIndex;
- count++;
- }
+ //if(suffix.length==0)
+ // suffix = inp.name.substring(inp.name.indexOf("_"));
+ if(suffix.length==0) {
+ //alert("Unable to parse '"+inp.name+"'");
+ return true;
}
+ var list = $("input[name$='"+suffix+"']");
+ if($(list).length>0)
+ $(list).val(inp.value);
+ else {
+ list = $("select[name$='"+suffix+"']");
+ if($(list).length>0)
+ $(list).attr('selectedIndex',inp.selectedIndex);
}
return true;
}