e0e5b9a1895ba717a40da8d979c5d917189a02a1 kate Fri Apr 30 09:22:25 2021 -0700 Second cut TF facelift, based on feedback from JK, Key features: 1) Short help messages in pop-ups on each step. 2) Remove step numbers and instead distinguish steps with styling 3) Save vertical space (keep 'get output' button above fold). refs #27408 diff --git src/hg/hgTables/mainPage.c src/hg/hgTables/mainPage.c index 900ae87..ef9ce24 100644 --- src/hg/hgTables/mainPage.c +++ src/hg/hgTables/mainPage.c @@ -546,65 +546,87 @@ { int i; for (i=0; i STEP_MAX) errAbort("Internal error: table browser help problem"); -hPrintf(" "); +hPrintf(""); hPrintf(""); -hPrintf("Step %d: %s    %s\n", - num, stepLabels[num-1], stepHelpLinks[num-1], HELP_LABEL); +hPrintf("
"); +hPrintf("" + "%s" + , stepLabels[num-1]); +hPrintf("%s" + " %s\n", + stepHelp[num-1], stepHelpLinks[num-1], HELP_LABEL); +hPrintf("
"); hPrintf(""); -hPrintf(" "); +hPrintf(""); +} + +static void printStyle() +{ +hPrintf(""); } 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("\n"); int stepNumber = 1; printStep(stepNumber++); /* Print clade, genome and assembly line. */ { if (gotClade) { hPrintf("\n"); } } -/* microarray options */ /* button for option page here (median/log-ratio, etc) */ printStep(stepNumber++); /* Filter line. */ { hPrintf("
clade:\n"); printCladeListHtml(hGenome(database), "change", onChangeClade()); nbSpaces(3); hPrintf("genome:\n"); printGenomeListForCladeHtml(database, "change", onChangeOrg()); @@ -795,31 +817,30 @@ if (!isWig && getIdField(database, curTrack, curTable, hti) != NULL) { hPrintf("
identifiers (names/accessions):\n"); cgiMakeButton(hgtaDoPasteIdentifiers, "paste list"); hPrintf(" "); cgiMakeButton(hgtaDoUploadIdentifiers, "upload list"); if (identifierFileName() != NULL) { hPrintf(" "); cgiMakeButton(hgtaDoClearIdentifiers, "clear list"); } hPrintf("
filter:\n"); if (anyFilter()) { cgiMakeButton(hgtaDoFilterPage, "edit"); hPrintf(" "); cgiMakeButton(hgtaDoClearFilter, "clear"); if (isWig || isBedGr) wigShowFilter(conn); } @@ -1007,53 +1028,74 @@ return "Send data to " "GenomeSpace for use with diverse computational tools. "; } else { return ""; } } void mainPageAfterOpen(struct sqlConnection *conn) /* Put up main page assuming htmlOpen()/htmlClose() * will happen in calling routine. */ { hPrintf( - "Use this program to retrieve the data associated with a track in text " + "Use this program to retrieve data associated with a track in text " "format, to calculate intersections between tracks, and to retrieve " - "DNA sequence covered by a track. For help in using this application " + "DNA sequence covered by a track." +); +hPrintf(" More..."); +hPrintf( + "" , getGenomeSpaceText() ); +hPrintf(" "); + +// Show more or less intro text +char jsText[1024]; +safef(jsText, sizeof jsText, + "$('#tbHelpMore').hide();" + "$('#tbHelp').show();" + "$('#tbHelpLess').show();" + ); +jsOnEventById("click", "tbHelpMore", jsText); +safef(jsText, sizeof jsText, + "$('#tbHelpMore').show();" + "$('#tbHelp').hide();" + "$('#tbHelpLess').hide();" + ); +jsOnEventById("click", "tbHelpLess", jsText); // When GREAT is selected, disable the other checkboxes and force output to BED jsInline( "function onSelectGreat() {\n" " document.getElementById('checkboxGalaxy').checked=false;\n"); if (isGenomeSpaceEnabled()) jsInline( " document.getElementById('checkboxGenomeSpace').checked=false;\n"); jsInline( " document.getElementById('outBed').selected=true;\n" " return true;\n" "}\n"); // Disable/enable noGenome tracks depending on whether region is genome. jsInline( @@ -1093,19 +1135,22 @@ /* Hidden form for jumping to track hub manager CGI. */ hPrintf("
", hgHubConnectName()); cartSaveSession(cart); hPrintf("
\n"); webNewSection("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"); mainPageAfterOpen(conn); htmlClose(); } + +