b5a9dc53235e4a0d01b4e533bcee8ecdd2a54531 tdreszer Mon May 2 12:08:50 2011 -0700 Setting filterby max height when number of options is small should not be done. diff --git src/hg/js/utils.js src/hg/js/utils.js index 46af8c5..66e0481 100644 --- src/hg/js/utils.js +++ src/hg/js/utils.js @@ -1976,31 +1976,31 @@ var pos = $(multiSel).closest(':visible').offset().top + 30; if (pos <= 0) pos = 260; // Special mess since the filterBy's on non-current tabs will calculate pos badly. var tabbed = $('input#currentTab'); if (tabbed != undefined) { var tabDiv = $(multiSel).parents('div#'+ $(tabbed).attr('value')); if (tabDiv == null || tabDiv == undefined || $(tabDiv).length == 0) { pos = 360; } } var maxHeight = $(window).height() - pos; var selHeight = $(multiSel).children().length * 21; if (maxHeight > selHeight) - maxHeight = selHeight; + maxHeight = null; return maxHeight; } function findTracksClear() {// Clear found tracks and all input controls findTracksClearFound(); $('input[type="text"]').val(''); // This will always be found //$('select.mdbVar').attr('selectedIndex',0); // Do we want to set the first two to cell/antibody? $('select.mdbVal').attr('selectedIndex',0); // Should be 'Any' $('select.filterBy').each( function(i) { // Do this by 'each' to set noneIsAll individually //$(this).dropdownchecklist("refresh"); // requires v1.1 $(this).dropdownchecklist("destroy"); $(this).dropdownchecklist({ firstItemChecksAll: true, noneIsAll: true, maxDropHeight: filterByMaxHeight(this) }); });