5515006ee81e5de99ebd03581644a8a96f33599e max Mon Sep 7 07:36:11 2026 -0700 tiny text change on trackUi page, no ticket diff --git src/hg/hgTrackUi/hgTrackUi.c src/hg/hgTrackUi/hgTrackUi.c index b583403b430..93b76d607be 100644 --- src/hg/hgTrackUi/hgTrackUi.c +++ src/hg/hgTrackUi/hgTrackUi.c @@ -2818,48 +2818,53 @@ { jsIncludeFile("hui.js",NULL); printf("<p style='margin-top:3px; margin-bottom:3px'>"); printf("Tracks that are part of this container are listed below. Use the buttons below to set their visibility. The grey button shows each track's current visibility.</p>"); printf("\n<TABLE id='superTrackTable' CELLPADDING=2>"); tdbRefSortPrioritiesFromCart(cart, &superTdb->children); struct slRef *childRef; char javascript[1024]; for (childRef = superTdb->children; childRef != NULL; childRef = childRef->next) { struct trackDb *tdb = childRef->val; if (childRef == superTdb->children) // first time through { printf("<TR style='border-bottom: none'><TD style='margin-bottom:10px' NOWRAP colspan=2>\n"); - printf("<b>Apply visibility: </b>\n"); + // Hide/show everything with a single click, the two most common cases + printf("<button type='button' id='superVizHideAllButton'>Hide all tracks</button>\n"); + jsOnEventById("click", "superVizHideAllButton", "superUiSetAllTracks('hide')"); + + printf("<button type='button' style='margin-left: 10px' id='superVizShowAllButton'>" + "Show all tracks</button>\n"); + jsOnEventById("click", "superVizShowAllButton", "superUiSetAllTracks('pack')"); + + printf("<span style='margin-left: 20px'><b>Apply visibility: </b></span>\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 visible tracks' button sets the visibility selected in this dropdown on all tracks below that are not hidden.<br>" + printInfoIcon("The 'Show all tracks' button sets all tracks below to pack, except for those " + "that do not support it, e.g. signal tracks, which are set to full.<br>" "The 'Apply to all tracks' button sets the visibility selected in this dropdown on all tracks below, including hidden ones."); - // 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", "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 tracks</button> \n"); + // set all selectors to the current value of the top select + printf("<button type='button' id='superVizApplyAllButton'>Apply to all tracks</button> \n"); 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)); @@ -3967,31 +3972,31 @@ "&hgtgroup_%s_close=0#%sGroup\" title='%s tracks in track configuration " "page'><IMG height=12 src='../images/ab_up.gif'>All %s%s</A>)</B>", hgTracksName(), cartSessionVarName(), cartSessionId(cart),database,chromosome, tdb->grp,tdb->grp,grp->label,grp->label, endsWith(grp->label," Tracks")?"":" tracks"); break; } } grpFreeList(&grps); } // incoming links from Google searches can go directly to a composite child trackUi page: tell users // that they're inside a container now and can go back up the hierarchy if (tdbGetComposite(tdb)) { // shortLabel comes from trackDb, which a track hub controls, escape - printf("<p>This track is a subtrack of the composite container track \"%s\".<br>", + printf("<p>This track is part of the track container \"%s\".<br>", htmlEncode(tdb->parent->shortLabel)); printf("<a href='hgTrackUi?db=%s&c=%s&g=%s'>Click here</a> to display the \"%s\" container configuration page.", database, chromosome, tdb->parent->track, htmlEncode(tdb->parent->shortLabel)); } } puts("<BR><BR>"); if (tdbIsSuperTrackChild(tdb)) showSupertrackInfo(tdb); if (ct && sameString(tdb->type, "maf")) tdb->canPack = TRUE; else if (sameString(tdb->track, WIKI_TRACK_TABLE)) // special case wikiTrack (there's no trackDb entry); fixes redmine 2395