cf9121e5814dfeccca8054d01b1a98d4108f94cf tdreszer Fri Feb 11 15:47:26 2011 -0800 Special case for ie so that sort table column headers show that they are sortable. diff --git src/hg/js/utils.js src/hg/js/utils.js index 4844168..869d6ba 100644 --- src/hg/js/utils.js +++ src/hg/js/utils.js @@ -1596,30 +1596,36 @@ $(this).addClass('sort'+(ix+1)); //warn("Added class='sortable sort"+(ix+1)+"' to th:"+this.innerHTML); }); sortColumns = new sortColumnsGetFromTr(tr,"silent"); if (sortColumns == undefined || sortColumns.cellIxs.length == 0) { warn("sortable table's header row contains no sort columns."); return; } } // Can wrap all columnn headers with link $(tr).find("th.sortable").each(function (ix) { //if ( $(this).queue('click').length == 0 ) { if ( $(this).attr('onclick') == undefined ) { $(this).click( function () { tableSortOnButtonPress(this);} ); } + if ($.browser.msie) { // Special case for IE since CSS :hover doesn't work (note pointer and hand because older IE calls it hand) + $(this).hover( + function () { $(this).css( { backgroundColor: '#CCFFCC', cursor: 'pointer', cursor: 'hand' } ); }, + function () { $(this).css( { backgroundColor: '#FCECC0', cursor: '' } ); } + ); + } if ( $(this).attr('title').length == 0) { var title = $(this).text().replace(/[^a-z0-9 ]/ig,''); 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)