ff7bcaa5d7a4d6648d943a464d0b603f251daf0c
chmalee
  Wed Aug 21 14:50:27 2024 -0700
Fix some broken track ui pages from jquery upgrade, and try to clean up
jquery-ui styles

diff --git src/hg/js/jquery.tablednd.js src/hg/js/jquery.tablednd.js
index c1ca8c3..83ae042 100644
--- src/hg/js/jquery.tablednd.js
+++ src/hg/js/jquery.tablednd.js
@@ -131,31 +131,31 @@
     makeDraggable: function(table) {
         var config = table.tableDnDConfig;
         if (table.tableDnDConfig.dragHandle) {
             // We only need to add the event to the specified cells
             var cells = jQuery("td."+table.tableDnDConfig.dragHandle, table);
             cells.each(function() {
                 // The cell is bound to "this"
                 jQuery(this).mousedown(function(ev) {
                     if(ev.button > 1)
                         return true;
                     if(jQuery.tableDnD == undefined)
                         return false;
                     jQuery.tableDnD.dragObject = this.parentNode;
                     jQuery.tableDnD.currentTable = table;
                     jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev);
-                    config.dragStartIndex = $(jQuery.tableDnD.dragObject).attr('rowIndex');
+                    config.dragStartIndex = $(jQuery.tableDnD.dragObject).prop('rowIndex');
                     if (config.onDragStart) {
                         // Call the onDrop method if there is one
                         config.onDragStart(ev, table, this.parentNode);  // UCSC
                     }
 
                     /////// UCSC
                     // Initialize oldY to avoid movingDown as first action
                     jQuery.tableDnD.oldY = jQuery.tableDnD.mouseCoords(ev).y - jQuery.tableDnD.mouseOffset.y;
 
                     // Capture the mouse move events only if dragStart
                     jQuery(document)
                         .bind('mousemove', jQuery.tableDnD.mousemove)
                         .bind('mouseup', jQuery.tableDnD.mouseup);
 
                     config.downOffset = 0;
@@ -174,31 +174,31 @@
                     return false;
                 });
             })
         } else {
             // For backwards compatibility, we add the event to the whole row
             var rows = jQuery("tr", table); // get all the rows as a wrapped set
             rows.each(function() {
                 // Iterate through each row, the row is bound to "this"
                 var row = jQuery(this);
                 if (! row.hasClass("nodrag")) {
                     row.mousedown(function(ev) {
                         if (ev.target.tagName == "TD") {
                             jQuery.tableDnD.dragObject = this;
                             jQuery.tableDnD.currentTable = table;
                             jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev);
-                            config.dragStartIndex = $(jQuery.tableDnD.dragObject).attr('rowIndex');
+                            config.dragStartIndex = $(jQuery.tableDnD.dragObject).prop('rowIndex');
                             if (config.onDragStart) {
                                 // Call the onDrop method if there is one
                                 config.onDragStart(ev, table, this);
                             }
                             return false;
                         }
                     }).css("cursor", "move"); // Store the tableDnD object
                 }
             });
         }
     },
 
     updateTables: function() {
         this.each(function() {
             // this is now bound to each matching table