8125e1ea14a9c8b3ab7e6ad879c82c757a539243 gperez2 Fri Jun 14 17:40:32 2024 -0700 Switching hgTracks buttons and labels to sentence case, refs #25787 diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index fdf1595..d78d446 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -8371,33 +8371,33 @@ boolean isSessChanged = FALSE; if (differentString(curSessVisTracks, thisSessVisTracks)) { isSessChanged = TRUE; } return isSessChanged; } static void printMultiRegionButton() /* Print button that launches multi-region configuration pop-up */ { boolean isPressed = FALSE; if (differentString(virtModeType, "default")) isPressed = TRUE; char buf[256]; -safef(buf, sizeof buf, "configure %s multi-region display mode", +safef(buf, sizeof buf, "Configure %s multi-region display mode", isPressed ? "or exit" : ""); -hButtonNoSubmitMaybePressed("hgTracksConfigMultiRegionPage", "multi-region", buf, +hButtonNoSubmitMaybePressed("hgTracksConfigMultiRegionPage", "Multi-region", buf, "popUpHgt.hgTracks('multi-region config'); return false;", isPressed); } static void printTrackDelIcon(struct track *track) /* little track icon after track name. Github uses SVG elements for all icons, apparently that is faster */ /* we probably should have a library with all the icons, at least for the part */ { hPrintf("
", track->track); } static void printTrackLink(struct track *track) /* print a link hgTrackUi with shortLabel and various icons and mouseOvers */ { if (sameOk(track->groupName, "user")) @@ -8471,58 +8471,58 @@ puts(html); } void printShortcutButtons(struct cart *cart, bool hasCustomTracks, bool revCmplDisp, bool multiRegionButtonTop) /* Display bottom control panel. */ { if (isSearchTracksSupported(database,cart)) { cgiMakeButtonWithMsg(TRACK_SEARCH, TRACK_SEARCH_BUTTON,TRACK_SEARCH_HINT); } hPrintf(" "); // Not a submit button, because this is not a CGI function, it only calls Javascript function hPrintf(""); + "then m'>Highlight"); jsInlineF("$('#highlightThis').click( function(ev) { highlightCurrentPosition('add'); return false; } );"); hPrintf(" "); -hButtonWithMsg("hgt.hideAll", "hide all","Hide all currently visible tracks - keyboard shortcut: h, then a"); +hButtonWithMsg("hgt.hideAll", "Hide all","Hide all currently visible tracks - keyboard shortcut: h, then a"); hPrintf(" "); hPrintf("", hasCustomTracks ? CT_MANAGE_BUTTON_LABEL : CT_ADD_BUTTON_LABEL, hasCustomTracks ? "Manage your custom tracks - keyboard shortcut: c, then t" : "Add your own custom tracks - keyboard shortcut: c, then t"); jsOnEventById("click", "ct_add", "document.customTrackForm.submit(); return false;"); hPrintf(" "); -hButtonWithMsg("hgTracksConfigPage", "configure","Configure image and track selection - keyboard shortcut: c, then f"); +hButtonWithMsg("hgTracksConfigPage", "Configure","Configure image and track selection - keyboard shortcut: c, then f"); hPrintf(" "); if (!multiRegionButtonTop) { printMultiRegionButton(); hPrintf(" "); } -hButtonMaybePressed("hgt.toggleRevCmplDisp", "reverse", +hButtonMaybePressed("hgt.toggleRevCmplDisp", "Reverse", revCmplDisp ? "Show forward strand at this location - keyboard shortcut: r, then v" : "Show reverse strand at this location - keyboard shortcut: r, then v", NULL, revCmplDisp); hPrintf(" "); -hButtonWithOnClick("hgt.setWidth", "resize", "Resize image width to browser window size - keyboard shortcut: r, then s", "hgTracksSetWidth()"); +hButtonWithOnClick("hgt.setWidth", "Resize", "Resize image width to browser window size - keyboard shortcut: r, then s", "hgTracksSetWidth()"); // put the track download interface behind hg.conf control if (cfgOptionBooleanDefault("showDownloadUi", FALSE)) jsInline("var showDownloadButton = true;\n"); } void doTrackForm(char *psOutput, struct tempName *ideoTn) /* Make the tracks display form with the zoom/scroll buttons and the active * image. If the ideoTn parameter is not NULL, it is filled in if the * ideogram is created. */ { int disconCount = 0; struct group *group; struct track *track; @@ -9113,50 +9113,50 @@ "style='margin-right: 3px;'>%s", isSessChanged ? "gbSessionChanged" : "", sessionLabel); hPrintf(""); hPrintf(""); jsOnEventById("click", "recTrackSetLabel", "showRecTrackSetsPopup(); return false;"); jsOnEventById("click", "removeSessionPanel", "removeSessionPanel(); return false;"); } hPrintf("
\n"); /* This is a clear submit button that browsers will use by default when enter is pressed in position box. */ hPrintf(""); /* Put up scroll and zoom controls. */ #ifndef USE_NAVIGATION_LINKS - hWrites("move "); - hButtonWithOnClick("hgt.left3", "<<<", "move 95% to the left", + hWrites("Move "); + hButtonWithOnClick("hgt.left3", "<<<", "Move 95% to the left", "return imageV2.navigateButtonClick(this);"); - hButtonWithOnClick("hgt.left2", " <<", "move 47.5% to the left", + hButtonWithOnClick("hgt.left2", " <<", "Move 47.5% to the left", "return imageV2.navigateButtonClick(this);"); - hButtonWithOnClick("hgt.left1", " < ", "move 10% to the left", + hButtonWithOnClick("hgt.left1", " < ", "Move 10% to the left", "return imageV2.navigateButtonClick(this);"); - hButtonWithOnClick("hgt.right1", " > ", "move 10% to the right", + hButtonWithOnClick("hgt.right1", " > ", "Move 10% to the right", "return imageV2.navigateButtonClick(this);"); - hButtonWithOnClick("hgt.right2", ">> ", "move 47.5% to the right", + hButtonWithOnClick("hgt.right2", ">> ", "Move 47.5% to the right", "return imageV2.navigateButtonClick(this);"); - hButtonWithOnClick("hgt.right3", ">>>", "move 95% to the right", + hButtonWithOnClick("hgt.right3", ">>>", "Move 95% to the right", "return imageV2.navigateButtonClick(this);"); - hWrites(" zoom in "); + hWrites(" Zoom in "); /* use button maker that determines padding, so we can share constants */ topButton("hgt.in1", ZOOM_1PT5X); topButton("hgt.in2", ZOOM_3X); topButton("hgt.in3", ZOOM_10X); topButton("hgt.inBase", ZOOM_BASE); - hWrites(" zoom out "); + hWrites(" Zoom out "); topButton("hgt.out1", ZOOM_1PT5X); topButton("hgt.out2", ZOOM_3X); topButton("hgt.out3", ZOOM_10X); topButton("hgt.out4", ZOOM_100X); hWrites("
\n"); #endif//ndef USE_NAVIGATION_LINKS if (showTrackControls) { /* Break into a second form so that zooming and scrolling * can be done with a 'GET' so that user can back up from details * page without Internet Explorer popping up an annoying dialog. * Do rest of page as a 'POST' so that the ultra-long URL from * all the track controls doesn't break things. IE URL limit * is 2000 bytes, but some firewalls impose a ~1000 byte limit. @@ -9367,57 +9367,57 @@ printTrackTiming(); } return; } if (!hideControls) { struct controlGrid *cg = NULL; /* note a trick of WIDTH=27 going on here. The 6,15,6 widths following * go along with this trick */ hPrintf("\n", tl.picWidth, 27); #ifndef USE_NAVIGATION_LINKS hPrintf(""); hPrintf("\n"); #endif//ndef USE_NAVIGATION_LINKS hPrintf(""); #ifndef USE_NAVIGATION_LINKS hPrintf("\n"); hPrintf(""); #endif//ndef USE_NAVIGATION_LINKS hPrintf("
"); - hPrintf("move start
"); - hButtonWithOnClick("hgt.dinkLL", " < ", "move start position to the left", + hPrintf("Move start
"); + hButtonWithOnClick("hgt.dinkLL", " < ", "Move start position to the left", "return imageV2.navigateButtonClick(this);"); hTextVar("dinkL", cartUsualString(cart, "dinkL", "2.0"), 3); - hButtonWithOnClick("hgt.dinkLR", " > ", "move start position to the right", + hButtonWithOnClick("hgt.dinkLR", " > ", "Move start position to the right", "return imageV2.navigateButtonClick(this);"); hPrintf("
 "); // allow this text to wrap hWrites("Click on a feature for details. "); hWrites("Shift+click+drag to zoom in. "); hWrites("Click grey side bars for track options. "); hWrites("Drag side bars or labels up or down to reorder tracks. "); hWrites("Drag tracks left or right to new position. "); hWrites("Press \"?\" for keyboard shortcuts. "); hWrites("Use drop-down controls below and press refresh to alter tracks displayed. "); hPrintf(" "); - hPrintf("move end
"); - hButtonWithOnClick("hgt.dinkRL", " < ", "move end position to the left", + hPrintf("Move end
"); + hButtonWithOnClick("hgt.dinkRL", " < ", "Move end position to the left", "return imageV2.navigateButtonClick(this);"); hTextVar("dinkR", cartUsualString(cart, "dinkR", "2.0"), 3); - hButtonWithOnClick("hgt.dinkRR", " > ", "move end position to the right", + hButtonWithOnClick("hgt.dinkRR", " > ", "Move end position to the right", "return imageV2.navigateButtonClick(this);"); hPrintf("
\n"); if( chromosomeColorsMade ) { hPrintf("Chromosome Color Key:
"); hPrintf("
\n"); } if (doPliColors) { hPrintf("gnomAD Loss-of-Function Constraint (LOEUF) Color Key:
"); hPrintf("\n"); @@ -9431,41 +9431,41 @@ hPrintf("\n"); hPrintf("\n"); hPrintf("\n"); hPrintf("\n"); hPrintf("
< 0.8< 0.9≥ 0.9No LOEUF score
\n"); } if (showTrackControls) { /* Display viewing options for each track. */ /* Chuck: This is going to be wrapped in a table so that * the controls don't wrap around randomly */ hPrintf("\n"); hPrintf(""); hPrintf("\n"); hPrintf(""); cg = startControlGrid(MAX_CONTROL_COLUMNS, "left"); struct hash *superHash = hashNew(8); for (group = groupList; group != NULL; group = group->next) { if ((group->trackList == NULL) && (group->errMessage == NULL)) continue; struct trackRef *tr; /* check if group section should be displayed */ char *otherState; char *indicator; @@ -9522,31 +9522,31 @@ else hPrintf("Info  ", hub->descriptionUrl); } safef(idText, sizeof idText, "%s_%d_disconn", hubName, disconCount); disconCount++; hPrintf("\n", idText); jsOnEventByIdF("click", idText, "document.disconnectHubForm.elements['hubId'].value='%s';" "document.disconnectHubForm.submit();return true;", hubName + strlen(hubTrackPrefix)); } - hPrintf("\n"); hPrintf("
\n"); - hButtonWithOnClick("hgt.collapseGroups", "collapse all", "collapse all track groups", + hButtonWithOnClick("hgt.collapseGroups", "Collapse all", "Collapse all track groups", "return vis.expandAllGroups(false)"); hPrintf("\n", MAX_CONTROL_COLUMNS - 2); printShortcutButtons(cart, hasCustomTracks, revCmplDisp, multiRegionButtonTop); hPrintf(""); - hButtonWithOnClick("hgt.expandGroups", "expand all", "expand all track groups", + hButtonWithOnClick("hgt.expandGroups", "Expand all", "Expand all track groups", "return vis.expandAllGroups(true)"); hPrintf("
\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); hPrintf("", url); hPrintf(" %s
", RULER_TRACK_LABEL); hPrintf("
"); hDropListClassWithStyle("ruler", rulerMenu, sizeof(rulerMenu)/sizeof(char *), rulerMenu[rulerMode], @@ -9602,31 +9602,31 @@ /* now finish out the table */ if (group->next != NULL) controlGridEndRow(cg); } hashFree(&superHash); endControlGrid(&cg); } if (measureTiming) printTrackTiming(); hPrintf("\n"); } if (showTrackControls) - hButton("hgt.refresh", "refresh"); + hButton("hgt.refresh", "Refresh"); if (sameString(database, "wuhCor1")) { puts("

\n" "For information about this browser and related resources, see " "COVID-19 Research at UCSC.

"); // GISAID wants this displayed on any page that shows any GISAID data puts("

\n" "GISAID data displayed in the Genome Browser are subject to GISAID's\n" "Terms and Conditions.\n" "SARS-CoV-2 genome sequences and metadata are available for download from\n" "GISAID EpiCoV™.\n" "

"); }