From b60c51b7c80b3f90dccda18ffdeef711ea7063fc Mon Sep 17 00:00:00 2001 From: Roland Stigge Date: Sat, 13 Jan 2018 12:40:05 +0100 Subject: Added tooltip to list --- html/webbox.css | 34 ++++++++++++++++++++++++++++++++++ html/webbox.js | 4 ++-- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/html/webbox.css b/html/webbox.css index 67d87b4..42761a5 100644 --- a/html/webbox.css +++ b/html/webbox.css @@ -209,3 +209,37 @@ table.list td.name { } } +/* Tooltip container */ +.tooltip { + position: relative; + display: inline-block; +} + +/* Tooltip text */ +.tooltip .tooltiptext { + visibility: hidden; + background-color: #FFFFDD; + color: #000000; + text-align: center; + padding: 5px; + border-style: solid; + border-width: 1px; + border-color: #000000; + position: fixed; + right: 20px; + bottom: 20px; + z-index: 1; +} + +/* Show the tooltip text when you mouse over the tooltip container */ +.tooltip:hover .tooltiptext { + visibility: visible; +} + +.fullwidth { + width: 100%; + border: 0; + margin: 0; + padding: 0; + border-collapse: collapse; +} diff --git a/html/webbox.js b/html/webbox.js index 6cbf23d..b408078 100644 --- a/html/webbox.js +++ b/html/webbox.js @@ -27,7 +27,7 @@ function loadContents(dir) { var list = xhr.responseXML; listElements = list.getElementsByTagName("listentry"); - var result = ""; + var result = "
"; if (listElements.length == 0) { result += ""; @@ -49,7 +49,7 @@ function loadContents(dir) { } } - result += "
(empty)
" + result += "
To select entry,
click and hold
" var listElement = document.getElementById("list"); -- cgit v1.2.3