From: Steven Barth Date: Mon, 9 Nov 2009 11:22:29 +0000 (+0000) Subject: CBI: Fix subdependencies X-Git-Tag: 0.10.0~969 X-Git-Url: http://git.archive.openwrt.org/?a=commitdiff_plain;h=284f85fb4e185bf743c404161d0a83be858420c6;p=project%2Fluci.git CBI: Fix subdependencies --- diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index 8ca9e5c8d..f6a2694b2 100644 --- a/libs/cbi/luasrc/cbi.lua +++ b/libs/cbi/luasrc/cbi.lua @@ -1265,6 +1265,7 @@ function AbstractValue.__init__(self, map, section, option, ...) self.tag_reqerror = {} self.tag_error = {} self.deps = {} + self.subdeps = {} --self.cast = "string" self.track_missing = false @@ -1595,7 +1596,7 @@ function ListValue.value(self, key, val, ...) table.insert(self.vallist, tostring(val)) for i, deps in ipairs({...}) do - table.insert(self.deps, {add = "-"..key, deps=deps}) + self.subdeps[#self.subdeps + 1] = {add = "-"..key, deps=deps} end end diff --git a/libs/cbi/luasrc/view/cbi/full_valuefooter.htm b/libs/cbi/luasrc/view/cbi/full_valuefooter.htm index bdcd31484..9130a99f9 100644 --- a/libs/cbi/luasrc/view/cbi/full_valuefooter.htm +++ b/libs/cbi/luasrc/view/cbi/full_valuefooter.htm @@ -27,8 +27,21 @@ $Id$ <%- end -%> -<% if #self.deps > 0 then -%> + +<% if #self.deps > 0 or #self.subdeps > 0 then -%>