9d2d19a718d8c3d99f5d73ab1a16283d2fa39c9b
max
  Mon Sep 15 03:57:22 2025 -0700
adding a hide all button to hub group blue bars, refs #36354

diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c
index bef64859afc..da8b2801486 100644
--- src/hg/hgTracks/hgTracks.c
+++ src/hg/hgTracks/hgTracks.c
@@ -9662,40 +9662,47 @@
                         hPrintf("This link leads to our documentation page about the descriptionUrl statement in hub.txt. ");
                         hPrintf("' href='../goldenPath/help/hgTrackHubHelp.html#hub.txt' "
                                 "style='color:#FFF; font-size: 13px;' target=_blank>No Info</a>");
                         }
                     else
                         {
                         hPrintf("<a title='Link to documentation about this track hub, provided by the track hub authors (not UCSC). ");
                         if (hub->email)
                             hPrintf("The authors can be reached at %s", hub->email);
                         hPrintf("' href='%s' "
                             "style='color:#FFF; font-size: 13px;' target=_blank>Info</a>", hub->descriptionUrl);
                         }
                     hPrintf("&nbsp;&nbsp;");
                     }
 
+                hPrintf("<button type='button' class=\"hgtButtonHideGroup\" data-group-name=\"%s\" "
+                        "title='Hide all tracks in this group'>Hide all</button>&nbsp;",
+                        group->name);
+
 		safef(idText, sizeof idText, "%s_%d_disconn", hubName, disconCount);
                 disconCount++;
                 hPrintf("<input name=\"hubDisconnectButton\" id='%s'"
                     " type=\"button\" value=\"Disconnect\">\n", idText);
 		jsOnEventByIdF("click", idText,
                     "document.disconnectHubForm.elements['hubId'].value='%s';"
                     "document.disconnectHubForm.submit();return true;",
 		    hubName + strlen(hubTrackPrefix));
+
 		}
 
+
+
             hPrintf("<input type='submit' name='hgt.refresh' value='Refresh' "
                     "title='Update image with your changes'>\n");
             hPrintf("</td></tr></table></th>\n");
             controlGridEndRow(cg);
 
             /* Base Position track goes into map group, which will always exist. */
             if (!showedRuler && sameString(group->name, "map") )
 		{
 		char *url = trackUrl(RULER_TRACK_NAME, chromName);
 		showedRuler = TRUE;
 		myControlGridStartCell(cg, isOpen, group->name, FALSE);
 		hPrintf("<A HREF=\"%s\">", url);
 		hPrintf(" %s<BR> ", RULER_TRACK_LABEL);
 		hPrintf("</A>");
 		hDropListClassWithStyle("ruler", rulerMenu,
@@ -9746,30 +9753,32 @@
                         }
                     }
 		else
 		    /* If track is not on this chrom print an informational
 		    message for the user. */
 		    hPrintf("[No data-%s]", chromName);
 		controlGridEndCell(cg);
 		}
 
 	    /* now finish out the table */
 	    if (group->next != NULL)
 		controlGridEndRow(cg);
 	    }
         hashFree(&superHash);
 	endControlGrid(&cg);
+
+        jsOnEventBySelector(".hgtButtonHideGroup", "click", "onHideAllGroupButtonClick(event)");
 	}
 
     if (measureTiming)
         printTrackTiming();
 
     hPrintf("</DIV>\n");
     }
 if (showTrackControls)
     hButton("hgt.refresh", "Refresh");
 
 if (sameString(database, "wuhCor1"))
     {
     puts("<p class='centeredCol'>\n"
          "For information about this browser and related resources, see "
          "<a target='blank' href='../covid19.html'>COVID-19 Research at UCSC</a>.</p>");