ff3dcac9269104df22c3b06fe44556f71bcae0c3 gperez2 Thu Jun 20 17:30:01 2024 -0700 Switching the Advanced track search page, View chromosomes page, hgConvert, hgCustom, hgGateway, hgLiftOver, hgPcr, hgSession, hgTracks, and hgCustom labels/buttons to sentence case, refs #25787 diff --git src/hg/hgSession/hgSession.c src/hg/hgSession/hgSession.c index 84510a3..5b46b39 100644 --- src/hg/hgSession/hgSession.c +++ src/hg/hgSession/hgSession.c @@ -311,38 +311,38 @@ "$(document).ready(function () {\n" " $('#sessionTable').DataTable({\"columnDefs\": [{\"orderable\":false, \"targets\":[0,4,5,6,7,8]}],\n" " \"order\":[2,'desc'],\n" " \"stateSave\":true,\n" " \"stateSaveCallback\": %s,\n" " \"stateLoadCallback\": %s\n" " });\n" "} );\n" "}\n" , jsDataTableStateSave(hgSessionPrefix), jsDataTableStateLoad(hgSessionPrefix, cart)); printf("<H3>My Sessions</H3>\n"); printf("<div style=\"max-width:1024px\">"); printf("<table id=\"sessionTable\" class=\"sessionTable stripe hover row-border compact\" borderwidth=0>\n"); printf("<thead><tr>"); -printf("<TH><TD><B>session name (click to load)</B></TD>" - "<TD><B>created on</B></TD><TD><b>view count</b></TD>" - "<td><b>assembly</b></td>" - "<TD align=center><B>view/edit <BR>details </B></TD>" - "<TD align=center><B>delete this <BR>session </B></TD>" - "<TD align=center><B>share with <BR>others? </B></TD>" - "<td align-center><b>post in <br><a href=\"../cgi-bin/hgPublicSessions?%s\">public listing</a>?</b></td>" - "<TD align=center><B>send to<BR>mail</B></TD></TH>", +printf("<TH><TD><B>Session name (click to load)</B></TD>" + "<TD><B>Created on</B></TD><TD><b>View count</b></TD>" + "<td><b>Assembly</b></td>" + "<TD align=center><B>View/edit <BR>details </B></TD>" + "<TD align=center><B>Delete this <BR>session </B></TD>" + "<TD align=center><B>Share with <BR>others? </B></TD>" + "<td align-center><b>Post in <br><a href=\"../cgi-bin/hgPublicSessions?%s\">public listing</a>?</b></td>" + "<TD align=center><B>Send to<BR>mail</B></TD></TH>", cartSidUrlString(cart)); printf("</tr></thead>"); printf("<tbody>\n"); if (gotSettings) sqlSafef(query, sizeof(query), "SELECT sessionName, shared, firstUse, useCount, contents, settings from %s " "WHERE userName = '%s' ORDER BY sessionName;", namedSessionTable, encUserName); else sqlSafef(query, sizeof(query), "SELECT sessionName, shared, firstUse, useCount, contents from %s " "WHERE userName = '%s' ORDER BY sessionName;", namedSessionTable, encUserName); sr = sqlGetResult(conn, query); int rowIdx = 0; @@ -456,35 +456,35 @@ printf("</TABLE>\n"); printf("</div>\n"); printf("<P></P>\n"); sqlFreeResult(&sr); hDisconnectCentral(&conn); return existingSessionNames; } void showOtherUserOptions() /* Print out inputs for loading another user's saved session. */ { printf("<TABLE BORDERWIDTH=0>\n"); printf("<TR><TD colspan=2>" "Use settings from another user's saved session:</TD></TR>\n" - "<TR><TD> </TD><TD>user: \n"); + "<TR><TD> </TD><TD>User: \n"); cgiMakeOnKeypressTextVar(hgsOtherUserName, cartUsualString(cart, hgsOtherUserName, ""), 20, "return noSubmitOnEnter(event);"); -printf(" session name: \n"); +printf(" Session name: \n"); cgiMakeOnKeypressTextVar(hgsOtherUserSessionName, cartUsualString(cart, hgsOtherUserSessionName, ""), 20, jsPressOnEnter(hgsDoOtherUser)); printf(" "); cgiMakeButton(hgsDoOtherUser, "Submit"); printf("</TD></TR>\n"); printf("<TR><TD colspan=2></TD></TR>\n"); printf("</TABLE>\n"); } void showLoadingOptions(char *userName, boolean savedSessionsSupported) /* Show options for loading settings from another user's session, a file * or URL. */ { printf("<H3>Restore Settings</H3>\n"); @@ -543,77 +543,77 @@ if (isNotEmpty(exceptName)) dyStringAppend(js, " }"); return js; } void showSavingOptions(char *userName, struct slName *existingSessionNames) /* Show options for saving a new named session in our db or to a file. */ { printf("<H3>Save Settings</H3>\n"); printf("<TABLE BORDERWIDTH=0>\n"); if (isNotEmpty(userName)) { printf("<TR><TD colspan=4>Save current settings as named session:" "</TD></TR>\n" - "<TR><TD> </TD><TD>name:</TD><TD>\n"); + "<TR><TD> </TD><TD>Name:</TD><TD>\n"); cgiMakeOnKeypressTextVar(hgsNewSessionName, hubConnectSkipHubPrefix(cartUsualString(cart, "db", "mySession")), 20, jsPressOnEnter(hgsDoNewSession)); printf(" "); cgiMakeCheckBox(hgsNewSessionShare, cartUsualBoolean(cart, hgsNewSessionShare, TRUE)); - printf("allow this session to be loaded by others\n"); + printf("Allow this session to be loaded by others\n"); printf("</TD><TD>"); printf(" "); if (existingSessionNames) { struct dyString *js = dyPrintCheckExistingSessionJs(existingSessionNames, NULL); cgiMakeOnClickSubmitButton(js->string, hgsDoNewSession, "Submit"); dyStringFree(&js); } else cgiMakeButton(hgsDoNewSession, "submit"); printf("</TD></TR>\n"); printf("<TR><TD colspan=4></TD></TR>\n"); } printf("<TR><TD colspan=4>Save current settings to a local file:</TD></TR>\n"); -printf("<TR><TD> </TD><TD>file:</TD><TD>\n"); +printf("<TR><TD> </TD><TD>File:</TD><TD>\n"); cgiMakeOnKeypressTextVar(hgsSaveLocalFileName, cartUsualString(cart, hgsSaveLocalFileName, ""), 20, jsPressOnEnter(hgsDoSaveLocal)); printf(" "); -printf("file type returned: "); +printf("File type returned: "); char *compressType = cartUsualString(cart, hgsSaveLocalFileCompress, textOutCompressNone); cgiMakeRadioButton(hgsSaveLocalFileCompress, textOutCompressNone, differentWord(textOutCompressGzip, compressType)); printf(" plain text  "); cgiMakeRadioButton(hgsSaveLocalFileCompress, textOutCompressGzip, sameWord(textOutCompressGzip, compressType)); printf(" gzip compressed (ignored if output file is blank)"); printf("</TD><TD>"); printf(" "); cgiMakeButton(hgsDoSaveLocal, "Submit"); printf("</TD></TR>\n"); printf("<TR><TD></TD><TD colspan=3>(leave file blank to get output in " "browser window)</TD></TR>\n"); printf("<TR><TD colspan=4></TD></TR>\n"); printf("<TR><TD colspan=4>Save Custom Tracks:</TD></TR>\n"); printf("<TR><TD> </TD><TD colspan=2>"); -printf("back up custom tracks to archive .tar.gz</TD>"); +printf("Back up custom tracks to archive .tar.gz</TD>"); printf("<TD>"); printf(" "); cgiMakeButton(hgsShowDownloadPrefix, "Submit"); printf("</TD></TR>\n"); printf("<TR><TD colspan=4></TD></TR>\n"); printf("</TABLE>\n"); } void showSessionControls(char *userName, boolean savedSessionsSupported, boolean webStarted) /* If userName is non-null, show sessions that belong to user and allow * saving of named sessions. * If savedSessionsSupported, allow import of named sessions. * Allow export/import of settings from file/URL. */ @@ -1137,32 +1137,32 @@ " d.checked = false; }" dyStringPrintf(dyMessage, "<B>%s</B><P>\n" "<FORM ACTION=\"%s\" NAME=\"detailForm\" METHOD=GET>\n" "<INPUT TYPE=HIDDEN NAME=\"%s\" VALUE=%s>" "<INPUT TYPE=HIDDEN NAME=\"%s\" VALUE=\"%s\">" "Session Name: " "<INPUT TYPE=TEXT NAME=\"%s\" id='%s' SIZE=%d VALUE=\"%s\" >\n", sessionName, hgSessionName(), cartSessionVarName(cart), cartSessionId(cart), hgsOldSessionName, sessionName, hgsNewSessionName, hgsNewSessionName, 32, sessionName); jsOnEventById("change" , hgsNewSessionName, highlightAccChanges); jsOnEventById("keydown", hgsNewSessionName, highlightAccChanges); dyStringPrintf(dyMessage, - " <INPUT TYPE=SUBMIT ID=\"%s\" NAME=\"%s\" VALUE=\"accept changes\">" - " <INPUT TYPE=SUBMIT NAME=\"%s\" VALUE=\"cancel\"> " + " <INPUT TYPE=SUBMIT ID=\"%s\" NAME=\"%s\" VALUE=\"Accept changes\">" + " <INPUT TYPE=SUBMIT NAME=\"%s\" VALUE=\"Cancel\"> " "<BR>\n", hgsDoSessionChange, hgsDoSessionChange, hgsCancel); struct slName *existingSessionNames = getUserSessionNames(encUserName); struct dyString *checkExistingNameJs = dyPrintCheckExistingSessionJs( existingSessionNames, sessionName); struct dyString *onClickJs = dyStringCreate( "var pattern = /^\\s*$/;" "if (document.getElementById(\"detailsGalleryCheckbox\").checked &&" " pattern.test(document.getElementById(\"%s\").value)) {" " warn('Please add a description to allow this session to be included in the Public Gallery');" " event.preventDefault();" "} else {" " %s" "}", hgsNewSessionDescription, checkExistingNameJs->string); jsOnEventById("click", hgsDoSessionChange, onClickJs->string);