From: Jo-Philipp Wich Date: Fri, 15 Oct 2010 21:56:44 +0000 (+0000) Subject: libs/web: move XHR apply callback into subtemplate X-Git-Tag: 0.10.0~604 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=dd2abf2ea44b02bff72812de593a9e3976fe7f15;p=oweals%2Fluci.git libs/web: move XHR apply callback into subtemplate --- diff --git a/libs/web/luasrc/view/cbi/apply_xhr.htm b/libs/web/luasrc/view/cbi/apply_xhr.htm new file mode 100644 index 000000000..30e7a23b5 --- /dev/null +++ b/libs/web/luasrc/view/cbi/apply_xhr.htm @@ -0,0 +1,56 @@ +<%# +LuCI - Lua Configuration Interface +Copyright 2010 Jo-Philipp Wich + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ + +-%> + +<% export("cbi_apply_xhr", function(id, configs) -%> +
+ <%:Applying changes%> + + + <%:Loading%> + <%:Waiting for router...%> +
+<%- end) %> diff --git a/libs/web/luasrc/view/cbi/map.htm b/libs/web/luasrc/view/cbi/map.htm index be0c37aa7..666763d69 100644 --- a/libs/web/luasrc/view/cbi/map.htm +++ b/libs/web/luasrc/view/cbi/map.htm @@ -13,51 +13,12 @@ $Id$ -%> +<%-+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 self._apply then -%> -
- <%:Applying changes%> - - - <%:Loading%> - <%:Waiting for router...%> -
- <%- end -%> + <%- if self._apply then cbi_apply_xhr(self.config, self.parsechain) end -%> <%- self:render_children() %>