c2df41822e0e735440d4f5908bf7b101de4df911
tdreszer
  Wed Feb 15 13:25:51 2012 -0800
Matrix checkboxes were being marked with changed class which screws up class accounting in hui.js.
diff --git src/hg/js/subCfg.js src/hg/js/subCfg.js
index ecce356..7e3f9b2 100644
--- src/hg/js/subCfg.js
+++ src/hg/js/subCfg.js
@@ -31,30 +31,31 @@
 
 var subCfg = { // subtrack config module.
     //mySelf: null, // There is no need for a "mySelf" unless this object is being instantiated.
 
     // There is one instance and these vars are page wide
     compositeName: undefined,
     canPack: true,  // if composite vis is only hide,dense,full, then all children will also be restricted.
     visIndependent: false,
     viewTags: [],
 
     markChange: function (eventObj, obj)
     { // Marks a control as having been changed by the user.  Naming will send value to cart.
       // Note this is often called directly as the onchange event function
         if (obj == undefined || $.type(obj) === "string")
             obj = this;
+
         $(obj).addClass('changed');
 
         // checkboxes have hidden boolshads which should be marked when unchecked
         if(obj.type === "checkbox") {
             var boolshad = normed($("input.cbShadow[name='boolshad\\." + obj.name+"']"));
             if (boolshad != undefined) {
                 $(boolshad).addClass('changed');
             }
         }
     },
 
     clearChange: function (obj)
     { // Mark as unchanged
         $(obj).removeClass('changed');
 
@@ -833,31 +834,32 @@
             classList = aryRemove(classList,["viewDD","normalText","changed"]);
             if (classList.length == 0)
                 warn('DEBUG: View classlist is missing view class.');
             else if (classList.length > 1)
                 warn('DEBUG: View classlist contains unexpected classes:' + classList);
             else {
                 subCfg.viewTags[i] = classList[0];
                 subCfg.viewInit(subCfg.viewTags[i]);
             }
         });
 
         // Tricky for composite level controls.  Could wrap cfg controls in new div.
         // DO THIS AFTER Views
         // NOTE: excluding sortOrder and showCfg which are special cases we don't care about in subCfg
         // Excluding views and subCBs because a {composite}_{subtrack} naming scheme may be used
-        var compObjs = $('select,input').filter("[name^='"+subCfg.compositeName+"\\.'],[name^='"+subCfg.compositeName+"_']").not(".viewDD,.subCB");
+        var compObjs = $('select,input').filter("[name^='"+subCfg.compositeName+"\\.'],[name^='"+subCfg.compositeName+"_']");
+        compObjs = $(compObjs).not(".viewDD,.subCB,.matCB");  // viewDD, subCB already done. matCB not needed!
         if (compObjs.length > 0) {
             $(compObjs).each(function (i) {
                 if (this.type != 'hidden') {
                     // DEBUG -------------
                     if (this.id != undefined
                     && this.id.length > 0
                     && $(this).hasClass('filterBy') == false
                     && $(this).hasClass('filterComp') == false)
                         warn('DEBUG: Unexpected control with name ['+this.name + '], and id #'+this.id);
                     // DEBUG ------------- Helps find unexpected problems.
 
                     $(this).change(function (e) {
                         subCfg.markChange(e,this);
                         subCfg.propagateSetting(this);
                     });