From b50471787feb9c04b365ff239aee8f39eadc236b Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 18 Jan 2016 17:05:36 +0100 Subject: luci-base: refactor cbi dependency handling code Signed-off-by: Jo-Philipp Wich --- .../luci-base/luasrc/view/cbi/cell_valuefooter.htm | 18 --------- .../luci-base/luasrc/view/cbi/cell_valueheader.htm | 2 +- modules/luci-base/luasrc/view/cbi/footer.htm | 2 +- .../luci-base/luasrc/view/cbi/full_valuefooter.htm | 46 ---------------------- .../luci-base/luasrc/view/cbi/full_valueheader.htm | 2 +- modules/luci-base/luasrc/view/cbi/lvalue.htm | 6 +-- modules/luci-base/luasrc/view/cbi/mvalue.htm | 6 +-- 7 files changed, 9 insertions(+), 73 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 220ebd42ba..786ee43d10 100644 --- a/modules/luci-base/luasrc/view/cbi/cell_valuefooter.htm +++ b/modules/luci-base/luasrc/view/cbi/cell_valuefooter.htm @@ -1,20 +1,2 @@ -
">
- -<% if #self.deps > 0 then -%> - -<%- end %> diff --git a/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm b/modules/luci-base/luasrc/view/cbi/cell_valueheader.htm index 9e2e145ddb..9c9c21814b 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/footer.htm b/modules/luci-base/luasrc/view/cbi/footer.htm index 115250a82d..42bf98bf27 100644 --- a/modules/luci-base/luasrc/view/cbi/footer.htm +++ b/modules/luci-base/luasrc/view/cbi/footer.htm @@ -19,7 +19,7 @@ <% end %> - +
<%- end -%> diff --git a/modules/luci-base/luasrc/view/cbi/full_valuefooter.htm b/modules/luci-base/luasrc/view/cbi/full_valuefooter.htm index 4876fbcc99..f780936766 100644 --- a/modules/luci-base/luasrc/view/cbi/full_valuefooter.htm +++ b/modules/luci-base/luasrc/view/cbi/full_valuefooter.htm @@ -11,49 +11,3 @@
<%- end -%> - - -<% if #self.deps > 0 or #self.subdeps > 0 then -%> - -<%- end %> diff --git a/modules/luci-base/luasrc/view/cbi/full_valueheader.htm b/modules/luci-base/luasrc/view/cbi/full_valueheader.htm index aaf085473a..10a554329f 100644 --- a/modules/luci-base/luasrc/view/cbi/full_valueheader.htm +++ b/modules/luci-base/luasrc/view/cbi/full_valueheader.htm @@ -1,4 +1,4 @@ -
"> +
" data-index="<%=self.index%>" data-depends="<%=pcdata(self:deplist2json(section))%>"> <%- if self.title and #self.title > 0 then -%> + /> + ><%=self.vallist[i]%> <% if c == self.size then c = 0 %><% if self.orientation == "horizontal" then %> <% else %>
<% end %> <% end end %> <% end %> diff --git a/modules/luci-base/luasrc/view/cbi/mvalue.htm b/modules/luci-base/luasrc/view/cbi/mvalue.htm index 5d092610ed..9118a22381 100644 --- a/modules/luci-base/luasrc/view/cbi/mvalue.htm +++ b/modules/luci-base/luasrc/view/cbi/mvalue.htm @@ -3,7 +3,7 @@ <% if self.widget == "select" then %> <% elseif self.widget == "checkbox" then @@ -11,8 +11,8 @@ for i, key in pairs(self.keylist) do c = c + 1 %> - /> - ><%=self.vallist[i]%><% if not self.oneline then %>
<% else %> <% end %> + /> + ><%=self.vallist[i]%>
<% if c == self.size then c = 0 %>
<% end end %> <% end %> -- cgit v1.2.3