summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/view
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-base/luasrc/view')
-rw-r--r--modules/luci-base/luasrc/view/cbi/cell_valueheader.htm6
-rw-r--r--modules/luci-base/luasrc/view/cbi/tblsection.htm4
2 files changed, 6 insertions, 4 deletions
diff --git a/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm b/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm
index dbb0e1120b..ea0568f409 100644
--- a/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm
+++ b/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm
@@ -1,10 +1,12 @@
<%-
local title = luci.util.trim(striptags(self.title))
- local ftype = self.template and self.template:gsub("^.+/", "")
+ local descr = luci.util.trim(striptags(self.description))
+ local ftype = self.typename or (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)
+ ifattr(title and #title > 0, "data-title", title) ..
+ ifattr(descr and #descr > 0, "data-description", descr)
%>>
<div id="cbi-<%=self.config.."-"..section.."-"..self.option%>" data-index="<%=self.index%>" data-depends="<%=pcdata(self:deplist2json(section))%>">
diff --git a/modules/luci-base/luasrc/view/cbi/tblsection.htm b/modules/luci-base/luasrc/view/cbi/tblsection.htm
index 9505f4ac4e..408dfa7fe8 100644
--- a/modules/luci-base/luasrc/view/cbi/tblsection.htm
+++ b/modules/luci-base/luasrc/view/cbi/tblsection.htm
@@ -4,9 +4,9 @@ local rowcnt = 0
function rowstyle()
rowcnt = rowcnt + 1
if rowcnt % 2 == 0 then
- return "cbi-rowstyle-1"
+ return " cbi-rowstyle-1"
else
- return "cbi-rowstyle-2"
+ return " cbi-rowstyle-2"
end
end