diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-11-11 12:43:56 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-11-11 13:00:50 +0100 |
commit | a812b26cb8cde56c8083349f665d762ae6a1826a (patch) | |
tree | b078352e614932150e395f24bd148b09c8ba9acf /modules | |
parent | d775279dbd0da284af7f74b31b5d3b0eddcf80bc (diff) |
luci-base: widget.js: use firewall.getZoneColorStyle() in zone widgets
Use the new `firewall.getZoneColorStyle()` helper to apply background
color styles.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/tools/widgets.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js b/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js index 00ec1a889c..10b65be8ec 100644 --- a/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js +++ b/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js @@ -62,7 +62,7 @@ var CBIZoneSelect = form.ListValue.extend({ if (this.allowlocal) { choices[''] = E('span', { 'class': 'zonebadge', - 'style': 'background-color:' + firewall.getColorForName(null) + 'style': firewall.getZoneColorStyle(null) }, [ E('strong', _('Device')), (this.allowany || this.allowlocal) @@ -72,14 +72,14 @@ var CBIZoneSelect = form.ListValue.extend({ else if (!this.multiple && (this.rmempty || this.optional)) { choices[''] = E('span', { 'class': 'zonebadge', - 'style': 'background-color:' + firewall.getColorForName(null) + 'style': firewall.getZoneColorStyle(null) }, E('em', _('unspecified'))); } if (this.allowany) { choices['*'] = E('span', { 'class': 'zonebadge', - 'style': 'background-color:' + firewall.getColorForName(null) + 'style': firewall.getZoneColorStyle(null) }, [ E('strong', _('Any zone')), (this.allowany && this.allowlocal && !isOutputOnly) ? E('span', ' (%s)'.format(_('forward'))) : '' @@ -125,7 +125,7 @@ var CBIZoneSelect = form.ListValue.extend({ choices[name] = E('span', { 'class': 'zonebadge', - 'style': 'background-color:' + zone.getColor() + 'style': firewall.getZoneColorStyle(zone) }, [ E('strong', name) ].concat(ifaces)); } @@ -283,7 +283,7 @@ var CBIZoneForwards = form.DummyValue.extend({ return E('label', { 'class': 'zonebadge cbi-tooltip-container', - 'style': 'background-color:' + zone.getColor() + 'style': firewall.getZoneColorStyle(zone) }, [ E('strong', name), E('div', { 'class': 'cbi-tooltip' }, ifaces) |