luci-mod-network: fix opacity for device icon tooltips
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
14fdce0fcd
commit
bea7b8dc7c
1 changed files with 10 additions and 6 deletions
|
@ -1076,13 +1076,17 @@ return view.extend({
|
||||||
o.modalonly = false;
|
o.modalonly = false;
|
||||||
o.textvalue = function(section_id) {
|
o.textvalue = function(section_id) {
|
||||||
var dev = getDevice(section_id),
|
var dev = getDevice(section_id),
|
||||||
ext = section_id.match(/^dev:/);
|
ext = section_id.match(/^dev:/),
|
||||||
|
icon = render_iface(dev);
|
||||||
|
|
||||||
return E('span', {
|
if (ext)
|
||||||
'class': 'ifacebadge',
|
icon.querySelector('img').style.opacity = '.5';
|
||||||
'style': ext ? 'opacity:.5' : null
|
|
||||||
}, [
|
return E('span', { 'class': 'ifacebadge' }, [
|
||||||
render_iface(dev), ' ', dev ? dev.getName() : (uci.get('network', section_id, 'name') || '?')
|
icon,
|
||||||
|
E('span', { 'style': ext ? 'opacity:.5' : null }, [
|
||||||
|
dev ? dev.getName() : (uci.get('network', section_id, 'name') || '?')
|
||||||
|
])
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue