0f3ca3eaf5792df01b7c600a5428d2d0b2809fcd max Fri Sep 20 13:18:01 2024 -0700 Revert "more features to hubtools: search in both parent and subdirs, better docs" This reverts commit 05e67c59a20a5d00b810a981aef3b00c5bef82e1. diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index fb8d96f..a7fe709 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -8568,57 +8568,30 @@ #ifdef NOTNOW static void printAliases(char *name) /* Print out the aliases for this sequence. */ { struct slName *names = chromAliasFindAliases(name); printf("
Aliases
"); } #endif -void printGlobalTrackControls() { - -puts(""); -puts(""); -puts(""); -hPrintf("\n"); -hDisconnectCentral(&conn); -puts(""); - -jsInline("$(document).ready(function() { $('#hubSelect').selectize()});\n"); -} static void paraLoadTimeoutFunc(int sig) // signal handler for alarm timeout. Tell parallel loads to stop by errAborts // in udcRead { udcReadStopMessage("Parallel read timeout message"); alarm(0); // disable the alarm } unsigned getParaLoadTimeout() // get the parallel load timeout in milliseconds if any { char *cfg = cfgOption("paraLoadTimeout"); if (cfg == NULL) @@ -9246,39 +9219,30 @@ hPrintf("", panel, dyStringCannibalize(&hoverText)); hPrintf("%s", isSessChanged ? "gbSessionChanged" : "", sessionLabel); hPrintf(""); hPrintf(""); jsOnEventById("click", "recTrackSetLabel", "showRecTrackSetsPopup(); return false;"); jsOnEventById("click", "removeSessionPanel", "removeSessionPanel(); return false;"); } hPrintf("
\n"); - char* lastHgvsDb = cartOptionalString(cart, "lastHgvsDb"); - if (lastHgvsDb) - { - char* lastHgvsPos = cartOptionalString(cart, "lastHgvsPos"); - char* lastHgvsTerm = cartOptionalString(cart, "lastHgvsTerm"); - if (lastHgvsPos && lastHgvsTerm) - printf("Variant in Focus: %s, %s
", lastHgvsPos, lastHgvsTerm); - } - /* 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", "return imageV2.navigateButtonClick(this);"); hButtonWithOnClick("hgt.left2", " <<", "Move 47.5% to the left", "return imageV2.navigateButtonClick(this);"); hButtonWithOnClick("hgt.left1", " < ", "Move 10% to the left", "return imageV2.navigateButtonClick(this);"); hButtonWithOnClick("hgt.right1", " > ", "Move 10% to the right", "return imageV2.navigateButtonClick(this);"); hButtonWithOnClick("hgt.right2", ">> ", "Move 47.5% to the right", "return imageV2.navigateButtonClick(this);"); @@ -9586,33 +9550,30 @@ hButtonWithOnClick("hgt.collapseGroups", "Collapse all", "Collapse all track groups", "return vis.expandAllGroups(false)"); hPrintf(""); hPrintf("\n", MAX_CONTROL_COLUMNS - 2); printShortcutButtons(cart, hasCustomTracks, revCmplDisp, multiRegionButtonTop); hPrintf("\n"); hPrintf(""); hButtonWithOnClick("hgt.expandGroups", "Expand all", "Expand all track groups", "return vis.expandAllGroups(true)"); hPrintf(""); - if (cfgOptionBooleanDefault("newTrackControls", FALSE)) - printGlobalTrackControls(); - 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; char *indicatorImg; boolean isOpen = !isCollapsedGroup(group); collapseGroupGoodies(isOpen, TRUE, &indicatorImg, @@ -9986,84 +9947,56 @@ void handlePostscript() /* Deal with Postscript output. */ { struct tempName psTn, ideoPsTn; char *pdfFile = NULL, *ideoPdfFile = NULL; ZeroVar(&ideoPsTn); trashDirFile(&psTn, "hgt", "hgt", ".eps"); if(!trackImgOnly) { printMenuBar(); printf("
\n"); printf("

PDF Output

\n"); - printf("

PDF images can be printed with Acrobat Reader " + printf("PDF images can be printed with Acrobat Reader " "and edited by many drawing programs such as Adobe " - "Illustrator or Inkscape.

"); - printf("

Preview

\n"); + "Illustrator or Inkscape.
"); } - -// user can land at this page from hgTracks, which doesn't set the special variables, or from this page, which sets the special variables -boolean doShowGuides = cartUsualBoolean(cart, "guidelines", TRUE); - -if (cgiVarExists("guidelines_off")) - doShowGuides = FALSE; - -char *guideVal = ""; -if (!doShowGuides) - guideVal = "&guidelines_off=1"; - -printf("

\n", cartSessionVarName(), cartSessionId(cart), guideVal); - -puts("

"); -puts("

\n"); - -char *guideAttr = ""; -if (!doShowGuides) - guideAttr = " checked"; - -//printf("doShowGuides %d, guideVal %s guideAttr %s", doShowGuides, guideVal, guideAttr); - -//if (cartCgiUsualBoolean(cart, "PdfNoGuides", FALSE)) - //cartSetString(cart, "guidelines", "off"); - -printf("
\n", guideAttr); -puts(""); -puts(""); -puts("

\n"); - doTrackForm(psTn.forCgi, &ideoPsTn); -//if (cgiBoolean("PdfNoGuides")) - //cartSetString(cart, "guidelines", "on"); - pdfFile = convertEpsToPdf(psTn.forCgi); -char *svgFile = convertPdfToSvg(pdfFile); - if (strlen(ideoPsTn.forCgi)) ideoPdfFile = convertEpsToPdf(ideoPsTn.forCgi); if (pdfFile != NULL) { - printf("\n", pdfFile); - printf("\n", svgFile); + printf("\n"); freez(&pdfFile); freez(&ideoPdfFile); + printf("EPS (PostScript) output has been discontinued in pursuit of additional features\n"); + printf("that are not PostScript-compatible. If you require PostScript output for your\n"); + printf("workflow, please reach out to us\n"); + printf("and let us know what your needs are - we may be able to help.\n"); + // see redmine #1077 printf("
Tips for producing quality images for publication:
\n"); printf("\n"); printf("
\n"); } @@ -10081,34 +10014,30 @@ if (sameWord(s, "full") || sameWord(s, "on")) rulerMode = tvFull; else if (sameWord(s, "dense")) rulerMode = tvDense; else rulerMode = tvHide; } void setLayoutGlobals() /* Figure out basic dimensions of display. */ { withIdeogram = cartUsualBoolean(cart, "ideogram", TRUE); withLeftLabels = cartUsualBoolean(cart, "leftLabels", TRUE); withCenterLabels = cartUsualBoolean(cart, "centerLabels", TRUE); withGuidelines = cartUsualBoolean(cart, "guidelines", TRUE); - -if (cgiVarExists("guidelines_off")) - withGuidelines = FALSE; - if (!cartUsualBoolean(cart, "hgt.imageV1", FALSE)) { withNextItemArrows = cartUsualBoolean(cart, "nextItemArrows", FALSE); withNextExonArrows = cartUsualBoolean(cart, "nextExonArrows", TRUE); } withExonNumbers = cartUsualBoolean(cart, "exonNumbers", TRUE); emAltHighlight = cartUsualBoolean(cart, "emAltHighlight", FALSE); revCmplDisp = cartUsualBooleanDb(cart, database, REV_CMPL_DISP, FALSE); emPadding = cartUsualInt(cart, "emPadding", emPadding); gmPadding = cartUsualInt(cart, "gmPadding", gmPadding); withPriorityOverride = cartUsualBoolean(cart, configPriorityOverride, FALSE); fullInsideX = trackOffsetX(); fullInsideWidth = tl.picWidth-gfxBorder-fullInsideX; } @@ -10247,74 +10176,47 @@ safef(cartVar, sizeof cartVar, "%s.%s:%ld-%ld#%s", h->db, MULTI_REGION_VIRTUAL_CHROM_NAME, virtStart, virtEnd, h->hexColor); cartSetString(cart, "highlight", cartVar); } else { // erase the highlight cartvar if it has no overlap with the new virt chrom cartRemove(cart, "highlight"); } } } static void setupTimeWarning() /* add javascript that outputs a warning message if page takes too long to load */ { -char *maxTimeStr = cfgOptionDefault("warnSeconds", 0); +char *maxTimeStr = cfgOption("warnSeconds"); if (!maxTimeStr) return; -double maxTime = atof(maxTimeStr); -// this is the code that will be run if document.ready ever fires, so most of the page completes -// and the javascript inline \n"); } void tracksDisplay() /* Put up main tracks display. This routine handles zooming and * scrolling. */ { -setupTimeWarning(); -fflush(stdout); - char titleVar[256]; char *oldPosition = cartUsualString(cart, "oldPosition", ""); boolean findNearest = cartUsualBoolean(cart, "findNearest", FALSE); cartRemove(cart, "findNearest"); boolean positionIsVirt = FALSE; position = getPositionFromCustomTracks(); if (NULL == position) { position = cartGetPosition(cart, database, &lastDbPosCart); if (sameOk(cgiOptionalString("position"), "lastDbPos")) { restoreSavedVirtPosition(); } if (startsWith(OLD_MULTI_REGION_CHROM, position)) @@ -10783,30 +10685,31 @@ cartSetDbPosition(cart, database, lastDbPosCart); if (cartUsualBoolean(cart, "hgt.psOutput", FALSE)) handlePostscript(); else doTrackForm(NULL, NULL); boolean gotExtTools = extToolsEnabled(); setupHotkeys(gotExtTools); if (gotExtTools) printExtMenuData(chromName); if (recTrackSetsEnabled()) printRecTrackSets(); if (exportedDataHubsEnabled()) printExportedDataHubs(database); +setupTimeWarning(); } static void chromInfoTotalRow(int count, long long total, boolean hasAlias) /* Make table row with total number of sequences and size from chromInfo. */ { cgiSimpleTableRowStart(); cgiSimpleTableFieldStart(); printf("Total: %d", count); cgiTableFieldEnd(); cgiTableFieldStartAlignRight(); printLongWithCommas(stdout, total); puts("  "); cgiTableFieldEnd(); if (hasAlias) { @@ -11553,37 +11456,35 @@ jsIncludeFile("ajax.js", NULL); jsIncludeFile("jquery.watermarkinput.js", NULL); if(!searching) { jsIncludeFile("jquery.history.js", NULL); jsIncludeFile("jquery.imgareaselect.js", NULL); } jsIncludeFile("autocomplete.js", NULL); jsIncludeFile("es5-shim.4.0.3.min.js", NULL); jsIncludeFile("es5-sham.4.0.3.min.js", NULL); jsIncludeFile("lodash.3.10.0.compat.min.js", NULL); jsIncludeFile("autocompleteCat.js", NULL); jsIncludeFile("hgTracks.js", NULL); jsIncludeFile("hui.js", NULL); jsIncludeFile("spectrum.min.js", NULL); - jsIncludeFile("selectize.min.js", NULL); #ifdef LOWELAB jsIncludeFile("lowetooltip.js", NULL); #endif///def LOWELAB - webIncludeResourceFile("selectize.default.min.css"); webIncludeResourceFile("spectrum.min.css"); webIncludeResourceFile("jquery-ui.css"); if (enableMouseOver) webIncludeResourceFile("mouseOver.css"); if (!searching) // NOT doing search { webIncludeResourceFile("jquery.contextmenu.css"); jsIncludeFile("jquery.contextmenu.js", NULL); webIncludeResourceFile("ui.dropdownchecklist.css"); jsIncludeFile("ui.dropdownchecklist.js", NULL); jsIncludeFile("ddcl.js", NULL); if (cfgOptionBooleanDefault("showTutorial", TRUE)) { puts("");