From 30c8b259e1b7012f7c16c1ee5aeb1997e44dcbdc Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Tue, 27 May 2008 08:32:10 +0000 Subject: * Separated CBI from LuCI Web * Updated OpenWRT-Makefile --- applications/cbi/root/www/resources/cbi.js | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 applications/cbi/root/www/resources/cbi.js (limited to 'applications/cbi/root/www') diff --git a/applications/cbi/root/www/resources/cbi.js b/applications/cbi/root/www/resources/cbi.js new file mode 100644 index 0000000000..a3a47aa45b --- /dev/null +++ b/applications/cbi/root/www/resources/cbi.js @@ -0,0 +1,42 @@ +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] = []; + } + cbi_d[target][value].push(field); +} + +function cbi_d_update(target) { + if (!cbi_d[target]) { + return; + } + + for (var x in cbi_d[target]) { + for (var i=0; i