0c8eae41f68f4a7e8a6fd20a0723de864621dbd8 tdreszer Thu Jul 7 18:56:48 2011 -0700 Since IE is so slow on giant composites, limited filterBox invalid options being grayed to only occur when there are a limited number of subtracks checked (<300) or files (<300). diff --git src/hg/js/utils.js src/hg/js/utils.js index a9b5f34..9aa493c 100644 --- src/hg/js/utils.js +++ src/hg/js/utils.js @@ -2559,44 +2559,51 @@ // IE takes tooo long, so this should be called only when leaving the filterBy box if ( $('tr.filterable').length > 300) { //if ($.browser.msie) { // IE takes tooo long, so this should be called only when leaving the filterBy box $(multiSelect).one('done',filterTableDone); return; //} } else filterTableTrigger(); } function filterTableExcludeOptions(filter) { // bound to 'click' event inside ui.dorpdownchecklist.js. // Will mark all options in one filterBy box that are inconsistent with the current // selections in other filterBy boxes. Mark with class ".excluded" + // Compare to the list of all trs + var allTrs = $('tr.filterable'); // Default all + if (allTrs.length == 0) + return false; + + if ($.browser.msie && $(allTrs).length > 300) // IE takes tooo long, so this should be called only when leaving the filterBy box + return false; + // Find the var for this filter var filterVar = filterTableFilterVar(filter); if (filterVar == undefined) return false; // Look at list of visible trs. var visibleTrs = filterTablesTrsSurviving(filterVar); if (visibleTrs == undefined) return false; - // Compare to the list of all trs - var allTrs = $('tr.filterable'); // Default all - if (allTrs.length == 0) - return false; + //if ($.browser.msie && $(visibleTrs).length > 300) // IE takes tooo long, so this should be called only when leaving the filterBy box + // return false; + if (allTrs.length == visibleTrs.length) { $(filter).children('option.excluded').removeClass('excluded'); // remove .excluded" from all return true; // Nothing more to do. All are already excluded } // Find the tds that belong to this var var tds = $(visibleTrs).find('td.'+filterVar); if (tds.length == 0) { $(filter).children('option').addClass('excluded'); // add .excluded" to all return true; } // Find the val classes var classes = new Array(); $(tds).each(function (i) {