7c4930b32e0580573bfc0a8dc37e64e0d49b23db kate Wed May 5 19:54:45 2021 -0700 Code cleanup. refs #27408 diff --git src/hg/hgTables/mainPage.c src/hg/hgTables/mainPage.c index 57037f7..6ad67e9 100644 --- src/hg/hgTables/mainPage.c +++ src/hg/hgTables/mainPage.c @@ -555,78 +555,69 @@ #define HELP_LABEL "Help" static char *stepLabels[] = { "Select dataset", "Define region of interest", "Subset, combine, compare with another track (options)", "Retrieve and display data" }; static char *stepHelp[] = { "Specify the genome, track and data table to be used as the data source.", "Specify whole genome or restrict to a single or set of genomic regions, " "defined by coordinates or identifiers.", -"Press 'create' button and select parameters for desired optional operations", -"Specify output options and press the 'get output' button" +"Press 'create' button and select parameters for desired optional operations.", +"Specify output options and press the 'get output' button." }; static char *stepHelpLinks[] = { "https://genome.ucsc.edu/goldenPath/help/hgTablesHelp.html#GettingStarted", "https://genome.ucsc.edu/goldenPath/help/hgTablesHelp.html#GettingStarted", "https://genome.ucsc.edu/goldenPath/help/hgTablesHelp.html#Filter", "https://genome.ucsc.edu/goldenPath/help/hgTablesHelp.html#OutputFormats" }; static void printStep(int num) /* Print user guidance via steps */ { if (num > STEP_MAX) errAbort("Internal error: table browser help problem"); -hPrintf("<TR height='16px'><TD></TD></TR>"); -hPrintf("<TR><TD>"); -hPrintf(" <div class='tooltip'>"); -hPrintf("<span class='tooltipLabel' style='background: #EFEFEF; padding: 5px;'>" - "<b>%s</b></span>" - , stepLabels[num-1]); -hPrintf("<span class='tooltiptext'>%s" - " <a target='_blank' href='%s'>%s</a>\n", +hPrintf("<tr height='16px'><td></td></tr>"); +hPrintf("<tr><td>"); +hPrintf(" <div class='tbTooltip'>"); +hPrintf("<span class='tbTooltipLabel'><b>%s</b></span>", + stepLabels[num-1]); +hPrintf("<span class='tbTooltiptext'>%s <a target='_blank' href='%s'>%s</a></span>\n", stepHelp[num-1], stepHelpLinks[num-1], HELP_LABEL); -hPrintf("</span></div>"); -hPrintf("</TD></TR>"); -hPrintf("<TR height='6px'><TD></TD></TR>"); -} - -static void printStyle() -{ -hPrintf("<STYLE>"); -hPrintf("</STYLE>"); +hPrintf("</div>"); +hPrintf("</td></tr>"); +hPrintf("<tr height='6px'><td></td></tr>"); } void showMainControlTable(struct sqlConnection *conn) /* Put up table with main controls for main page. */ { struct grp *selGroup; boolean isWig = FALSE, isPositional = FALSE, isMaf = FALSE, isBedGr = FALSE, isChromGraphCt = FALSE, isPal = FALSE, isArray = FALSE, isBam = FALSE, isVcf = FALSE, isHalSnake = FALSE, isLongTabix = FALSE, isHic = FALSE; boolean gotClade = hGotClade(); struct hTableInfo *hti = NULL; -printStyle(); hPrintf("<TABLE BORDER=0>\n"); int stepNumber = 1; printStep(stepNumber++); /* Print clade, genome and assembly line. */ { if (gotClade) { hPrintf("<TR><TD><B>clade:</B>\n"); printCladeListHtml(hGenome(database), "change", onChangeClade()); nbSpaces(3); hPrintf("<B>genome:</B>\n"); printGenomeListForCladeHtml(database, "change", onChangeOrg()); @@ -646,34 +637,32 @@ { hPrintf("<TR><TD>"); selGroup = showGroupField(hgtaGroup, "change", onChangeGroupOrTrack(), conn, hAllowAllTables()); nbSpaces(3); curTrack = showTrackField(selGroup, hgtaTrack, "change", onChangeGroupOrTrack(), FALSE); nbSpaces(3); hPrintf("</TD></TR>\n"); } /* Print table line. */ { hPrintf("<TR><TD>"); curTable = showTableField(curTrack, hgtaTable, TRUE); if (isHubTrack(curTable) || (strchr(curTable, '.') == NULL)) /* In same database */ { - hti = getHti(database, curTable, conn); - isPositional = htiIsPositional(hti); - } - isLongTabix = isLongTabixTable( curTable); + hti = getHti(database, curTable, conn); isPositional = htiIsPositional(hti); + } isLongTabix = isLongTabixTable( curTable); isBam = isBamTable(curTable); isHic = isHicTable(curTable); isVcf = isVcfTable(curTable, NULL); isWig = isWiggle(database, curTable); if (isBigWigTable(curTable)) { isPositional = TRUE; isWig = TRUE; } isHalSnake = isHalTable( curTable); isMaf = isMafTable(database, curTrack, curTable); isBedGr = isBedGraph(curTable); isArray = isMicroarray(curTrack, curTable); struct trackDb *tdb = findTdbForTable(database, curTrack, curTable, ctLookupName); isPal = isPalCompatible(conn, tdb, curTable); @@ -1107,22 +1096,22 @@ static char *saveVars[] = { "clade", "org", "db", hgtaGroup, hgtaTrack, hgtaTable, hgtaRegionType, hgtaRange, hgtaOutputType, hgtaOutFileName}; jsCreateHiddenForm(cart, getScriptName(), saveVars, ArraySize(saveVars)); } webNewSection("<A NAME=\"Help\"></A>Using the Table Browser\n"); printMainHelp(); cartFlushHubWarnings(); } void doMainPage(struct sqlConnection *conn) /* Put up the first page user sees. */ { htmlOpen("Table Browser"); -webIncludeResourceFile("jquery-ui.css"); +//webIncludeResourceFile("jquery-ui.css"); mainPageAfterOpen(conn); htmlClose(); }