From 026ac8d033f4c0a65b0c8d121d1a2a86b2bd1ee1 Mon Sep 17 00:00:00 2001 From: Christian Schoenebeck Date: Sun, 7 Feb 2016 09:30:29 +0100 Subject: luci-app-radicale: bump to version 1.1.0 - support Radicale > v1.1 - modified version detection - adaption to new function version_compare() in ipkg.lua - adaption to fixed Flag.parse() in cbi.lua - adaption to new property map.tabbed in cbi.lua using map template with extensions - change optional values to non optional - add support new option "system.boot_delay" Signed-off-by: Christian Schoenebeck --- .../luasrc/view/radicale/btn_startstop.htm | 6 +-- .../luasrc/view/radicale/ro_value.htm | 35 ---------------- .../luasrc/view/radicale/tabmap_nsections.htm | 49 ++++++++++++++++++++++ 3 files changed, 52 insertions(+), 38 deletions(-) delete mode 100644 applications/luci-app-radicale/luasrc/view/radicale/ro_value.htm create mode 100644 applications/luci-app-radicale/luasrc/view/radicale/tabmap_nsections.htm (limited to 'applications/luci-app-radicale/luasrc/view/radicale') diff --git a/applications/luci-app-radicale/luasrc/view/radicale/btn_startstop.htm b/applications/luci-app-radicale/luasrc/view/radicale/btn_startstop.htm index dbf4dddbca..d9ef82214f 100644 --- a/applications/luci-app-radicale/luasrc/view/radicale/btn_startstop.htm +++ b/applications/luci-app-radicale/luasrc/view/radicale/btn_startstop.htm @@ -4,7 +4,7 @@ // show XHR.poll/XHR.get response on button function _data2elements(x) { - var btn = document.getElementById("cbid.radicale._system._startstop"); + var btn = document.getElementById("cbid.radicale.<%=section%>._startstop"); if ( ! btn ) { return; } // security check if (x.responseText == "0") { btn.value = "<%:Start%>"; @@ -21,12 +21,12 @@ function onclick_startstop(id) { // do start/stop var btnXHR = new XHR(); - btnXHR.post('<%=url('admin/services/radicale/startstop')%>', { token: '<%=token%>' }, + btnXHR.post('<%=url([[admin/services/radicale/startstop]])%>', { token: '<%=token%>' }, function(x) { _data2elements(x); } ); } - XHR.poll(5, '<%=url('admin/services/radicale/status')%>', null, + XHR.poll(5, '<%=url([[admin/services/radicale/status]])%>', null, function(x, data) { _data2elements(x); } ); diff --git a/applications/luci-app-radicale/luasrc/view/radicale/ro_value.htm b/applications/luci-app-radicale/luasrc/view/radicale/ro_value.htm deleted file mode 100644 index 6e05206aa1..0000000000 --- a/applications/luci-app-radicale/luasrc/view/radicale/ro_value.htm +++ /dev/null @@ -1,35 +0,0 @@ -<%+cbi/valueheader%> - /> - <% if self.password then %><% end %> - <% if #self.keylist > 0 or self.datatype then -%> - - <% end -%> -<%+cbi/valuefooter%> diff --git a/applications/luci-app-radicale/luasrc/view/radicale/tabmap_nsections.htm b/applications/luci-app-radicale/luasrc/view/radicale/tabmap_nsections.htm new file mode 100644 index 0000000000..45fe60cc80 --- /dev/null +++ b/applications/luci-app-radicale/luasrc/view/radicale/tabmap_nsections.htm @@ -0,0 +1,49 @@ +<%- if firstmap and messages then local msg; for _, msg in ipairs(messages) do -%> +
<%=pcdata(msg)%>
+<%- end end -%> + +<%-+cbi/apply_xhr-%> + +
+ <% 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 then cbi_apply_xhr(self.config, parsechain, redirect) 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 %> +
  • + <% end %> +
+
+ <% for i, section in ipairs(self.children) do %> +
style="display:none"<% end %>> + <% section:render() %> +
+ + <% end %> + + <% else %> + <%- self:render_children() %> + <% end %> + + <% if not self.save then -%> +
+ <% for _, section in ipairs(self.children) do %> + <% if section.error and section.error[section.section] then -%> +
  • + <%:One or more missing/invalid fields on tab%>: <%=section.title or section.section or section.sectiontype%> +
+ <%- end %> + <% end %> +
+ <%- end %> + +
+ +
-- cgit v1.2.3