luci-mod-network: fix opacity for device icon tooltips
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit bea7b8dc7c
)
This commit is contained in:
parent
f366dfe484
commit
dfd499b4d4
1 changed files with 10 additions and 6 deletions
|
@ -1160,13 +1160,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') || '?')
|
||||
])
|
||||
]);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue