4f1440aa9222d404b7b8a15a3cafbbbf8c9b1a28 max Fri Nov 17 20:18:03 2023 -0800 adding file forgotten in previous tooltip commit, thanks to Chris, refs #32011 diff --git src/hg/js/utils.js src/hg/js/utils.js index 2233eaa..654cf65 100644 --- src/hg/js/utils.js +++ src/hg/js/utils.js @@ -4161,39 +4161,36 @@ document.addEventListener("keyup", function(ev) { if (ev.keyCode == 27) { // there is a race condition where the close happens after an inputs // focus happens, which means mouseovers get re-enabled when the focus // on the input should prevent them, catch that here: if (!(document.activeElement.tagName === "INPUT" || document.activeElement === "SELECT")) { canShowNewMouseover = true; } } }, {once: true}); }); } } -function tooltipNodesToMouseover() { +function newTooltips() { /* For server side printed tooltip texts, make them work as pop ups. - * Note this assumes two siblings nodes placed next to each other: - * <nodeName class="Tooltip">the text or element that is hoverable</nodename> - * <nodeName class="Tooltiptext'>the text/html of the popup itself * Please note that the Tooltiptext node can have any arbitrary html in it, like * line breaks or links*/ - $(".Tooltip").each(function(i, n) { - tooltiptext = n.getAttribute("mouseoverText"); + $("[title]").each(function(i, n) { + tooltiptext = n.getAttribute("title"); if (tooltiptext !== null) { addMouseover(n, tooltiptext); } }); } function parseUrl(url) { // turn a url into some of it's components like server, query-string, etc let protocol, serverName, pathInfo, queryString; let temp; temp = url.split("?"); if (temp.length > 1) queryString = temp.slice(1).join("?"); temp = temp[0].split("/"); protocol = temp[0]; // "https:"