be61a297f46e662ecddbe39fe483e7e6577e70a6 tdreszer Wed May 11 14:19:32 2011 -0700 Fix for redmine 3914. The metadata '...' had messed up coloring. diff --git src/hg/js/utils.js src/hg/js/utils.js index 66e0481..fb4102e 100644 --- src/hg/js/utils.js +++ src/hg/js/utils.js @@ -414,36 +414,44 @@ } } } return true; } } function metadataShowHide(trackName,showLonglabel,showShortLabel) { // Will show subtrack specific configuration controls // Config controls not matching name will be hidden var divit = $("#div_"+trackName+"_meta"); if($(divit).css('display') == 'none') { $("#div_"+trackName+"_cfg").hide(); // Hide any configuration when opening metadata - if($(divit).find('table').length == 0) + if($(divit).find('table').length == 0) { lookupMetadata(trackName,showLonglabel,showShortLabel); + return false; + } } var tr = $(divit).parents('tr'); if (tr.length > 0) { - $(divit).children('table').css('backgroundColor',$(tr[0]).css('backgroundColor')); + if ($(tr).hasClass("bgLevel2")) { + $(divit).children('table').removeClass('bgLevel1'); + $(divit).children('table').addClass('bgLevel2'); + } else { + $(divit).children('table').removeClass('bgLevel2'); + $(divit).children('table').addClass('bgLevel1'); + } } $(divit).toggle(); // jQuery hide/show return false; } function setTableRowVisibility(button, prefix, hiddenPrefix, titleDesc, doAjax) { // Show or hide one or more table rows whose id's begin with prefix followed by "-". // This code also modifies the corresponding hidden field (cart variable) and the // src of the +/- img button. var retval = true; var hidden = $("input[name='"+hiddenPrefix+"_"+prefix+"_close']"); if($(button) != undefined && $(hidden) != undefined && $(hidden).length > 0) { var oldSrc = $(button).attr("src"); var newVal; @@ -1622,32 +1630,34 @@ $(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');} + function(){ $(this).addClass('bgLevel3'); + $(this).find('table').addClass('bgLevel3'); }, // Will highlight the rows, including '...' + function(){ $(this).removeClass('bgLevel3'); + $(this).find('table').removeClass('bgLevel3'); } ); } // Finally, make visible $(tbody).removeClass('sorting'); $(tbody).show(); } function setCheckboxList(list, value) { // set value of all checkboxes in semicolon delimited list var names = list.split(";"); for(var i=0;i