002a32a1207879eb9f001d444be05ce8eab33314
chmalee
  Wed May 22 12:47:47 2024 -0700
Fix track drag re-order not working after including hui.js in hgTracks javascript includes, refs #33775

diff --git src/hg/js/hui.js src/hg/js/hui.js
index 0a5a489..1e58efc 100644
--- src/hg/js/hui.js
+++ src/hg/js/hui.js
@@ -1392,31 +1392,33 @@
         // If divs with class 'subCfg' then initialize the subtrack cfg code
         // NOTE: must be before any ddcl setup
         if (typeof(subCfg) === "object"  // subCfg.js file included?
         && (normed($("div.subCfg")) || normed($("div.subVisDD")))) {
             subCfg.initialize();
         }
     }
 
     // Initialize sortable tables
     $('table.sortable').each(function (ix) {
         sortTable.initialize(this,true,true);
     });
 
     // Register tables with drag and drop
     $("table.tableWithDragAndDrop").each(function (ix) {
+        if ($(this)[0].id !== "imgTbl") {
             tableDragAndDropRegister(this);
+        }
     });
 
     // Put navigation links in top corner
     navigationLinksSetup();
 });
 
 function selectLinkChanges($changed, $affected, mapping) {
 // When the $changed changes, examine the value of $affected to see if it
 // needs to be tweaked according to mapping, which is an object of objects
 // like this: { 'pickySetting' : { 'notOKValue': 'OKValue' } }
 // If $changed changes to 'pickySetting', and $affected is 'notOKValue',
 // then $affected is changed to 'OKValue'.  Any notOKValue for pickySetting
 // is disabled.  If $changed doesn't have a pickySetting, then all options
 // are enabled.
     var $affectedOptions = $affected.children('option');