Internet suXplorer JavaScript compatibility fixes
authorSteven Barth <steven@midlink.org>
Tue, 16 Sep 2008 10:08:20 +0000 (10:08 +0000)
committerSteven Barth <steven@midlink.org>
Tue, 16 Sep 2008 10:08:20 +0000 (10:08 +0000)
libs/cbi/luasrc/view/cbi/cell_valuefooter.htm
libs/cbi/luasrc/view/cbi/dynlist.htm
libs/cbi/luasrc/view/cbi/full_valuefooter.htm
libs/cbi/luasrc/view/cbi/ucisection.htm
libs/cbi/luasrc/view/cbi/value.htm

index 6dd5667..e4f7982 100644 (file)
@@ -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
                -%>
index d2e60b1..6068314 100644 (file)
@@ -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
                        -%>
index e42043e..d057140 100644 (file)
@@ -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
                -%>
index e703053..5023f6a 100644 (file)
@@ -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
                                -%>
index d85fa81..9ffefc4 100644 (file)
@@ -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
                -%>