ba05210ca48f7f7ec2cc5fe5a76e17e9bb6f0503 tdreszer Fri Dec 17 15:00:53 2010 -0800 Add row highlighting on sortable tables. Make sure that initialize of sort table turns off greying when done. diff --git src/hg/js/utils.js src/hg/js/utils.js index 20d154f..4beafa9 100644 --- src/hg/js/utils.js +++ src/hg/js/utils.js @@ -1563,19 +1563,28 @@ if (title.length > 0 && $(this).find('sup')) title = title.replace(/[0-9]$/g,''); if (title.length > 0) $(this).attr('title',"Sort list on '" + title + "'." ); else $(this).attr('title',"Sort list on column." ); } }) // Now update all of those cells sortOrderUpdate(table,sortColumns,addSuperscript); // Alternate colors if requested if(altColors != undefined) sortedTableAlternateColors(tbody); + // Highlight rows? But on subtrack list, this will mess up the "..." coloring. So just exclude tables with drag and drop + if ($(table).hasClass('tableWithDragAndDrop') == false) { + $('tbody.sortable').find('tr').hover( + function(){ $(this).addClass('bgLevel3'); }, // Will highlight the rows + function(){ $(this).removeClass('bgLevel3');} + ); + } + // Finally, make visible + $(tbody).removeClass('sorting'); $(tbody).show(); }