From: Steven Barth Date: Tue, 16 Sep 2008 10:09:14 +0000 (+0000) Subject: Internet suXplorer JavaScript compatibility fixes X-Git-Tag: 0.8.0~68 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5761b6e2dc2c25bd8f0b31057422d2b885fcdf31;p=project%2Fluci.git Internet suXplorer JavaScript compatibility fixes --- diff --git a/libs/cbi/luasrc/view/cbi/cell_valuefooter.htm b/libs/cbi/luasrc/view/cbi/cell_valuefooter.htm index 6dd5667146..e4f7982942 100644 --- a/libs/cbi/luasrc/view/cbi/cell_valuefooter.htm +++ b/libs/cbi/luasrc/view/cbi/cell_valuefooter.htm @@ -21,7 +21,8 @@ $Id$ <%- for k,v in pairs(d.deps) do -%> - <%-=string.format('"cbid.%s.%s.%s"', self.config, section, k) .. ":" .. string.format("%q", v)-%>, + <%-=string.format('"cbid.%s.%s.%s"', self.config, section, k) .. ":" .. string.format("%q", v)-%> + <%-if next(d.deps, k) then-%>,<%-end-%> <%- end -%> diff --git a/libs/cbi/luasrc/view/cbi/dynlist.htm b/libs/cbi/luasrc/view/cbi/dynlist.htm index 1cfd6f03e5..fb76e494d4 100644 --- a/libs/cbi/luasrc/view/cbi/dynlist.htm +++ b/libs/cbi/luasrc/view/cbi/dynlist.htm @@ -30,7 +30,8 @@ $Id$ <%- for i, k in ipairs(self.keylist) do -%> - <%-=string.format("%q", k) .. ":" .. string.format("%q", self.vallist[i])-%>, + <%-=string.format("%q", k) .. ":" .. string.format("%q", self.vallist[i])-%> + <%-if i<#self.keylist then-%>,<%-end-%> <%- end -%> diff --git a/libs/cbi/luasrc/view/cbi/full_valuefooter.htm b/libs/cbi/luasrc/view/cbi/full_valuefooter.htm index e42043e78a..d05714033c 100644 --- a/libs/cbi/luasrc/view/cbi/full_valuefooter.htm +++ b/libs/cbi/luasrc/view/cbi/full_valuefooter.htm @@ -34,7 +34,8 @@ $Id$ <%- for k,v in pairs(d.deps) do -%> - <%-=string.format('"cbid.%s.%s.%s"', self.config, section, k) .. ":" .. string.format("%q", v)-%>, + <%-=string.format('"cbid.%s.%s.%s"', self.config, section, k) .. ":" .. string.format("%q", v)-%> + <%-if next(d.deps, k) then-%>,<%-end-%> <%- end -%> diff --git a/libs/cbi/luasrc/view/cbi/ucisection.htm b/libs/cbi/luasrc/view/cbi/ucisection.htm index e703053e13..5023f6a2f3 100644 --- a/libs/cbi/luasrc/view/cbi/ucisection.htm +++ b/libs/cbi/luasrc/view/cbi/ucisection.htm @@ -31,7 +31,8 @@ $Id$ <%- for i, val in pairs(self.optionals[section]) do -%> - <%-=string.format("%q", val.option) .. ":" .. string.format("%q", striptags(val.title))-%>, + <%-=string.format("%q", val.option) .. ":" .. string.format("%q", striptags(val.title))-%> + <%-if next(self.optionals[section], i) then-%>,<%-end-%> <%- end -%> diff --git a/libs/cbi/luasrc/view/cbi/value.htm b/libs/cbi/luasrc/view/cbi/value.htm index d85fa81d9d..9ffefc423f 100644 --- a/libs/cbi/luasrc/view/cbi/value.htm +++ b/libs/cbi/luasrc/view/cbi/value.htm @@ -20,7 +20,8 @@ $Id$ <%- for i, k in ipairs(self.keylist) do -%> - <%-=string.format("%q", k) .. ":" .. string.format("%q", self.vallist[i])-%>, + <%-=string.format("%q", k) .. ":" .. string.format("%q", self.vallist[i])-%> + <%-if i<#self.keylist then-%>,<%-end-%> <%- end -%>