6c0aa526cb79c8e6f406d416b01678665b078854
tdreszer
  Fri Jul 29 15:39:37 2011 -0700
Only a tiny incremental change beofre I must return to the master branch.
diff --git src/hg/js/hui.js src/hg/js/hui.js
index 4b3906c..b5b43a0 100644
--- src/hg/js/hui.js
+++ src/hg/js/hui.js
@@ -112,30 +112,38 @@
     // When subCBs are clicked, 3-state matCBs may need to be set
     var classes = matViewClasses('hidden');
     classes = classes.concat( matAbcCBclasses(false) );
     var matCB = matCbFindFromSubCb( subCB );
     if( matCB != undefined ) {
         matChkBoxNormalize( matCB, classes );
     }
     //var abcCB = matAbcCbFindFromSubCb( subCB );
     //if( abcCB != undefined ) {
     //    matChkBoxNormalize( abcCB, classes );
     //}
 
     if(subCB.checked)
         exposeAll();  // Unhide composite vis?
 
+    var subtrackName = subCB.name;
+    if (subtrackName == undefined || subtrackName.length == 0)
+        subtrackName = subCB.id;
+    if (subtrackName != undefined && subtrackName.length > 0) {
+        subtrackName = subtrackName.substring(0,subtrackName.length - 4); // '_sel'.length
+        scm.enableCfg(subCB,subtrackName,subCB.checked);
+    }
+
     matSubCBsSelected();
 }
 
 function matCbClick(matCB)
 {
 // matCB:onclick  When a matrix CB is clicked, the set of subtracks checked may change
 // Also called indirectly by matButton:onclick via matSetMatrixCheckBoxes
 
     var classList = $( matCB ).attr("class").split(" ");
     var isABC = (aryFind(classList,"abc") != -1);
     classList = aryRemove(classList,"matCB","halfVis","abc");
     if(classList.length == 0 )
        matSubCBsCheck(matCB.checked);
     else if(classList.length == 1 )
        matSubCBsCheck(matCB.checked,classList[0]);               // dimX or dimY or dim ABC
@@ -348,31 +356,31 @@
 {
 // Makes or removes the 3rd (indeterminate) matCB state
     // Too many options:
     // 1) addClass()/removeClass() (which does not directly support title)
     // 2) wrap div which could contain border, color, content.  content is not on one line: size is difficult
     // 3) wrap font which could contain border, color, content.  content is on one line: size is difficult
     // 4) *[ ]* ?[ ]?  *[ ]*  No text seems right;  borders? colors? opacity? Yes, minimum
     if(complete) {
         $(matCB).css('opacity', '1');  // For some reason IE accepts direct change but isn't happy with simply adding class!
         $(matCB).removeClass('halfVis');
         $(matCB).attr("title","");
     } else {
         $(matCB).css('opacity', '0.5');
         $(matCB).addClass('halfVis');
         $(matCB).attr("title","Not all associated subtracks have been selected");
-        $('.halfVis').css('opacity', '0.5');
+        //$('.halfVis').css('opacity', '0.5');
     }
 }
 
 function matCBsWhichAreComplete(complete)
 {
 // Returns a list of currently indeterminate matCBs.  This is encapsulated to keep consistent with matCbComplete()
     if(complete)
         return $("input.matCB").not(".halfVis");
     else
         return $("input.matCB.halfVis");
 }
 
 function matCbFindFromSubCb(subCB)
 {
 // returns the one matCB associated with a subCB (or undefined)
@@ -1808,31 +1816,31 @@
                 $(this).attr('size',1);
             });
             // Doesn't work!
             //$(newObj).parents('td').first().attr('valign','top');
             $(newObj).focus();
         }
     },
 
     enableCfg: function (cb,subtrack,setTo)
     { // Enables or disables subVis and wrench
         if (cb == null || cb == undefined) {
             if (subtrack == null || subtrack.length == 0) {
                 warn("scm.enableCfg() called without CB or subtrack.");
                 return false;
             }
-            cb = $("input[name='"++"'_sel]");
+            cb = $("input[name='"+subtrack+"'_sel]");
             if (cb == undefined || cb.length == 0) {
                 warn("scm.enableCfg() could not find CB for subtrack: "+subtrack);
                 return false;
             }
         }
         if (cb.length == 1)
             cb = cb[0];
 
         var td = $(cb).parent('td');
         if (td == undefined || td.length == 0) {
             warn("scm.enableCfg() could not TD for CB: "+cb.name);
             return false;
         }
         if (td.length == 1)
             td = td[0];
@@ -2013,25 +2021,25 @@
     var divs = $("div.subCfg");
     if (divs != undefined && divs.length > 0) {
         scm.initialize();
     }
 
     // Initialize sortable tables
     $('table.sortable').each(function (ix) {
         sortTableInitialize(this,true,true);
     });
 
     // Register tables with drag and drop
     $("table.tableWithDragAndDrop").each(function (ix) {
         tableDragAndDropRegister(this);
     });
 
-    $('.halfVis').css('opacity', '0.5'); // The 1/2 opacity just doesn't get set from cgi!
+    //$('.halfVis').css('opacity', '0.5'); // The 1/2 opacity just doesn't get set from cgi!
 
     $('.filterComp').each( function(i) { // Do this by 'each' to set noneIsAll individually
         if (newJQuery == false)
             $(this).dropdownchecklist({ firstItemChecksAll: true, noneIsAll: $(this).hasClass('filterBy'), maxDropHeight: filterByMaxHeight(this) });
     });
 
     // Put navigation links in top corner
     navigationLinksSetup();
 });