55df1a106590a6c9fd7e3cca90fa6bbad8eb50c4 max Thu Jan 29 05:26:21 2026 -0800 Revert "Reapply "changing superTrack TrackUi quite a bit." This reverts commit ce138738e24cb6e84502440b79490c412f6786f8. diff --git src/hg/hgTrackUi/hgTrackUi.c src/hg/hgTrackUi/hgTrackUi.c index d6dcd0f4c02..16966016e54 100644 --- src/hg/hgTrackUi/hgTrackUi.c +++ src/hg/hgTrackUi/hgTrackUi.c @@ -2738,145 +2738,91 @@ { struct trackDb *tdb; for (tdb = tdbList; tdb != NULL; tdb = tdb->next) if (tdb == target) return TRUE; return FALSE; } #endif /* UNUSED */ void superTrackUi(struct trackDb *superTdb, struct trackDb *tdbList) /* List tracks in this collection, with visibility controls and UI links */ { jsIncludeFile("hui.js",NULL); printf("
"); printf("Tracks that are part of this container are listed below. Use the buttons below to set their visibilities.
"); -printf("\n| \n"); - - printf("Apply visibility: \n"); - printf("\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("\n"); - jsOnEventById("click", "superVizApplyButton", "let newVal = $('#superSubViz').val(); $('#superTrackTable select').filter(function() { return $(this).val() !== 'hide'; }).val(newVal).trigger('change').removeClass('hiddenText').addClass('normalText'); "); - - // Second button: set all selectors to the current value of the top select - printf(" \n"); - jsOnEventById("click", "superVizApplyAllButton", "let newVal = $('#superSubViz').val(); $('#superTrackTable select').val(newVal).trigger('change').removeClass('hiddenText').addClass('normalText');"); - + printf("\n | |||
| ");
+ printf(" "); printf(" | |||
| ");
if (!tdbIsDownloadsOnly(tdb))
{
char id[256];
enum trackVisibility tv =
hTvFromString(cartUsualString(cart, tdb->track,hStringFromTv(tdb->visibility)));
+ // Don't use cheapCgi code... no name and no boolshad... just js
safef(id, sizeof id, "%s_check", tdb->track);
- printf("",
+ printf("",
id, (tv != tvHide?" CHECKED":""));
+ jsOnEventById("change", id, "superT.childChecked(this);");
+
safef(javascript, sizeof(javascript), "superT.selChanged(this)");
struct slPair *event = slPairNew("change", cloneString(javascript));
-
- char *onlyVis = trackDbSetting(tdb, "onlyVisibility");
hTvDropDownClassVisOnlyAndExtra(tdb->track, tv, tdb->canPack,
(tv == tvHide ? "hiddenText":"normalText"),
- onlyVis,
+ trackDbSetting(tdb, "onlyVisibility"),
event);
- // print a group of buttons that act like radiobuttons (see javascript lines below)
- printf(" ", tdb->track);
- char *trackVizStr = hStringFromTv(tv);
-
- // vizList is e.g. {"hide", "dense", "squish", "pack", "full"}, but can be shorter, e.g. when canPack=false
- char **vizList = hTvGetVizArr(tv, tdb->canPack, onlyVis);
- int vizListLen = arrNullLen(vizList);
- for (int i = 0; i < vizListLen; i++) {
- char *buttonViz = vizList[i];
- // the currently active viz mode is an 'active' button = pressed
- if (strcasecmp(buttonViz, trackVizStr) == 0)
- printf(" ");
-
printf(" | \n"); hPrintPennantIcon(tdb); safef(id, sizeof id, "%s_link", tdb->track); - // the | \n"); printf("%s ",tdb->shortLabel); } printf(" | \n"); printf("%s", tdb->longLabel); printf(" "); printDataVersion(database, tdb); //printf(" %s", dataVersion); printf(" |