projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b0b226
)
* luci/core: cbi.lua: automatically set size of MultiValue fields
author
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 2 Jun 2008 16:21:41 +0000
(16:21 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 2 Jun 2008 16:21:41 +0000
(16:21 +0000)
libs/cbi/luasrc/cbi.lua
patch
|
blob
|
history
diff --git
a/libs/cbi/luasrc/cbi.lua
b/libs/cbi/luasrc/cbi.lua
index ace35d951dc0473909f1e7dd4cba04dda86395fc..42b58ce0b4413d727027ff8b35d13a142236dad5 100644
(file)
--- a/
libs/cbi/luasrc/cbi.lua
+++ b/
libs/cbi/luasrc/cbi.lua
@@
-579,6
+579,12
@@
function AbstractValue.render(self, s, scope)
if not self.optional or self:cfgvalue(s) or self:formcreated(s) then
scope = scope or {}
scope.section = s
+
+ -- fixup size for MultiValue fields
+ if instanceof(self, MultiValue) and self.widget == "select" and not self.size then
+ self.size = #self.vallist
+ end
+
Node.render(self, scope)
end
end