projects
/
oweals
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libs/web: align interface related widgets to changed network model api
[oweals/luci.git]
/
libs
/
web
/
luasrc
/
cbi.lua
diff --git
a/libs/web/luasrc/cbi.lua
b/libs/web/luasrc/cbi.lua
index 5dd57e2e969aa17dd8a39b01389409d66877e5c6..5aa2f5a092ef604c8628d1e1b96ec1455fd70ff9 100644
(file)
--- a/
libs/web/luasrc/cbi.lua
+++ b/
libs/web/luasrc/cbi.lua
@@
-211,7
+211,9
@@
end
-- Render the children
function Node.render_children(self, ...)
-- Render the children
function Node.render_children(self, ...)
+ local k, node
for k, node in ipairs(self.children) do
for k, node in ipairs(self.children) do
+ node.last_child = (k == #self.children)
node:render(...)
end
end
node:render(...)
end
end
@@
-805,7
+807,9
@@
function AbstractSection.render_tab(self, tab, ...)
assert(tab and self.tabs and self.tabs[tab],
"Cannot render not existing tab %q" % tostring(tab))
assert(tab and self.tabs and self.tabs[tab],
"Cannot render not existing tab %q" % tostring(tab))
- for _, node in ipairs(self.tabs[tab].childs) do
+ local k, node
+ for k, node in ipairs(self.tabs[tab].childs) do
+ node.last_child = (k == #self.tabs[tab].childs)
node:render(...)
end
end
node:render(...)
end
end