diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-06-19 17:10:38 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-06-23 17:13:22 +0200 |
commit | d0b91bcca266a6d386f9ebeef695e1cef34ad9cf (patch) | |
tree | 0d1024db758c38ff0b3260c00f5db40e6356991f /modules/luci-base/luasrc/view/cbi/cell_valueheader.htm | |
parent | c4bd6fb7b9915cdf32bf08c93e64bd091c793bd5 (diff) |
luci-base: globally cleanup markup
- add responsive attributes to partial cbi templates
- unify and fix button style classes
- fix styling of sysauth dialog
- rework firewall_zoneforwards widget
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/luasrc/view/cbi/cell_valueheader.htm')
-rw-r--r-- | modules/luci-base/luasrc/view/cbi/cell_valueheader.htm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm b/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm index a4b68cda7..dbb0e1120 100644 --- a/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm +++ b/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm @@ -1,2 +1,10 @@ -<div class="td cbi-value-field<% if self.error and self.error[section] then %> cbi-value-error<% end %>"> +<%- + local title = luci.util.trim(striptags(self.title)) + local ftype = self.template and self.template:gsub("^.+/", "") +-%> +<div class="td cbi-value-field<% if self.error and self.error[section] then %> cbi-value-error<% end %>"<%= + attr("data-name", self.option) .. + ifattr(ftype and #ftype > 0, "data-type", ftype) .. + ifattr(title and #title > 0, "data-title", title) +%>> <div id="cbi-<%=self.config.."-"..section.."-"..self.option%>" data-index="<%=self.index%>" data-depends="<%=pcdata(self:deplist2json(section))%>"> |