0df62533ce94e914b0eb5d4490744d219eb721e5
tdreszer
  Tue Dec 20 14:28:42 2011 -0800
Objectified sortTable and filterTable but no functional change is here.
diff --git src/hg/js/hui.js src/hg/js/hui.js
index 446c99a..2b46d71 100644
--- src/hg/js/hui.js
+++ src/hg/js/hui.js
@@ -683,31 +683,31 @@
 // Show or Hide subtracks based upon radio toggle
     var showHide;
     if(arguments.length > 0)
         showHide=inp;
     else {
         var onlySelected = $("input.allOrOnly'");
         if(onlySelected.length > 0)
             showHide = onlySelected[0].checked;
         else
             return;
     }
     showSubTrackCheckBoxes(showHide);
 
     var tbody = $("tbody.sortable")
     $(tbody).each(function (i) {
-        sortedTableAlternateColors(this);
+        sortTable.alternateColors(this);
     });
 }
 
 ///// Following functions called on page load
 function matInitializeMatrix()
 {
 // Called at Onload to coordinate all subtracks with the matrix of check boxes
     //var start = startTiming();
 
     matSubCBsSelected(); // counts
     //showOrHideSelectedSubtracks();    // Don't need this because hui.c is doing it
 
     //showTiming(start,"matInitializeMatrix()");
 }
 
@@ -1066,31 +1066,31 @@
     if(navUp != undefined && navUp.length > 0) {
         $(navUp).each(function(i) {
             var offset = $(this).parent().offset();
             if(offset.top  > ($(window).height()*(2/3))) {
                 $(this).show();
             }
         });
     }
 }
 
 function tableSortAtButtonPress(anchor,tagId)
 { // Special ONLY for hgTrackUi sorting.  Others use utils.js::tableSortOnButtonPress()
     var table = $( anchor ).parents("table.sortable");
     if (table) {
         subtrackCfgHideAll(table);
-        waitOnFunction( _tableSortOnButtonPressEncapsulated, anchor, tagId);
+        waitOnFunction( sortTable._sortOnButtonPress, anchor, tagId);
     }
     return false;  // called by link so return false means don't try to go anywhere
 }
 
 function fauxDisable(obj,disable,title)
 {// Makes an obj appear disabled, but it isn't
  //  span.disabled & input.disabled is opacity 0.5
  //   div.disabled is border-color: gray; color: gray;
     if ($(obj).hasClass('subCB') == false || typeof(subCfg) !== "undefined") {
         if(disable) {
             if ($.browser.msie)
                 $(obj).css('opacity', '0.5');
             $(obj).addClass('disabled');
         } else {
             if ($.browser.msie)
@@ -1304,26 +1304,26 @@
     mat.init();
 
     if (normed($('table.subtracks')) != undefined) {
         matInitializeMatrix();
 
         // If divs with class 'subCfg' then initialize the subtrack cfg code
         // NOTE: must be before any ddcl setup
         if (typeof(subCfg) !== "undefined"
         && (normed($("div.subCfg")) != undefined || normed($("div.subVisDD")))) {
             subCfg.initialize();
         }
     }
 
     // Initialize sortable tables
     $('table.sortable').each(function (ix) {
-        sortTableInitialize(this,true,true);
+        sortTable.initialize(this,true,true);
     });
 
     // Register tables with drag and drop
     $("table.tableWithDragAndDrop").each(function (ix) {
         tableDragAndDropRegister(this);
     });
 
     // Put navigation links in top corner
     navigationLinksSetup();
 });