fb761d3895124a6052c3a71102eac03f9235f990 max Fri Jun 25 03:52:26 2021 -0700 moving the udcTimeout message to a notification box, refs #27677 diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index a6e0433..9f1ba6f 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -10623,30 +10623,40 @@ // Add region only if it is not already in the existing highlight setting. char *alreadyIn = strstr(existing, newHighlight); int len = strlen(newHighlight); if (! (alreadyIn && (alreadyIn[len] == '|' || alreadyIn[len] == '\0'))) { struct dyString *dy = dyStringCreate("%s|%s", newHighlight, existing); cartSetString(cart, "highlight", dy->string); } } else cartSetString(cart, "highlight", newHighlight); cartRemove(cart, "addHighlight"); } } +void notify (char *msg) +/* print a message into a hidden DIV tag, and call Javascript to move the DIV under the + * tableHeaderForm element and un-hide it. Less obtrusive than a warn() message but still hard to miss. */ +{ +puts(""); +jsInline("notifBoxShow();\n"); +} + extern boolean issueBotWarning; void doMiddle(struct cart *theCart) /* Print the body of an html file. */ { cart = theCart; measureTiming = hPrintStatus() && isNotEmpty(cartOptionalString(cart, "measureTiming")); if (measureTiming) measureTime("Startup (bottleneck %d ms) ", botDelayMillis); char *mouseOverEnabled = cfgOption("mouseOverEnabled"); if (sameWordOk(mouseOverEnabled, "on")) { /* can not use mouseOver in any virtual mode */ char *isMultiRegion = cartUsualString(cart, "virtModeType", "default"); @@ -10896,35 +10906,36 @@ dyStringPrintf(dy, "window.browserTextSize=%s;\n", tl.textSize); dyStringPrintf(dy, "window.mouseOverEnabled=true;\n"); } else { dyStringPrintf(dy, "window.mouseOverEnabled=false;\n"); } jsInline(dy->string); dyStringFree(&dy); if (measureTiming) measureTime("Time at end of doMiddle, next up cart write"); if (cartOptionalString(cart, "udcTimeout")) { - warn("The Genome Browser cart currently includes the \"udcTimeout\" string. " - "While this is useful for debugging hubs, it may negatively impact " - "performance. To turn this off, click " + char buf[5000]; + safef(buf, sizeof(buf), "A \"udcTimeout\" setting is active. " + "This is useful when developing hubs, but it reduces " + "performance. To clear the setting, click " "here.",cartSessionId(cart)); - } + notify(buf); } void labelTrackAsFilteredNumber(struct track *tg, unsigned numOut) /* add text to track long label to indicate filter is active */ { tg->longLabel = labelAsFilteredNumber(tg->longLabel, numOut); } void labelTrackAsFiltered(struct track *tg) /* add text to track long label to indicate filter is active */ { tg->longLabel = labelAsFiltered(tg->longLabel); // also label parent composite track filtered struct trackDb *parentTdb = tdbGetComposite(tg->tdb);