From 97ce1ad8adf935e2aa0d1b13f07b16d2d950053f Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sun, 17 Aug 2008 18:32:53 +0000 Subject: Preparing rewrite of WiFi configuration --- libs/cbi/htdocs/luci-static/resources/cbi.js | 86 +++++++++++++++------------ libs/cbi/luasrc/cbi.lua | 16 ++++- libs/cbi/luasrc/view/cbi/cell_valuefooter.htm | 10 +++- libs/cbi/luasrc/view/cbi/footer.htm | 2 +- libs/cbi/luasrc/view/cbi/full_valuefooter.htm | 10 +++- libs/cbi/luasrc/view/cbi/lvalue.htm | 2 +- libs/cbi/luasrc/view/cbi/ucisection.htm | 13 +++- 7 files changed, 93 insertions(+), 46 deletions(-) (limited to 'libs/cbi') diff --git a/libs/cbi/htdocs/luci-static/resources/cbi.js b/libs/cbi/htdocs/luci-static/resources/cbi.js index 78a9e90bf6..d0e31e483a 100644 --- a/libs/cbi/htdocs/luci-static/resources/cbi.js +++ b/libs/cbi/htdocs/luci-static/resources/cbi.js @@ -1,38 +1,30 @@ -var cbi_d = {}; +var cbi_d = []; -function cbi_d_add(field, target, value) { - if (!cbi_d[target]) { - cbi_d[target] = {}; - } - if (!cbi_d[target][value]) { - cbi_d[target][value] = []; - } - +function cbi_d_add(field, dep) { var obj = document.getElementById(field); if (obj) { - var entry = { - "node": obj, - "parent": obj.parentNode, - "next": obj.nextSibling - } - cbi_d[target][value].unshift(entry); - } -} - -function cbi_d_update(target) { - if (!cbi_d[target]) { - return; - } - - for (var x in cbi_d[target]) { - for (var i=0; i 0 then -%> <%- end %> diff --git a/libs/cbi/luasrc/view/cbi/footer.htm b/libs/cbi/luasrc/view/cbi/footer.htm index b719058200..a688fcddde 100644 --- a/libs/cbi/luasrc/view/cbi/footer.htm +++ b/libs/cbi/luasrc/view/cbi/footer.htm @@ -17,7 +17,7 @@ $Id$ - + <%+footer%> diff --git a/libs/cbi/luasrc/view/cbi/full_valuefooter.htm b/libs/cbi/luasrc/view/cbi/full_valuefooter.htm index 5a52898d17..8084cfda98 100644 --- a/libs/cbi/luasrc/view/cbi/full_valuefooter.htm +++ b/libs/cbi/luasrc/view/cbi/full_valuefooter.htm @@ -34,7 +34,15 @@ $Id$ <% if #self.deps > 0 then -%> <%- end %> diff --git a/libs/cbi/luasrc/view/cbi/lvalue.htm b/libs/cbi/luasrc/view/cbi/lvalue.htm index 5108e85c48..60dd682808 100644 --- a/libs/cbi/luasrc/view/cbi/lvalue.htm +++ b/libs/cbi/luasrc/view/cbi/lvalue.htm @@ -16,7 +16,7 @@ $Id$ <% if self.widget == "select" then %> <% elseif self.widget == "radio" then diff --git a/libs/cbi/luasrc/view/cbi/ucisection.htm b/libs/cbi/luasrc/view/cbi/ucisection.htm index 2ae8560038..f8cf3d1bc0 100644 --- a/libs/cbi/luasrc/view/cbi/ucisection.htm +++ b/libs/cbi/luasrc/view/cbi/ucisection.htm @@ -27,8 +27,17 @@ $Id$ <%- end %> <% end %> -- cgit v1.2.3