From 165ba6f180d10f7a99c1abe386328efeccaf78eb Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 9 Dec 2018 20:10:15 +0100 Subject: [PATCH] luci-app-radicale: refactor custom nsection template Refactor the named section template shipped with luci-app-radicale to work with the latest LuCI tabbing changes. Signed-off-by: Jo-Philipp Wich --- .../luasrc/view/radicale/tabmap_nsections.htm | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/applications/luci-app-radicale/luasrc/view/radicale/tabmap_nsections.htm b/applications/luci-app-radicale/luasrc/view/radicale/tabmap_nsections.htm index 2b526a31d7..fdb3f27abc 100644 --- a/applications/luci-app-radicale/luasrc/view/radicale/tabmap_nsections.htm +++ b/applications/luci-app-radicale/luasrc/view/radicale/tabmap_nsections.htm @@ -3,8 +3,12 @@ <%- end end -%>
- <% if self.title and #self.title > 0 then %>

<%=self.title%>

<% end %> - <% if self.description and #self.description > 0 then %>
<%=self.description%>
<% end %> + <% if self.title and #self.title > 0 then %> +

<%=self.title%>

+ <% end %> + <% if self.description and #self.description > 0 then %> +
<%=self.description%>
+ <% end %> <%- if firstmap and (applymap or confirmmap) then -%> <%+cbi/apply_widget%> <% cbi_apply_widget() %> @@ -21,23 +25,18 @@ <%- end -%> <% if self.tabbed then %> -
    - <%- self.selected_tab = luci.http.formvalue("tab.m-" .. self.config) %> - <% for i, section in ipairs(self.children) do %> - <%- if not self.selected_tab then self.selected_tab = section.sectiontype end %> -
  • - <%=section.title or section.section or section.sectiontype %> - <% if section.sectiontype == self.selected_tab then %><% end %> -
  • +
    + <% for i, section in ipairs(self.children) do + tab = section.section or section.sectiontype %> +
    > + <% section:render() %> +
    <% end %> -
-
- <% for i, section in ipairs(self.children) do %> -
style="display:none"<% end %>> - <% section:render() %> -
- - <% end %> +
<% else %> <%- self:render_children() %> -- 2.30.2