aee2779a0e183ca9f694ade76ac95b18aef49a55 max Mon Feb 16 17:22:22 2026 -0800 replacing dense jquery code with more explicit code and also fixing the case Gerardo found when a track does not have pack mode, refs #36917 diff --git src/hg/hgTrackUi/hgTrackUi.c src/hg/hgTrackUi/hgTrackUi.c index 1cbaeb179ee..606fc5eaafb 100644 --- src/hg/hgTrackUi/hgTrackUi.c +++ src/hg/hgTrackUi/hgTrackUi.c @@ -2762,35 +2762,35 @@ printf("<TR style='border-bottom: none'><TD style='margin-bottom:10px' NOWRAP colspan=2>\n"); printf("<b>Apply visibility: </b>\n"); printf("<select id='superSubViz' class='normalText'>\n"); printf("<option value='hide'>Hide</option>"); printf("<option value='dense'>Dense</option>"); printf("<option value='squish'>Squish</option>"); printf("<option value='pack' selected='selected'>Pack</option>"); printf("<option value='full'>Full</option>\n"); printf("</select>\n"); printInfoIcon("The 'Apply to all' button sets all tracks below to the visibility selected on this dropdown. The 'Apply to all visible' button sets this visibility on all tracks below that are not hidden."); // First button: set all selectors that are not on 'hide' to the current value of the top select printf("<button type='button' id='superVizApplyButton'>Apply to all visible tracks</button>\n"); - jsOnEventById("click", "superVizApplyButton", "let newVal = $('#superSubViz').val(); $('#superTrackTable select').filter(function() { return $(this).val() !== 'hide'; }).val(newVal).trigger('change').removeClass('hiddenText').addClass('normalText'); "); + jsOnEventById("click", "superVizApplyButton", "superUiSetAllTracks(true)"); // Second button: set all selectors to the current value of the top select printf("<button type='button' style='margin-left: 10px' id='superVizApplyAllButton'>Apply to all</button> \n"); - jsOnEventById("click", "superVizApplyAllButton", "let newVal = $('#superSubViz').val(); $('#superTrackTable select').val(newVal).trigger('change').removeClass('hiddenText').addClass('normalText');"); + jsOnEventById("click", "superVizApplyAllButton", "superUiSetAllTracks()"); printf("</TD></TR>\n"); } printf("<TR><TD NOWRAP>"); if (!tdbIsDownloadsOnly(tdb)) { char id[256]; enum trackVisibility tv = hTvFromString(cartUsualString(cart, tdb->track,hStringFromTv(tdb->visibility))); safef(id, sizeof id, "%s_check", tdb->track); printf("<INPUT style='display:none' class='subtrackCheckbox' TYPE=CHECKBOX id='%s'%s>", id, (tv != tvHide?" CHECKED":"")); safef(javascript, sizeof(javascript), "superT.selChanged(this)"); struct slPair *event = slPairNew("change", cloneString(javascript));