From 067d7dc9f708d5ebeda1072fb6dc82e960de0d81 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 28 May 2018 14:57:54 +0200 Subject: treewide: convert HTML tables to div Mostly convert HTML tables to div based markup to allow for easier styling in the future. Also change JS accessor code accordingly. Signed-off-by: Jo-Philipp Wich --- .../luci-base/luasrc/view/cbi/cell_valuefooter.htm | 2 +- .../luci-base/luasrc/view/cbi/cell_valueheader.htm | 2 +- modules/luci-base/luasrc/view/cbi/tblsection.htm | 54 +++++++++++----------- 3 files changed, 29 insertions(+), 29 deletions(-) (limited to 'modules/luci-base/luasrc/view/cbi') diff --git a/modules/luci-base/luasrc/view/cbi/cell_valuefooter.htm b/modules/luci-base/luasrc/view/cbi/cell_valuefooter.htm index 786ee43d1..bdd6bc968 100644 --- a/modules/luci-base/luasrc/view/cbi/cell_valuefooter.htm +++ b/modules/luci-base/luasrc/view/cbi/cell_valuefooter.htm @@ -1,2 +1,2 @@ - + diff --git a/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm b/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm index 9c9c21814..a4b68cda7 100644 --- a/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm +++ b/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm @@ -1,2 +1,2 @@ - +
" 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 3cb87563f..bb11cf1c0 100644 --- a/modules/luci-base/luasrc/view/cbi/tblsection.htm +++ b/modules/luci-base/luasrc/view/cbi/tblsection.htm @@ -27,52 +27,52 @@ end
<%=self.description%>
<%- local count = 0 -%> - - +
+
<%- if not self.anonymous then -%> <%- if self.sectionhead then -%> -
+
<%=self.sectionhead%>
<%- else -%> - +
 
<%- end -%> <%- count = count +1; end -%> <%- for i, k in pairs(self.children) do if not k.optional then -%> - + <%- count = count + 1; end; end; if self.sortable then -%> - +
<%:Sort%>
<%- count = count + 1; end; if self.extedit or self.addremove then -%> - +
 
<%- count = count + 1; end -%> - - + +
<%- if not self.anonymous then -%> <%- if self.sectiondesc then -%> -
+
<%=self.sectiondesc%>
<%- else -%> - +
<%- end -%> <%- end -%> <%- for i, k in pairs(self.children) do if not k.optional then -%> - +
><%=k.description%>
<%- end; end; if self.sortable then -%> - +
<%- end; if self.extedit or self.addremove then -%> - +
<%- end -%> - + <%- local isempty = true for i, k in ipairs(self:cfgsections()) do section = k isempty = false scope = { valueheader = "cbi/cell_valueheader", valuefooter = "cbi/cell_valuefooter" } -%> - +
<% if not self.anonymous then -%> -
+

<%=(type(self.sectiontitle) == "function") and self:sectiontitle(section) or k%>

<%- end %> @@ -85,14 +85,14 @@ end -%> <%- if self.sortable then -%> - + <%- end -%> <%- if self.extedit or self.addremove then -%> - + <%- end -%> - + <%- end -%> <%- if isempty then -%> - - - +
+

<%:This section contains no values yet%>
+
<%- end -%> -
<%=self.sectionhead%> > +
> <%- if k.titleref then -%><%- end -%> <%-=k.title-%> <%- if k.titleref then -%><%- end -%> -
<%:Sort%> 
<%=self.sectiondesc%>><%=k.description%>

<%=(type(self.sectiontitle) == "function") and self:sectiontitle(section) or k%>

+
-
+
<%- if self.extedit then -%> <%- end -%> -

<%:This section contains no values yet%>
+
<% if self.error then %>
-- cgit v1.2.3