build: introduce luci-base
[project/luci.git] / modules / base / luasrc / luasrc / view / cbi / cell_valuefooter.htm
diff --git a/modules/base/luasrc/luasrc/view/cbi/cell_valuefooter.htm b/modules/base/luasrc/luasrc/view/cbi/cell_valuefooter.htm
new file mode 100644 (file)
index 0000000..220ebd4
--- /dev/null
@@ -0,0 +1,20 @@
+</div>
+<div id="cbip-<%=self.config.."-"..section.."-"..self.option%>"></div>
+</td>
+
+<% if #self.deps > 0 then -%>
+       <script type="text/javascript">
+               <% for j, d in ipairs(self.deps) do -%>
+                       cbi_d_add("cbi-<%=self.config.."-"..section.."-"..self.option..d.add%>", {
+               <%-
+                       for k,v in pairs(d.deps) do
+               -%>
+                       <%-=string.format('"cbid.%s.%s.%s"', self.config, section, k) .. ":" .. string.format("%q", v)-%>
+                       <%-if next(d.deps, k) then-%>,<%-end-%>
+               <%-
+                       end
+               -%>
+                       }, "cbip-<%=self.config.."-"..section.."-"..self.option%>");
+               <%- end %>
+       </script>
+<%- end %>