From ede4aca4b95c9e664e4830fd43c54b627b122538 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 12 Oct 2010 05:15:32 +0000 Subject: libs: merge libs/cbi into libs/web --- libs/cbi/luasrc/view/cbi/browser.htm | 23 ----- libs/cbi/luasrc/view/cbi/button.htm | 21 ---- libs/cbi/luasrc/view/cbi/cell_valuefooter.htm | 34 ------- libs/cbi/luasrc/view/cbi/cell_valueheader.htm | 17 ---- libs/cbi/luasrc/view/cbi/compound.htm | 14 --- libs/cbi/luasrc/view/cbi/delegator.htm | 37 ------- libs/cbi/luasrc/view/cbi/dvalue.htm | 22 ---- libs/cbi/luasrc/view/cbi/dynlist.htm | 52 ---------- libs/cbi/luasrc/view/cbi/filebrowser.htm | 123 ---------------------- libs/cbi/luasrc/view/cbi/firewall_zonelist.htm | 89 ---------------- libs/cbi/luasrc/view/cbi/footer.htm | 29 ------ libs/cbi/luasrc/view/cbi/full_valuefooter.htm | 74 -------------- libs/cbi/luasrc/view/cbi/full_valueheader.htm | 24 ----- libs/cbi/luasrc/view/cbi/fvalue.htm | 17 ---- libs/cbi/luasrc/view/cbi/header.htm | 22 ---- libs/cbi/luasrc/view/cbi/lvalue.htm | 32 ------ libs/cbi/luasrc/view/cbi/map.htm | 63 ------------ libs/cbi/luasrc/view/cbi/mvalue.htm | 35 ------- libs/cbi/luasrc/view/cbi/network_ifacelist.htm | 54 ---------- libs/cbi/luasrc/view/cbi/network_netlist.htm | 61 ----------- libs/cbi/luasrc/view/cbi/nsection.htm | 46 --------- libs/cbi/luasrc/view/cbi/nullsection.htm | 32 ------ libs/cbi/luasrc/view/cbi/simpleform.htm | 66 ------------ libs/cbi/luasrc/view/cbi/tabcontainer.htm | 21 ---- libs/cbi/luasrc/view/cbi/tabmenu.htm | 27 ----- libs/cbi/luasrc/view/cbi/tblsection.htm | 135 ------------------------- libs/cbi/luasrc/view/cbi/tsection.htm | 62 ------------ libs/cbi/luasrc/view/cbi/tvalue.htm | 19 ---- libs/cbi/luasrc/view/cbi/ucisection.htm | 90 ----------------- libs/cbi/luasrc/view/cbi/upload.htm | 29 ------ libs/cbi/luasrc/view/cbi/value.htm | 44 -------- libs/cbi/luasrc/view/cbi/valuefooter.htm | 16 --- libs/cbi/luasrc/view/cbi/valueheader.htm | 16 --- 33 files changed, 1446 deletions(-) delete mode 100644 libs/cbi/luasrc/view/cbi/browser.htm delete mode 100644 libs/cbi/luasrc/view/cbi/button.htm delete mode 100644 libs/cbi/luasrc/view/cbi/cell_valuefooter.htm delete mode 100644 libs/cbi/luasrc/view/cbi/cell_valueheader.htm delete mode 100644 libs/cbi/luasrc/view/cbi/compound.htm delete mode 100644 libs/cbi/luasrc/view/cbi/delegator.htm delete mode 100644 libs/cbi/luasrc/view/cbi/dvalue.htm delete mode 100644 libs/cbi/luasrc/view/cbi/dynlist.htm delete mode 100644 libs/cbi/luasrc/view/cbi/filebrowser.htm delete mode 100644 libs/cbi/luasrc/view/cbi/firewall_zonelist.htm delete mode 100644 libs/cbi/luasrc/view/cbi/footer.htm delete mode 100644 libs/cbi/luasrc/view/cbi/full_valuefooter.htm delete mode 100644 libs/cbi/luasrc/view/cbi/full_valueheader.htm delete mode 100644 libs/cbi/luasrc/view/cbi/fvalue.htm delete mode 100644 libs/cbi/luasrc/view/cbi/header.htm delete mode 100644 libs/cbi/luasrc/view/cbi/lvalue.htm delete mode 100644 libs/cbi/luasrc/view/cbi/map.htm delete mode 100644 libs/cbi/luasrc/view/cbi/mvalue.htm delete mode 100644 libs/cbi/luasrc/view/cbi/network_ifacelist.htm delete mode 100644 libs/cbi/luasrc/view/cbi/network_netlist.htm delete mode 100644 libs/cbi/luasrc/view/cbi/nsection.htm delete mode 100644 libs/cbi/luasrc/view/cbi/nullsection.htm delete mode 100644 libs/cbi/luasrc/view/cbi/simpleform.htm delete mode 100644 libs/cbi/luasrc/view/cbi/tabcontainer.htm delete mode 100644 libs/cbi/luasrc/view/cbi/tabmenu.htm delete mode 100644 libs/cbi/luasrc/view/cbi/tblsection.htm delete mode 100644 libs/cbi/luasrc/view/cbi/tsection.htm delete mode 100644 libs/cbi/luasrc/view/cbi/tvalue.htm delete mode 100644 libs/cbi/luasrc/view/cbi/ucisection.htm delete mode 100644 libs/cbi/luasrc/view/cbi/upload.htm delete mode 100644 libs/cbi/luasrc/view/cbi/value.htm delete mode 100644 libs/cbi/luasrc/view/cbi/valuefooter.htm delete mode 100644 libs/cbi/luasrc/view/cbi/valueheader.htm (limited to 'libs/cbi/luasrc/view') diff --git a/libs/cbi/luasrc/view/cbi/browser.htm b/libs/cbi/luasrc/view/cbi/browser.htm deleted file mode 100644 index 3b7b23f5d2..0000000000 --- a/libs/cbi/luasrc/view/cbi/browser.htm +++ /dev/null @@ -1,23 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> - -<% - local t = require("luci.tools.webadmin") - local v = self:cfgvalue(section) --%> -<%+cbi/valueheader%> - /> - '<%=self.default_path and ", '"..self.default_path.."'"%>);return false" alt="<%:Search file...%>" title="<%:Search file...%>" src="<%=resource%>/cbi/folder.png" style="vertical-align:bottom" /> -<%+cbi/valuefooter%> diff --git a/libs/cbi/luasrc/view/cbi/button.htm b/libs/cbi/luasrc/view/cbi/button.htm deleted file mode 100644 index 5a5189794a..0000000000 --- a/libs/cbi/luasrc/view/cbi/button.htm +++ /dev/null @@ -1,21 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> -<%+cbi/valueheader%> - <% if self:cfgvalue(section) ~= false then %> - " type="submit"<%= attr("name", cbid) .. attr("id", cbid) .. attr("value", self.title)%> /> - <% else %> - - - <% end %> -<%+cbi/valuefooter%> diff --git a/libs/cbi/luasrc/view/cbi/cell_valuefooter.htm b/libs/cbi/luasrc/view/cbi/cell_valuefooter.htm deleted file mode 100644 index c325e49cb4..0000000000 --- a/libs/cbi/luasrc/view/cbi/cell_valuefooter.htm +++ /dev/null @@ -1,34 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> - -
">
- - -<% if #self.deps > 0 then -%> - -<%- end %> \ No newline at end of file diff --git a/libs/cbi/luasrc/view/cbi/cell_valueheader.htm b/libs/cbi/luasrc/view/cbi/cell_valueheader.htm deleted file mode 100644 index 0f24f1f764..0000000000 --- a/libs/cbi/luasrc/view/cbi/cell_valueheader.htm +++ /dev/null @@ -1,17 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> - - -
"> diff --git a/libs/cbi/luasrc/view/cbi/compound.htm b/libs/cbi/luasrc/view/cbi/compound.htm deleted file mode 100644 index fbd5a0a073..0000000000 --- a/libs/cbi/luasrc/view/cbi/compound.htm +++ /dev/null @@ -1,14 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2009 Steven Barth - -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$ - --%> -<%- self:render_children() %> \ No newline at end of file diff --git a/libs/cbi/luasrc/view/cbi/delegator.htm b/libs/cbi/luasrc/view/cbi/delegator.htm deleted file mode 100644 index ed7c6b4ea2..0000000000 --- a/libs/cbi/luasrc/view/cbi/delegator.htm +++ /dev/null @@ -1,37 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2009 Steven Barth - -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$ - --%> -<%- self.active:render() %> -
- -<% for _, x in ipairs(self.chain) do %> - -<% end %> -<% if not self.disallow_pageactions then %> -<% if self.allow_finish and not self:get_next(self.current) then %> - -<% elseif self:get_next(self.current) then %> - -<% end %> -<% if self.allow_cancel then %> - -<% end %> -<% if self.allow_reset then %> - -<% end %> -<% if self.allow_back and self:get_prev(self.current) then %> - -<% end %> -<% end %> - -
\ No newline at end of file diff --git a/libs/cbi/luasrc/view/cbi/dvalue.htm b/libs/cbi/luasrc/view/cbi/dvalue.htm deleted file mode 100644 index 9745fff4cb..0000000000 --- a/libs/cbi/luasrc/view/cbi/dvalue.htm +++ /dev/null @@ -1,22 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> - -<%+cbi/valueheader%> -<% if self.href then %><% end -%> - <%=pcdata(self:cfgvalue(section) or self.default or "")%> -<%- if self.href then %><%end%> -  -" /> -<%+cbi/valuefooter%> diff --git a/libs/cbi/luasrc/view/cbi/dynlist.htm b/libs/cbi/luasrc/view/cbi/dynlist.htm deleted file mode 100644 index 826e2e698e..0000000000 --- a/libs/cbi/luasrc/view/cbi/dynlist.htm +++ /dev/null @@ -1,52 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008-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$ - --%> -<%+cbi/valueheader%> -<% - local vals = self:cfgvalue(section) or {} - for i=1, #vals + 1 do - local val = vals[i] -%> - /> - <% if i <= #vals then %> - " alt="<%:Delete%>" title="<%:Delete%>" src="<%=resource%>/cbi/remove.gif" /> - <% else %> - " alt="<%:Add%>" title="<%:Add%>" src="<%=resource%>/cbi/add.gif" /> - <% end %> - <% if #self.keylist > 0 then -%> - - <% end -%> -<% if i <= #vals then %>
-<% end end %> -<% if self.datatype then -%> - -<% end -%> -<%+cbi/valuefooter%> diff --git a/libs/cbi/luasrc/view/cbi/filebrowser.htm b/libs/cbi/luasrc/view/cbi/filebrowser.htm deleted file mode 100644 index f82957221c..0000000000 --- a/libs/cbi/luasrc/view/cbi/filebrowser.htm +++ /dev/null @@ -1,123 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> - - - - - - Filebrowser - LuCI - - - - - - <% - require("nixio.fs") - require("nixio.util") - require("luci.http") - require("luci.dispatcher") - - local field = luci.http.formvalue('field') - local request = luci.dispatcher.context.path - local path = { '' } - - for i = 3, #request do - if request[i] ~= '..' and #request[i] > 0 then - path[#path+1] = request[i] - end - end - - local filepath = table.concat( path, '/' ) - local filestat = nixio.fs.stat( filepath ) - local baseurl = luci.dispatcher.build_url('admin', 'filebrowser') - - if filestat and filestat.type == "reg" then - table.remove( path, #path ) - filepath = table.concat( path, '/' ) .. '/' - elseif not ( filestat and filestat.type == "dir" ) then - path = { '' } - filepath = '/' - else - filepath = filepath .. '/' - end - - local entries = nixio.util.consume((nixio.fs.dir(filepath))) - -%> -
- Location: - <% for i, dir in ipairs(path) do %> - <% if i == 1 then %> - (root) - <% elseif next(path, i) then %> - <% baseurl = baseurl .. '/' .. dir %> - / <%=dir%> - <% else %> - <% baseurl = baseurl .. '/' .. dir %> - / <%=dir%> - <% end %> - <% end %> -
- -
- -
-
    - <% for _, e in luci.util.vspairs(entries) do - local stat = nixio.fs.stat(filepath..e) - if stat and stat.type == 'dir' then - -%> -
  • - Directory - <%=e%>/ -
  • - <% end end -%> - - <% for _, e in luci.util.vspairs(entries) do - local stat = nixio.fs.stat(filepath..e) - if stat and stat.type ~= 'dir' then - -%> -
  • - File - <%=e%> -
  • - <% end end -%> -
-
- - diff --git a/libs/cbi/luasrc/view/cbi/firewall_zonelist.htm b/libs/cbi/luasrc/view/cbi/firewall_zonelist.htm deleted file mode 100644 index 4f4106b87a..0000000000 --- a/libs/cbi/luasrc/view/cbi/firewall_zonelist.htm +++ /dev/null @@ -1,89 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2009 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$ - --%> -<%+cbi/valueheader%> - -<%- - local utl = require "luci.util" - local fwm = require "luci.model.firewall" - local nwm = require "luci.model.network" - - local zone, net, iface - local zones = fwm:get_zones() - local value = self:formvalue(section) - if not value or value == "-" then value = self:cfgvalue(section) or self.default end - - local selected = false - local checked = { } - - if value and #value == 0 then - value = nil - elseif type(value) == "table" then - for _, value in ipairs(value) do - checked[value] = true - end - elseif value then - checked[value] = true - end --%> - -
    - <% - for _, zone in utl.spairs(zones, function(a,b) return (zones[a]:name() < zones[b]:name()) end) do - if zone:name() ~= self.exclude then - selected = selected or (value == zone:name()) - %> -
  • - />   - style="background-color:<%=zone:get_color()%>; padding:0.5em"> - <%=zone:name()%>: - <% - local zempty = true - for _, net in ipairs(zone:get_networks()) do - net = nwm:get_network(net) - if net then - zempty = false - %> -   - <%- if net:name() == self.network then -%> - <%=net:name()%>: - <%- else -%> - <%=net:name()%>: - <%- end -%> - <% - local nempty = true - for _, iface in ipairs(net and net:get_interfaces() or {}) do - nempty = false - %> - style="width:16px; height:16px; vertical-align:middle" src="<%=resource%>/icons/<%=iface:type()%><%=iface:is_up() and "" or "_disabled"%>.png" /> - <% end %> - <% if nempty then %><%:(no interfaces attached)%><% end %> - - <% end end %> - <% if zempty then %><%:(no interfaces attached)%><% end %> - -
  • - <% end end %> - - <% if self.widget ~= "checkbox" and not self.nocreate then %> -
  • - />   -
    - ><%:unspecified -or- create:%>  - onfocus="document.getElementById('<%=cbid%>_new').checked=true" /> -
    -
  • - <% end %> -
- -<%+cbi/valuefooter%> diff --git a/libs/cbi/luasrc/view/cbi/footer.htm b/libs/cbi/luasrc/view/cbi/footer.htm deleted file mode 100644 index fe5b6881c2..0000000000 --- a/libs/cbi/luasrc/view/cbi/footer.htm +++ /dev/null @@ -1,29 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> - <%- if pageaction then -%> -
- <% if flow.skip then %> - - <% end %> - <% if not autoapply then%> - - <% end %> - - - -
- <%- end -%> - -<%+footer%> diff --git a/libs/cbi/luasrc/view/cbi/full_valuefooter.htm b/libs/cbi/luasrc/view/cbi/full_valuefooter.htm deleted file mode 100644 index c069b7f92c..0000000000 --- a/libs/cbi/luasrc/view/cbi/full_valuefooter.htm +++ /dev/null @@ -1,74 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> - - <% if self.description and #self.description > 0 then -%> - <% if not luci.util.instanceof( self, luci.cbi.Flag ) or self.orientation == "horizontal" then -%> -
- <%- end %> -
- <%:help%> - <%=self.description%> -
- <%- end %> - <%- if self.title and #self.title > 0 then -%> -
- <%- end -%> - - - -<% if #self.deps > 0 or #self.subdeps > 0 then -%> - -<%- end %> diff --git a/libs/cbi/luasrc/view/cbi/full_valueheader.htm b/libs/cbi/luasrc/view/cbi/full_valueheader.htm deleted file mode 100644 index ecd4014983..0000000000 --- a/libs/cbi/luasrc/view/cbi/full_valueheader.htm +++ /dev/null @@ -1,24 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> - -
"> - <%- if self.title and #self.title > 0 then -%> - -
- <%- end -%> diff --git a/libs/cbi/luasrc/view/cbi/fvalue.htm b/libs/cbi/luasrc/view/cbi/fvalue.htm deleted file mode 100644 index 35ebac6e1c..0000000000 --- a/libs/cbi/luasrc/view/cbi/fvalue.htm +++ /dev/null @@ -1,17 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> -<%+cbi/valueheader%> - value="1" /> -<%+cbi/valuefooter%> diff --git a/libs/cbi/luasrc/view/cbi/header.htm b/libs/cbi/luasrc/view/cbi/header.htm deleted file mode 100644 index fd1ab8bd1a..0000000000 --- a/libs/cbi/luasrc/view/cbi/header.htm +++ /dev/null @@ -1,22 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008-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$ - --%> - -<%+header%> -
-
- - - -
diff --git a/libs/cbi/luasrc/view/cbi/lvalue.htm b/libs/cbi/luasrc/view/cbi/lvalue.htm deleted file mode 100644 index 8c7581a2ca..0000000000 --- a/libs/cbi/luasrc/view/cbi/lvalue.htm +++ /dev/null @@ -1,32 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> -<%+cbi/valueheader%> -<% if self.widget == "select" then %> - -<% elseif self.widget == "radio" then - local c = 0 - for i, key in pairs(self.keylist) do - c = c + 1 -%> - /> - ><%=self.vallist[i]%> -<% if c == self.size then c = 0 %><% if self.orientation == "horizontal" then %> <% else %>
<% end %> -<% end end %> -<% end %> -<%+cbi/valuefooter%> diff --git a/libs/cbi/luasrc/view/cbi/map.htm b/libs/cbi/luasrc/view/cbi/map.htm deleted file mode 100644 index be0c37aa77..0000000000 --- a/libs/cbi/luasrc/view/cbi/map.htm +++ /dev/null @@ -1,63 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> - -
- <% 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 -%> - <%- self:render_children() %> -
-
diff --git a/libs/cbi/luasrc/view/cbi/mvalue.htm b/libs/cbi/luasrc/view/cbi/mvalue.htm deleted file mode 100644 index 3812a3f7ef..0000000000 --- a/libs/cbi/luasrc/view/cbi/mvalue.htm +++ /dev/null @@ -1,35 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> -<% -local v = self:valuelist(section) or {} -%> -<%+cbi/valueheader%> -<% if self.widget == "select" then %> - -<% elseif self.widget == "checkbox" then - local c = 0; - for i, key in pairs(self.keylist) do - c = c + 1 -%> - /> - ><%=self.vallist[i]%>
-<% if c == self.size then c = 0 %>
-<% end end %> -<% end %> -<%+cbi/valuefooter%> diff --git a/libs/cbi/luasrc/view/cbi/network_ifacelist.htm b/libs/cbi/luasrc/view/cbi/network_ifacelist.htm deleted file mode 100644 index 2f98218170..0000000000 --- a/libs/cbi/luasrc/view/cbi/network_ifacelist.htm +++ /dev/null @@ -1,54 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2009 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$ - --%> -<%+cbi/valueheader%> - -<%- - local utl = require "luci.util" - local net = require "luci.model.network" - - local iface - local ifaces = net:get_interfaces() - local value = (self:formvalue(section) or self.default or "") - local checked = { } - - if value and #value > 0 then - if type(value) == "table" then value = table.concat(value, " ") end - for value in value:gmatch("%S+") do - checked[value] = true - end - else - local n = self.network and net:get_network(self.network) - if n then - local i - for _, i in ipairs(n:get_interfaces()) do - checked[i:name()] = true - end - end - end --%> - -
    - <% for _, iface in utl.spairs(ifaces, function(a,b) return (ifaces[a]:type() < ifaces[b]:type()) end) do - if not self.nobridges or not iface:is_bridge() then %> -
  • - " onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)"<%=attr("type", self.widget or "radio") .. attr("id", cbid .. "." .. iface:name()) .. attr("name", cbid) .. attr("value", iface:name()) .. ifattr(checked[iface:name()], "checked", "checked")%> />   - > - .png" /> - <%=iface:get_i18n()%><% local n = iface:get_network(); if n then %> (<%=n:name()%>)<% end %> - -
  • - <% end end %> -
- -<%+cbi/valuefooter%> diff --git a/libs/cbi/luasrc/view/cbi/network_netlist.htm b/libs/cbi/luasrc/view/cbi/network_netlist.htm deleted file mode 100644 index c47b3a70ee..0000000000 --- a/libs/cbi/luasrc/view/cbi/network_netlist.htm +++ /dev/null @@ -1,61 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2009 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$ - --%> -<%+cbi/valueheader%> - -<%- - local utl = require "luci.util" - local nwm = require "luci.model.network" - - local net, iface - local networks = nwm:get_networks() - local value = self:formvalue(section) - - if not value or value == "-" then - value = self:cfgvalue(section) or self.default - end --%> - -
    - <% for _, net in utl.spairs(networks, function(a,b) return (networks[a]:name() < networks[b]:name()) end) do - if net:name() ~= "loopback" then %> -
  • - />   - > -  <%=net:name()%>: - <% - local empty = true - for _, iface in ipairs(net:get_interfaces()) do - if not iface:is_bridge() then - empty = false - %> - style="width:16px; height:16px; vertical-align:middle" src="<%=resource%>/icons/<%=iface:type()%><%=iface:is_up() and "" or "_disabled"%>.png" /> - <% end end %> - <% if empty then %><%:(no interfaces attached)%><% end %> - - -
  • - <% end end %> - - <% if self.widget ~= "checkbox" and not self.nocreate then %> -
  • - />   -
    - ><%:unspecified -or- create:%>  - onfocus="document.getElementById('<%=cbid%>_new').checked=true" /> -
    -
  • - <% end %> -
- -<%+cbi/valuefooter%> diff --git a/libs/cbi/luasrc/view/cbi/nsection.htm b/libs/cbi/luasrc/view/cbi/nsection.htm deleted file mode 100644 index 1d231c5424..0000000000 --- a/libs/cbi/luasrc/view/cbi/nsection.htm +++ /dev/null @@ -1,46 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008-2009 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$ - --%> - -<% if self:cfgvalue(self.section) then section = self.section %> -
- <% if self.title and #self.title > 0 then -%> - <%=self.title%> - <%- end %> - <% if self.description and #self.description > 0 then -%> -
<%=self.description%>
- <%- end %> - <% if self.addremove then -%> -
- -
- <%- end %> - <%+cbi/tabmenu%> -
- <%+cbi/ucisection%> -
-
-
-<% elseif self.addremove then %> - <% if self.template_addremove then include(self.template_addremove) else -%> -
- <% if self.title and #self.title > 0 then -%> - <%=self.title%> - <%- end %> -
<%=self.description%>
- -
- <%- end %> -<% end %> - diff --git a/libs/cbi/luasrc/view/cbi/nullsection.htm b/libs/cbi/luasrc/view/cbi/nullsection.htm deleted file mode 100644 index f1c715b408..0000000000 --- a/libs/cbi/luasrc/view/cbi/nullsection.htm +++ /dev/null @@ -1,32 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> -
- <% if self.title and #self.title > 0 then -%> - <%=self.title%> - <%- end %> -
- <% self:render_children(1, scope or {}) %> -
-
-
- <%- - if type(self.hidden) == "table" then - for k, v in pairs(self.hidden) do - -%> - - <%- - end - end - %> diff --git a/libs/cbi/luasrc/view/cbi/simpleform.htm b/libs/cbi/luasrc/view/cbi/simpleform.htm deleted file mode 100644 index 9c40f8290c..0000000000 --- a/libs/cbi/luasrc/view/cbi/simpleform.htm +++ /dev/null @@ -1,66 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> -<% if not self.embedded then %> - -
- - -
-<% end %> -
- <% if self.title and #self.title > 0 then %>

<%=self.title%>

<% end %> - <% if self.description and #self.description > 0 then %>
<%=self.description%>
<% end %> - <% self:render_children() %> -
-
-<%- if self.message then %> -
<%=self.message%>
-<%- end %> -<%- if self.errmessage then %> -
<%=self.errmessage%>
-<%- end %> -<% if not self.embedded then %> -
-<%- - if type(self.hidden) == "table" then - for k, v in pairs(self.hidden) do --%> - -<%- - end - end -%> -<%- if self.flow and self.flow.skip then %> - -<% end %> -<%- if self.submit ~= false then %> - -<% end %> -<%- if self.reset ~= false then %> - -<% end %> -<%- if self.cancel ~= false and self.on_cancel then %> - -<% end %> - -
- -<% end %> diff --git a/libs/cbi/luasrc/view/cbi/tabcontainer.htm b/libs/cbi/luasrc/view/cbi/tabcontainer.htm deleted file mode 100644 index 9b2c7980a8..0000000000 --- a/libs/cbi/luasrc/view/cbi/tabcontainer.htm +++ /dev/null @@ -1,21 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2009 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$ - --%> - -<% for tab, data in pairs(self.tabs) do %> -
style="display:none"<% end %>> - <% if data.description then %>
<%=data.description%>
<% end %> - <% self:render_tab(tab, section, scope or {}) %> -
- -<% end %> diff --git a/libs/cbi/luasrc/view/cbi/tabmenu.htm b/libs/cbi/luasrc/view/cbi/tabmenu.htm deleted file mode 100644 index 7648fe011b..0000000000 --- a/libs/cbi/luasrc/view/cbi/tabmenu.htm +++ /dev/null @@ -1,27 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2009 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$ - --%> - -<%- if self.tabs then %> -
    - <%- self.selected_tab = luci.http.formvalue("tab." .. self.config .. "." .. section) %> - <%- for _, tab in ipairs(self.tab_names) do if #self.tabs[tab].childs > 0 then %> - - <%- if not self.selected_tab then self.selected_tab = tab end %> -
  • - <%=self.tabs[tab].title%> - <% if tab == self.selected_tab then %><% end %> -
  • - <% end end -%> -
-<% end -%> diff --git a/libs/cbi/luasrc/view/cbi/tblsection.htm b/libs/cbi/luasrc/view/cbi/tblsection.htm deleted file mode 100644 index 0224610674..0000000000 --- a/libs/cbi/luasrc/view/cbi/tblsection.htm +++ /dev/null @@ -1,135 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> -<%- -local rowcnt = 1 -function rowstyle() - rowcnt = rowcnt + 1 - return (rowcnt % 2) + 1 -end --%> - - -
- <% if self.title and #self.title > 0 then -%> - <%=self.title%> - <%- end %> -
<%=self.description%>
-
- <%- local count = 0 -%> - - - <%- if not self.anonymous then -%> - <%- if self.sectionhead then -%> - - <%- else -%> - - <%- end -%> - <%- end -%> - <%- for i, k in pairs(self.children) do if not k.optional then -%> - - <%- count = count + 1; end; end; if self.extedit or self.addremove then -%> - - <%- count = count + 1; end -%> - - - <%- if not self.anonymous then -%> - <%- if self.sectiondesc then -%> - - <%- else -%> - - <%- end -%> - <%- end -%> - <%- for i, k in pairs(self.children) do if not k.optional then -%> - - <%- end; end; if self.extedit or self.addremove then -%> - - <%- end -%> - - <%- local isempty = true - for i, k in ipairs(self:cfgsections()) do - section = k - isempty = false - scope = { valueheader = "cbi/cell_valueheader", valuefooter = "cbi/cell_valuefooter" } - -%> - - <% if not self.anonymous then -%> - - <%- end %> - - - <%- - for k, node in ipairs(self.children) do - if not node.optional then - node:render(section, scope or {}) - end - end - -%> - - <%- if self.extedit or self.addremove then -%> - - <%- end -%> - - <%- end -%> - - <%- if isempty then -%> - - - - <%- end -%> -
<%=self.sectionhead%>  - <%- if k.titleref then -%><%- end -%> - <%-=k.title-%> - <%- if k.titleref then -%><%- end -%> -  
<%=self.sectiondesc%><%=k.description%>

<%=(type(self.sectiontitle) == "function") and self:sectiontitle(section) or k%>

- <%- if self.extedit then -%> - - <%=self.extedit:format(section)%> - <%- elseif type(self.extedit) == "function" then -%> - <%=self:extedit(section)%> - <%- end -%> - " title="<%:Edit%>"><%:Edit%> - <%- end; if self.addremove then %> - - <%- end -%> -

<%:This section contains no values yet%>
- - <% if self.error then %> -
-
    <% for _, c in pairs(self.error) do for _, e in ipairs(c) do -%> -
  • <%=pcdata(e):gsub("\n","
    ")%>
  • - <%- end end %>
-
- <% end %> - - <%- if self.addremove then -%> - <% if self.template_addremove then include(self.template_addremove) else -%> -
- <% if self.anonymous then %> - - <% else %> - <% if self.invalid_cts then -%>
<% end %> - - - <% if self.invalid_cts then -%> -
<%:Invalid%>
- <%- end %> - <% end %> -
- <%- end %> - <%- end -%> -
-
- diff --git a/libs/cbi/luasrc/view/cbi/tsection.htm b/libs/cbi/luasrc/view/cbi/tsection.htm deleted file mode 100644 index 0fa285c160..0000000000 --- a/libs/cbi/luasrc/view/cbi/tsection.htm +++ /dev/null @@ -1,62 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> - -
- <% if self.title and #self.title > 0 then -%> - <%=self.title%> - <%- end %> -
<%=self.description%>
- <% local isempty = true for i, k in ipairs(self:cfgsections()) do -%> - <% if self.addremove then -%> -
- -
- <%- end %> - - <%- section = k; isempty = false -%> - - <% if not self.anonymous then -%> -

<%=section:upper()%>

- <%- end %> - - <%+cbi/tabmenu%> - -
- <%+cbi/ucisection%> -
-
- <%- end %> - - <% if isempty then -%> - <%:This section contains no values yet%>

- <%- end %> - - <% if self.addremove then -%> - <% if self.template_addremove then include(self.template_addremove) else -%> -
- <% if self.anonymous then -%> - - <%- else -%> - <% if self.invalid_cts then -%>
<% end %> - - - <% if self.invalid_cts then -%> -
<%:Invalid%>
- <%- end %> - <%- end %> -
- <%- end %> - <%- end %> -
diff --git a/libs/cbi/luasrc/view/cbi/tvalue.htm b/libs/cbi/luasrc/view/cbi/tvalue.htm deleted file mode 100644 index b628c5c524..0000000000 --- a/libs/cbi/luasrc/view/cbi/tvalue.htm +++ /dev/null @@ -1,19 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> -<%+cbi/valueheader%> - -<%+cbi/valuefooter%> diff --git a/libs/cbi/luasrc/view/cbi/ucisection.htm b/libs/cbi/luasrc/view/cbi/ucisection.htm deleted file mode 100644 index db32c90439..0000000000 --- a/libs/cbi/luasrc/view/cbi/ucisection.htm +++ /dev/null @@ -1,90 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> - -<%- - if type(self.hidden) == "table" then - for k, v in pairs(self.hidden) do --%> - -<%- - end - end -%> - -<% if self.tabs then %> - <%+cbi/tabcontainer%> -<% else %> - <% self:render_children(section, scope or {}) %> -<% end %> - -<% if self.error and self.error[section] then -%> -
-
    <% for _, e in ipairs(self.error[section]) do -%> -
  • - <%- if e == "invalid" then -%> - <%:One or more fields contain invalid values!%> - <%- elseif e == "missing" then -%> - <%:One or more required fields have no value!%> - <%- else -%> - <%=pcdata(e)%> - <%- end -%> -
  • - <%- end %>
-
-<%- end %> - -<% if self.optionals[section] and #self.optionals[section] > 0 or self.dynamic then %> -
- <% if self.dynamic then %> - - <% if self.optionals[section] and #self.optionals[section] > 0 then %> - - <% end %> - <% else %> - - - <% end %> - -
-<% end %> diff --git a/libs/cbi/luasrc/view/cbi/upload.htm b/libs/cbi/luasrc/view/cbi/upload.htm deleted file mode 100644 index f5baa33fe4..0000000000 --- a/libs/cbi/luasrc/view/cbi/upload.htm +++ /dev/null @@ -1,29 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008-2009 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$ - --%> - -<% - local t = require("luci.tools.webadmin") - local v = self:cfgvalue(section) - local s = v and nixio.fs.stat(v) --%> -<%+cbi/valueheader%> - <% if s then %> - <%:Uploaded File%> (<%=t.byte_format(s.size)%>) - /> - " alt="<%:Replace entry%>" title="<%:Replace entry%>" src="<%=resource%>/cbi/reload.gif" /> - <% else %> - /> - <% end %> -<%+cbi/valuefooter%> diff --git a/libs/cbi/luasrc/view/cbi/value.htm b/libs/cbi/luasrc/view/cbi/value.htm deleted file mode 100644 index a7b49de7ff..0000000000 --- a/libs/cbi/luasrc/view/cbi/value.htm +++ /dev/null @@ -1,44 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008-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$ - --%> -<%+cbi/valueheader%> - /> - <% if self.password then %><% end %> - <% if #self.keylist > 0 or self.datatype then -%> - - <% end -%> -<%+cbi/valuefooter%> diff --git a/libs/cbi/luasrc/view/cbi/valuefooter.htm b/libs/cbi/luasrc/view/cbi/valuefooter.htm deleted file mode 100644 index a65c7a3874..0000000000 --- a/libs/cbi/luasrc/view/cbi/valuefooter.htm +++ /dev/null @@ -1,16 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> - -<% include( valuefooter or "cbi/full_valuefooter" ) %> diff --git a/libs/cbi/luasrc/view/cbi/valueheader.htm b/libs/cbi/luasrc/view/cbi/valueheader.htm deleted file mode 100644 index f3da909e66..0000000000 --- a/libs/cbi/luasrc/view/cbi/valueheader.htm +++ /dev/null @@ -1,16 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 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$ - --%> - -<% include( valueheader or "cbi/full_valueheader" ) %> -- cgit v1.2.3