c94e417525c00e37443c212e0ded342ef7809e56 max Mon Sep 7 12:07:18 2026 -0700 hgTrackUi: add "Hide all tracks" and "Show all tracks" buttons to the superTrack page, and drop "Apply to all visible tracks". The two new buttons cover the two things people actually do on a container page. "Show all tracks" asks for pack and falls back to full for tracks that have no pack, i.e. signal tracks, so a container of bigWigs comes up in full. The old "Apply to all visible tracks" button needed two sentences of help text to distinguish it from "Apply to all tracks" and is gone; the dropdown plus "Apply to all tracks" still covers dense and squish. refs #38281 diff --git src/hg/js/hui.js src/hg/js/hui.js index c105a14362f..d5248f07a41 100644 --- src/hg/js/hui.js +++ src/hg/js/hui.js @@ -1646,40 +1646,40 @@ $(inpText).on("change", function() { $(inpSpec).spectrum("set", $(inpText).val()); saveHlColor($(inpText).val(), trackName); }); // Restore the default on Reset link click $(inpResetLink).on("click", function() { let hlDefault = hlColorDefault; $(inpText).val(hlDefault); $(inpSpec).spectrum("set", hlDefault); saveHlColor(hlDefault, trackName); }); $(inpSpec).spectrum("set", $(inpText).val()); } -function superUiSetAllTracks(onlyVisible) { - /* called when user clicks the 'Apply to all' buttons: sets all viz dropdowns to the #superSubViz value */ - let newVal = $('#superSubViz').val(); +function superUiSetAllTracks(newVal) { + /* called when user clicks one of the buttons above the track list: sets all viz dropdowns + * to newVal, e.g. 'hide' or 'pack'. Without an argument, the #superSubViz value is used. */ + if (newVal === undefined) + newVal = $('#superSubViz').val(); var selects = document.querySelectorAll('#superTrackTable select'); for (var i = 0; i < selects.length; i++) { var sel = selects[i]; if (sel.id==="superSubViz") continue; - if (onlyVisible && sel.value === 'hide') - continue; sel.value = newVal; // if the dropdown cannot be set to a value (e.g. bigWig has no pack), set it to full or dense if (sel.value === "") sel.value = 'full'; if (sel.value === "") sel.value = 'dense'; $(sel).trigger("change"); } } // ---- myVariants share management (inline on hgTrackUi) ---- function myVariantsShareApiUrl(action, params) { // Build a URL for the share API let url = "../cgi-bin/hgTracks?myVarShareCmd=" + action +