diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-03-18 17:24:09 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-03-18 17:28:41 +0100 |
commit | bea7b8dc7cd7231d7ec6ab82fcc80dfaec699326 (patch) | |
tree | 2ebf455ee56d6e80a019a163561ae6477d6ca2b1 | |
parent | 14fdce0fcdfe39ff4143b294a1f1f65d7c783ce7 (diff) |
luci-mod-network: fix opacity for device icon tooltips
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js index 0829a92fdd..0157d2b126 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js @@ -1076,13 +1076,17 @@ return view.extend({ o.modalonly = false; o.textvalue = function(section_id) { var dev = getDevice(section_id), - ext = section_id.match(/^dev:/); + ext = section_id.match(/^dev:/), + icon = render_iface(dev); - return E('span', { - 'class': 'ifacebadge', - 'style': ext ? 'opacity:.5' : null - }, [ - render_iface(dev), ' ', dev ? dev.getName() : (uci.get('network', section_id, 'name') || '?') + if (ext) + icon.querySelector('img').style.opacity = '.5'; + + return E('span', { 'class': 'ifacebadge' }, [ + icon, + E('span', { 'style': ext ? 'opacity:.5' : null }, [ + dev ? dev.getName() : (uci.get('network', section_id, 'name') || '?') + ]) ]); }; |