full_valuefooter.htm 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <% if self.description and #self.description > 0 then -%>
  2. <% if not luci.util.instanceof(self, luci.cbi.DynamicList) and (not luci.util.instanceof(self, luci.cbi.Flag) or self.orientation == "horizontal") then -%>
  3. <br />
  4. <%- end %>
  5. <div class="cbi-value-description">
  6. <span class="cbi-value-helpicon"><img src="<%=resource%>/cbi/help.gif" alt="<%:help%>" /></span>
  7. <%=self.description%>
  8. </div>
  9. <%- end %>
  10. <%- if self.title and #self.title > 0 then -%>
  11. </div>
  12. <%- end -%>
  13. </div>
  14. <% if #self.deps > 0 or #self.subdeps > 0 then -%>
  15. <script type="text/javascript" id="cbip-<%=self.config.."-"..section.."-"..self.option%>">
  16. <% for j, d in ipairs(self.subdeps) do -%>
  17. cbi_d_add("cbi-<%=self.config.."-"..section.."-"..self.option..d.add%>", {
  18. <%-
  19. for k,v in pairs(d.deps) do
  20. local depk
  21. if k:find("!", 1, true) then
  22. depk = string.format('"%s"', k)
  23. elseif k:find(".", 1, true) then
  24. depk = string.format('"cbid.%s"', k)
  25. else
  26. depk = string.format('"cbid.%s.%s.%s"', self.config, section, k)
  27. end
  28. -%>
  29. <%-= depk .. ":" .. string.format("%q", v)-%>
  30. <%-if next(d.deps, k) then-%>,<%-end-%>
  31. <%-
  32. end
  33. -%>
  34. }, "cbip-<%=self.config.."-"..section.."-"..self.option..d.add%>");
  35. <%- end %>
  36. <% for j, d in ipairs(self.deps) do -%>
  37. cbi_d_add("cbi-<%=self.config.."-"..section.."-"..self.option..d.add%>", {
  38. <%-
  39. for k,v in pairs(d.deps) do
  40. local depk
  41. if k:find("!", 1, true) then
  42. depk = string.format('"%s"', k)
  43. elseif k:find(".", 1, true) then
  44. depk = string.format('"cbid.%s"', k)
  45. else
  46. depk = string.format('"cbid.%s.%s.%s"', self.config, section, k)
  47. end
  48. -%>
  49. <%-= depk .. ":" .. string.format("%q", v)-%>
  50. <%-if next(d.deps, k) then-%>,<%-end-%>
  51. <%-
  52. end
  53. -%>
  54. }, "cbip-<%=self.config.."-"..section.."-"..self.option..d.add%>");
  55. <%- end %>
  56. </script>
  57. <%- end %>