diff --git a/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm b/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm index 4b70957543..db5c66850d 100644 --- a/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm +++ b/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm @@ -5,7 +5,7 @@ -%>
0, "data-type", ftype) .. + ifattr(ftype and #ftype > 0, "data-widget", ftype) .. ifattr(title and #title > 0, "data-title", title, true) .. ifattr(descr and #descr > 0, "data-description", descr, true) %>> diff --git a/modules/luci-base/luasrc/view/cbi/tblsection.htm b/modules/luci-base/luasrc/view/cbi/tblsection.htm index 11c2206d8c..1e067edf38 100644 --- a/modules/luci-base/luasrc/view/cbi/tblsection.htm +++ b/modules/luci-base/luasrc/view/cbi/tblsection.htm @@ -52,7 +52,7 @@ function render_titles() for i, k in ipairs(self.children) do if not k.optional then %>
><% + width(k) .. attr('data-widget', k.typename) %>><% if k.titleref then %><% @@ -88,7 +88,7 @@ function render_descriptions() for i, k in ipairs(self.children) do if not k.optional then %>
><% + width(k) .. attr("data-widget", k.typename) %>><% write(k.description) diff --git a/themes/luci-theme-openwrt/htdocs/luci-static/openwrt.org/cascade.css b/themes/luci-theme-openwrt/htdocs/luci-static/openwrt.org/cascade.css index 5becfc5ba5..46d7b9d011 100644 --- a/themes/luci-theme-openwrt/htdocs/luci-static/openwrt.org/cascade.css +++ b/themes/luci-theme-openwrt/htdocs/luci-static/openwrt.org/cascade.css @@ -861,8 +861,8 @@ div.cbi-optionals { margin-left: 3px; } -.th[data-type="button"], .td[data-type="button"], -.th[data-type="fvalue"], .td[data-type="fvalue"] { +.th[data-widget="button"], .td[data-widget="button"], +.th[data-widget="fvalue"], .td[data-widget="fvalue"] { flex: 1 1 2em; text-align: center; } @@ -1599,8 +1599,8 @@ select + .cbi-button { word-wrap: normal; } - .td[data-type="button"], - .td[data-type="fvalue"] { + .td[data-widget="button"], + .td[data-widget="fvalue"] { flex: 1 1 12.5%; text-align: left; } @@ -1717,12 +1717,12 @@ select + .cbi-button { flex-basis: 100%; } - .td.cbi-value-field[data-type="dvalue"] { + .td.cbi-value-field[data-widget="dvalue"] { flex-basis: 50%; } - .td.cbi-value-field[data-type="button"], - .td.cbi-value-field[data-type="fvalue"] { + .td.cbi-value-field[data-widget="button"], + .td.cbi-value-field[data-widget="fvalue"] { flex-basis: 25%; text-align: left; }