d409d8e8e6c09a6a668752d9d811c95da0873dc5 max Mon Nov 13 23:07:24 2023 -0800 adding info bubbles to hgLiftOver, refs #32011 diff --git src/hg/lib/hui.c src/hg/lib/hui.c index e6fe14c..c9f035c 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -9267,37 +9267,48 @@ if (sameString(subName, subGroup) && sameString(subValue, name)) { boolean newVal = FALSE; safef(option, sizeof(option),"%s_sel", subtrack->track); newVal = sameString(button, ADD_BUTTON_LABEL); cartSetBoolean(cart, option, newVal); } } } } puts("</TABLE>"); } return TRUE; } +static bool mouseOverJsDone = FALSE; + void printInfoIcon(char *mouseover) -/* Print info icon (i) with explanatory text on mouseover - * Uses jquery icon set, with style customized to GB in jquery-ui.css */ +/* Print info icon (i) with explanatory text on mouseover */ +{ +// see https://www.svgrepo.com/svg/524660/info-circle +printf("<span title=\"%s\">", mouseover); +puts("<svg style='height:1.1em; vertical-align:top' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'>"); +puts("<circle cx='12' cy='12' r='10' stroke='#1C274C' stroke-width='1.5'/>"); +puts("<path d='M12 17V11' stroke='#1C274C' stroke-width='1.5' stroke-linecap='round'/>"); +puts("<circle cx='1' cy='1' r='1' transform='matrix(1 0 0 -1 11 9)' fill='#1C274C'/>"); +puts("</svg>"); +puts("</span>"); +if (!mouseOverJsDone) { -// jquery icons print a bit high, so using sub instead of span to place next to text -printf("<sub class='Tooltip ui-icon ui-icon-info' style='display: inline-block;' title='%s' mouseoverText='%s'></sub>", - mouseover, mouseover); + jsInline("newTooltips();\n"); + mouseOverJsDone = TRUE; + } } void hCompositeUi(char *db, struct cart *cart, struct trackDb *tdb, char *primarySubtrack, char *fakeSubmit, char *formName) // UI for composite tracks: subtrack selection. If primarySubtrack is // non-NULL, don't allow it to be cleared and only offer subtracks // that have the same type. If fakeSubmit is non-NULL, add a hidden // var with that name so it looks like it was pressed. { bool hasSubgroups = (trackDbSetting(tdb, "subGroup1") != NULL); boolean isMatrix = dimensionsExist(tdb); boolean viewsOnly = FALSE; if (primarySubtrack == NULL && !cartVarExists(cart, "ajax")) {