diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-02-15 17:50:25 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-02-15 17:50:25 +0000 |
commit | 5d45927643f49b15769e7129a79a7a7a985f3f2a (patch) | |
tree | d12e0fd90226bea24df5f390ca6f32cd2feaa9b6 /libs | |
parent | f8d8f10aa892e2737cb2171e57b7883481edf9a7 (diff) |
libs/web: remove inline styles from firewall_zoneforwards and firewall_zonelist widgets
Diffstat (limited to 'libs')
-rw-r--r-- | libs/web/luasrc/view/cbi/firewall_zoneforwards.htm | 18 | ||||
-rw-r--r-- | libs/web/luasrc/view/cbi/firewall_zonelist.htm | 12 |
2 files changed, 15 insertions, 15 deletions
diff --git a/libs/web/luasrc/view/cbi/firewall_zoneforwards.htm b/libs/web/luasrc/view/cbi/firewall_zoneforwards.htm index f027ab3b1..2a433b569 100644 --- a/libs/web/luasrc/view/cbi/firewall_zoneforwards.htm +++ b/libs/web/luasrc/view/cbi/firewall_zoneforwards.htm @@ -17,16 +17,16 @@ -%> <% if zone then %> -<div style="padding:0.5em; white-space:nowrap"> - <label style="background-color:<%=zone:get_color()%>; padding:0.4em"> +<div style="white-space:nowrap"> + <label class="zonebadge" style="background-color:<%=zone:get_color()%>"> <strong><%=zone:name()%>:</strong> - <% + <%- local zempty = true for _, net in ipairs(zone:get_networks()) do net = nwm:get_network(net) if net then zempty = false - %> + -%> <span class="ifacebadge<% if net:name() == self.network then %> ifacebadge-active<% end %>"><%=net:name()%>: <% local nempty = true @@ -37,20 +37,20 @@ <% end %> <% if nempty then %><em><%:(empty)%></em><% end %> </span> - <% end end %> - <% if zempty then %><em><%:(empty)%></em><% end %> + <%- end end -%> + <%- if zempty then %><em><%:(empty)%></em><% end -%> </label>  ⇒  <% for _, fwd in ipairs(zone:get_forwardings_by("src")) do fz = fwd:dest_zone() empty = false %> - <label style="background-color:<%=fz:get_color()%>; padding:0.4em"> + <label class="zonebadge" style="background-color:<%=fz:get_color()%>"> <strong><%=fz:name()%></strong> </label>  <% end %> <% if empty then %> - <label style="border:1px dashed #AAAAAA; color:#AAAAAA; padding:0.3em"> - <strong><small><em><%=zone:forward():upper()%></em></small></strong> + <label class="zonebadge zonebadge-empty"> + <strong><%=zone:forward():upper()%></strong> </label> <% end %> </div> diff --git a/libs/web/luasrc/view/cbi/firewall_zonelist.htm b/libs/web/luasrc/view/cbi/firewall_zonelist.htm index 8aa69705d..7973437f4 100644 --- a/libs/web/luasrc/view/cbi/firewall_zonelist.htm +++ b/libs/web/luasrc/view/cbi/firewall_zonelist.htm @@ -28,7 +28,7 @@ <% if self.allowlocal then %> <li style="padding:0.5em"> <input class="cbi-input-radio" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)"<%=attr("type", self.widget or "radio") .. attr("id", cbid .. "_empty") .. attr("name", cbid) .. attr("value", "") .. ifattr(checked[""], "checked", "checked")%> />   - <label<%=attr("for", cbid .. "_empty")%> style="background-color:<%=fwm.zone.get_color()%>; padding:0.5em"> + <label<%=attr("for", cbid .. "_empty")%> style="background-color:<%=fwm.zone.get_color()%>" class="zonebadge"> <strong><%:Device%></strong> <% if self.allowany and self.allowlocal then %>(<%:input%>)<% end %> </label> @@ -37,7 +37,7 @@ <% if self.allowany then %> <li style="padding:0.5em"> <input class="cbi-input-radio" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)"<%=attr("type", self.widget or "radio") .. attr("id", cbid .. "_any") .. attr("name", cbid) .. attr("value", "*") .. ifattr(checked["*"], "checked", "checked")%> />   - <label<%=attr("for", cbid .. "_any")%> style="background-color:<%=fwm.zone.get_color()%>; padding:0.5em"> + <label<%=attr("for", cbid .. "_any")%> style="background-color:<%=fwm.zone.get_color()%>" class="zonebadge"> <strong><%:Any zone%></strong> <% if self.allowany and self.allowlocal then %>(<%:forward%>)<% end %> </label> @@ -50,7 +50,7 @@ %> <li style="padding:0.5em"> <input class="cbi-input-radio" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)"<%=attr("type", self.widget or "radio") .. attr("id", cbid .. "." .. zone:name()) .. attr("name", cbid) .. attr("value", zone:name()) .. ifattr(checked[zone:name()], "checked", "checked")%> />   - <label<%=attr("for", cbid .. "." .. zone:name())%> style="background-color:<%=zone:get_color()%>; padding:0.5em"> + <label<%=attr("for", cbid .. "." .. zone:name())%> style="background-color:<%=zone:get_color()%>" class="zonebadge"> <strong><%=zone:name()%>:</strong> <% local zempty = true @@ -78,9 +78,9 @@ <% if self.widget ~= "checkbox" and not self.nocreate then %> <li style="padding:0.5em"> <input class="cbi-input-radio" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)" type="radio"<%=attr("id", cbid .. "_new") .. attr("name", cbid) .. attr("value", "-") .. ifattr(not selected, "checked", "checked")%> />   - <div style="background-color:<%=fwm.zone.get_color()%>; padding:0.5em; display:inline"> - <label<%=attr("for", cbid .. "_new")%>><em><%:unspecified -or- create:%> </em></label> - <input style="width:6em" type="text"<%=attr("name", cbid .. ".newzone") .. ifattr(not selected, "value", luci.http.formvalue(cbid .. ".newzone") or self.default)%> onfocus="document.getElementById('<%=cbid%>_new').checked=true" /> + <div onclick="document.getElementById('<%=cbid%>_new').checked=true" class="zonebadge" style="background-color:<%=fwm.zone.get_color()%>"> + <em><%:unspecified -or- create:%> </em> + <input type="text"<%=attr("name", cbid .. ".newzone") .. ifattr(not selected, "value", luci.http.formvalue(cbid .. ".newzone") or self.default)%> onfocus="document.getElementById('<%=cbid%>_new').checked=true" /> </div> </li> <% end %> |