diff options
author | Florian Eckert <fe@dev.tdt.de> | 2020-12-18 15:33:52 +0100 |
---|---|---|
committer | Florian Eckert <fe@dev.tdt.de> | 2021-01-13 11:59:02 +0100 |
commit | e951236e3634924e2a26bf5d0890b3f25d39115d (patch) | |
tree | 8188b6dddec3f09720ff32540e9cef00b0aecb84 /modules/luci-base/htdocs/luci-static/resources/ui.js | |
parent | bcb489a74dfd6d748fd7dd1f90b92f03a40ca17d (diff) |
luci-base: add tooltip handling
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static/resources/ui.js')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/ui.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js index e35a26a8ba..81e0b81820 100644 --- a/modules/luci-base/htdocs/luci-static/resources/ui.js +++ b/modules/luci-base/htdocs/luci-static/resources/ui.js @@ -610,6 +610,17 @@ var UICheckbox = UIElement.extend(/** @lends LuCI.ui.Checkbox.prototype */ { frameEl.appendChild(E('label', { 'for': id })); + if (this.options.tooltip != null) { + frameEl.appendChild( + E('label', { 'class': 'cbi-tooltip-container' },[ + "⚠️", + E('div', { 'class': 'cbi-tooltip' }, + this.options.tooltip + ) + ]) + ); + } + return this.bind(frameEl); }, |