74b175e14ae6469cdd645a969d170a46fe445d3e tdreszer Wed Nov 2 15:38:13 2011 -0700 Checking in support for matrix squueze, but curently ifdef'd out diff --git src/hg/js/hui.js src/hg/js/hui.js index 4382e5c..a1edc4c 100644 --- src/hg/js/hui.js +++ src/hg/js/hui.js @@ -1226,33 +1226,78 @@ } else { $(sel).removeClass('hiddenText'); $(sel).addClass('normalText'); superT.topVis(true); } if (val == undefined) { // onchange event only var cb = $('input#'+sel.name); if (cb != undefined && cb.length == 1) { cb = cb[0]; $(cb).attr('checked',(selIx > 0)); } } } } +/* SOON TO BE ENABLED +var mat = { // Beginings of matrix object + + dimensions: 0, + + cellHover: function (obj,on) + { + var classList = $( obj ).attr("class").split(" "); + classList = aryRemove(classList,"matCell"); + for (var ix=0;ix < classList.length;ix++) { + var cells = $(".matCell."+classList[ix]); + if (on) + $(cells).css({backgroundColor:"#FCECC0"}); + else + $(cells).css({backgroundColor:"#FFF9D2"}); + } + if (on && obj.title.length == 0) { + for (var ix=0;ix < classList.length;ix++) { + if (ix > 0) + obj.title += " and "; + obj.title += $("th."+classList[ix]).first().text(); + } + } + }, + + init: function () + { + var cells = $('td.matCell'); + if (cells != undefined && cells.length > 0) { + var classList = $( cells[0] ).attr("class").split(" "); + classList = aryRemove(classList,"matCell"); + mat.dimensions = classList.length; + if (mat.dimensions > 1) { // No need unless this is a 2D matrix + $('td.matCell').hover( + function (e) {mat.cellHover(this,true)}, + function (e) {mat.cellHover(this,false)} + ); + } + } + } +} +*/ + // The following js depends upon the jQuery library $(document).ready(function() { + // SOON TO BE ENABLED: mat.init(); + // Initialize sortable tables $('table.sortable').each(function (ix) { sortTableInitialize(this,true,true); }); // Register tables with drag and drop $("table.tableWithDragAndDrop").each(function (ix) { tableDragAndDropRegister(this); }); $('.halfVis').css('opacity', '0.5'); // The 1/2 opacity just doesn't get set from cgi! $('.filterComp').each( function(i) { // Do this by 'each' to set noneIsAll individually if (newJQuery == false) $(this).dropdownchecklist({ firstItemChecksAll: true, noneIsAll: $(this).hasClass('filterBy'), maxDropHeight: filterByMaxHeight(this) });