src/hg/js/hui.js 1.36
1.36 2009/10/07 22:05:48 tdreszer
Fixed some 3D matrix plus-minus button problems.
Index: src/hg/js/hui.js
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/js/hui.js,v
retrieving revision 1.35
retrieving revision 1.36
diff -b -B -U 4 -r1.35 -r1.36
--- src/hg/js/hui.js 24 Sep 2009 00:26:23 -0000 1.35
+++ src/hg/js/hui.js 7 Oct 2009 22:05:48 -0000 1.36
@@ -120,18 +120,28 @@
var CBs;
if(state)
CBs = $("input.matrixCB").not(":checked");
else
- CBs = $("input.matrixCB").filter(":checked");
+ CBs = $("input.matrixCB").filter(":checked").not(".dimZ");// uncheck should not touch dimZ
for(var vIx=1;vIx<arguments.length;vIx++) {
- CBs = CBs.filter("."+arguments[vIx]); // Successively limit list by additional classes.
+ CBs = $( CBs ).filter("."+arguments[vIx]); // Successively limit list by additional classes.
}
CBs.each( function (i) { this.checked = state;} )
//CBs.each( function (i) { if(this.checked != state) this.click();} )
- if(state)
+ if(state) {
CBs = $("input.subtrackCB").not(":checked");
- else
+ // need to weed out non-checked dimZ if there are any
+ var zCBs = $("input.matrixCB.dimZ").not(":checked");
+ if( $( zCBs ).length > 0) {
+ var classes = ""; // make string of classes
+ $(zCBs).each( function (i) {
+ var class = $( this ).attr("class").replace("matrixCB dimZ ",".")
+ classes += class;
+ });
+ CBs = $( CBs ).not(classes); // weed CBs
+ }
+ } else
CBs = $("input.subtrackCB").filter(":checked");
for(var vIx=1;vIx<arguments.length;vIx++) {
CBs = CBs.filter("."+arguments[vIx]); // Successively limit list by additional classes.
}