23423baa6e295aed7d61b79534de38256fc1d1f8 tdreszer Thu Jan 26 11:44:52 2012 -0800 Fixed 2 bugs with filterBy's as seen on Encode Gencode V10. First, subtrack filterby's were getting the wrong name in some circumstances. Second, putting filterBy's inside a view cfg means they may have been hidden during setup. But ddcl's require visible multi-selects to be sized properly. diff --git src/hg/js/hui.js src/hg/js/hui.js index 2b46d71..41c02af 100644 --- src/hg/js/hui.js +++ src/hg/js/hui.js @@ -612,30 +612,35 @@ // Will hide the configuration controls associated with one name $("input[name$='"+view+".showCfg']").val("off"); // Set cart variable $("tr[id^='tr_cfg_"+view+"']").css('display','none'); // Hide controls } function showConfigControls(name) { // Will show configuration controls for name= {tableName}.{view} // Config controls not matching name will be hidden var trs = $("tr[id^='tr_cfg_']") $("input[name$='.showCfg']").val("off"); // Turn all off $( trs ).each( function (i) { if( this.id == 'tr_cfg_'+name && this.style.display == 'none') { $( this ).css('display',''); $("input[name$='."+name+".showCfg']").val("on"); + var cfgBox = this; + // Since filterBys amy have been hidden on page load, must reinit them now. + $(cfgBox).find('.filterBy').each( function(i) { + ddcl.reinit(this,false); // false means conditioned on failed initial setup. + }); } else if( this.style.display == '') { $( this ).css('display','none'); } }); // Close the cfg controls in the subtracks $("table.subtracks").each( function (i) { subtrackCfgHideAll(this);} ); return true; } function hideOrShowSubtrack(obj) { // This can show/hide a tablerow that contains a specific object // Containing <tr>'s must be id'd with 'tr_' + obj.id