3c10f2bbe4f932c543e4c017b4b05b875a55811b
Merge parents 1a89c8e 7e86c53
tdreszer
  Thu Sep 22 13:44:58 2011 -0700
Merge branch 'master' into tdreszer-subCfg
diff --cc src/hg/js/ddcl.js
index e7cbef8,0970ac8..9a0114a
--- src/hg/js/ddcl.js
+++ src/hg/js/ddcl.js
@@@ -240,44 -240,44 +240,44 @@@
              if (maxWidth < minWidth)
                  maxWidth = minWidth;
          }
          maxWidth = (Math.ceil(maxWidth / 10) * 10) + 10; // Makes for more even boxes
          var style = $(obj).attr('style');
  
          // The magic starts here:
          $(obj).dropdownchecklist({
                              firstItemChecksAll: true,
                              noneIsAll: myNoneIsAll,
                              maxDropHeight: myDropHeight,
                              icon: myIcon,
                              emptyText: myEmptyText,
                              explicitClose: myClose,
                              textFormatFunction: function () { return 'selecting...'; } ,
 -                            onComplete: mySelf.onComplete
 +                            onComplete: ddcl.onComplete
          });
          if (myNoneIsAll)
              $(obj).addClass('noneIsAll'); // Declare this as none selected same as all selected
 -        mySelf.onComplete(obj); // shows selected items in multiple lines
 +        ddcl.onComplete(obj); // shows selected items in multiple lines
  
          // Set up the selector (control seen always and replacing select)
-         control = $('#ddcl-' + id);
+         var control = $('#ddcl-' + id);
          if (control == null || control == undefined) {
              warn('ddcl.setup('+id+') failed to create drop-down checkbox-list');
              return;
          }
          var controlSelector = $(control).find(".ui-dropdownchecklist-selector");
 -        $(controlSelector).click(mySelf.onOpen);
 +        $(controlSelector).click(ddcl.onOpen);
          $(controlSelector).css({width:maxWidth+'px'});
          var controlText = $(control).find(".ui-dropdownchecklist-text");
          $(controlText).css({width:maxWidth+'px'});
  
          // Set up the drop list (control seen only on fucus and with items to choose)
          var dropWrapper = $('#ddcl-' + id + '-ddw');
          if (dropWrapper == null || dropWrapper == undefined) {
              warn('ddcl.setup('+id+') failed to create drop-down checkbox-list');
              return;
          }
          // Individual items need styling
          var itemHeight = 22;
          // Exclude the close button
          var dropItems = $(dropWrapper).find(".ui-dropdownchecklist-item");//.not('.ui-dropdownchecklist-close');
          $(dropItems).hover(function () {$(this).css({backgroundColor:'#CCFFCC'});},