From 9c7eb1decd82344e22a10e6f5ac36b463d2149f5 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 1 Apr 2019 16:09:41 +0200 Subject: luci-base: switch from server side to client side widget markup Do not render standard widgets like checkboxes, select boxes, text input fields etc. on the server side anymore but utilize the ui.js primitives instead. This avoids logic duplication between server side cbi templates and JS widgets in the future. Signed-off-by: Jo-Philipp Wich --- modules/luci-base/luasrc/view/cbi/dropdown.htm | 69 +++++++------------------- 1 file changed, 17 insertions(+), 52 deletions(-) (limited to 'modules/luci-base/luasrc/view/cbi/dropdown.htm') diff --git a/modules/luci-base/luasrc/view/cbi/dropdown.htm b/modules/luci-base/luasrc/view/cbi/dropdown.htm index 6f4b89905b..40bd8e9536 100644 --- a/modules/luci-base/luasrc/view/cbi/dropdown.htm +++ b/modules/luci-base/luasrc/view/cbi/dropdown.htm @@ -1,54 +1,19 @@ <%+cbi/valueheader%> - -<%- - local selected = { } - - if self.multiple then - local val - for val in luci.util.imatch(self:cfgvalue(section)) do - selected[val] = true - end - else - selected[self:cfgvalue(section)] = true - end - - if not next(selected) and self.default then - selected[self.default] = true - end --%> - -
> -
    - <% local i, key; for i, key in pairs(self.keylist) do %> - > - <%=pcdata(self.vallist[i])%> - - <% end %> - <% if self.custom then %> -
  • - - /> -
  • - <% end %> -
-
- +> <%+cbi/valuefooter%> -- cgit v1.2.3