projects
/
project
/
luci2
/
ui.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a04433c
)
luci2: make LuCI2.cbi.AbstractSection and LuCI2.cbi.AbstractValue public
author
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 18 Sep 2013 11:22:06 +0000
(13:22 +0200)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 18 Sep 2013 11:22:06 +0000
(13:22 +0200)
luci2/htdocs/luci2/luci2.js
patch
|
blob
|
history
diff --git
a/luci2/htdocs/luci2/luci2.js
b/luci2/htdocs/luci2/luci2.js
index 745f9554449bca21dd299eb7bedbaf82060ccec8..e401c7c41b701b96d86ead02edcbff0a7ab245d0 100644
(file)
--- a/
luci2/htdocs/luci2/luci2.js
+++ b/
luci2/htdocs/luci2/luci2.js
@@
-2984,7
+2984,7
@@
function LuCI2()
};
};
-
var
AbstractValue = AbstractWidget.extend({
+
this.cbi.
AbstractValue = AbstractWidget.extend({
init: function(name, options)
{
this.name = name;
init: function(name, options)
{
this.name = name;
@@
-3250,11
+3250,11
@@
function LuCI2()
{
if (typeof(d[i]) == 'string')
dep[d[i]] = true;
{
if (typeof(d[i]) == 'string')
dep[d[i]] = true;
- else if (d[i] instanceof AbstractValue)
+ else if (d[i] instanceof
_luci2.cbi.
AbstractValue)
dep[d[i].name] = true;
}
}
dep[d[i].name] = true;
}
}
- else if (d instanceof AbstractValue)
+ else if (d instanceof
_luci2.cbi.
AbstractValue)
{
dep = { };
dep[d.name] = (typeof(v) == 'undefined') ? true : v;
{
dep = { };
dep[d.name] = (typeof(v) == 'undefined') ? true : v;
@@
-3362,7
+3362,7
@@
function LuCI2()
}
});
}
});
- this.cbi.CheckboxValue = AbstractValue.extend({
+ this.cbi.CheckboxValue =
this.cbi.
AbstractValue.extend({
widget: function(sid)
{
var o = this.options;
widget: function(sid)
{
var o = this.options;
@@
-3427,7
+3427,7
@@
function LuCI2()
}
});
}
});
- this.cbi.InputValue = AbstractValue.extend({
+ this.cbi.InputValue =
this.cbi.
AbstractValue.extend({
widget: function(sid)
{
var i = $('<input />')
widget: function(sid)
{
var i = $('<input />')
@@
-3440,7
+3440,7
@@
function LuCI2()
}
});
}
});
- this.cbi.PasswordValue = AbstractValue.extend({
+ this.cbi.PasswordValue =
this.cbi.
AbstractValue.extend({
widget: function(sid)
{
var i = $('<input />')
widget: function(sid)
{
var i = $('<input />')
@@
-3469,7
+3469,7
@@
function LuCI2()
}
});
}
});
- this.cbi.ListValue = AbstractValue.extend({
+ this.cbi.ListValue =
this.cbi.
AbstractValue.extend({
widget: function(sid)
{
var s = $('<select />');
widget: function(sid)
{
var s = $('<select />');
@@
-3564,7
+3564,7
@@
function LuCI2()
}
});
}
});
- this.cbi.ComboBox = AbstractValue.extend({
+ this.cbi.ComboBox =
this.cbi.
AbstractValue.extend({
_change: function(ev)
{
var s = ev.target;
_change: function(ev)
{
var s = ev.target;
@@
-3933,7
+3933,7
@@
function LuCI2()
}
});
}
});
- this.cbi.DummyValue = AbstractValue.extend({
+ this.cbi.DummyValue =
this.cbi.
AbstractValue.extend({
widget: function(sid)
{
return $('<div />')
widget: function(sid)
{
return $('<div />')
@@
-3948,7
+3948,7
@@
function LuCI2()
}
});
}
});
- this.cbi.NetworkList = AbstractValue.extend({
+ this.cbi.NetworkList =
this.cbi.
AbstractValue.extend({
load: function(sid)
{
var self = this;
load: function(sid)
{
var self = this;
@@
-4111,7
+4111,7
@@
function LuCI2()
});
});
-
var
AbstractSection = AbstractWidget.extend({
+
this.cbi.
AbstractSection = AbstractWidget.extend({
id: function()
{
var s = [ arguments[0], this.map.uci_package, this.uci_type ];
id: function()
{
var s = [ arguments[0], this.map.uci_package, this.uci_type ];
@@
-4161,7
+4161,7
@@
function LuCI2()
var w = widget ? new widget(name, options) : null;
var w = widget ? new widget(name, options) : null;
- if (!(w instanceof AbstractValue))
+ if (!(w instanceof
_luci2.cbi.
AbstractValue))
throw 'Widget must be an instance of AbstractValue';
w.section = this;
throw 'Widget must be an instance of AbstractValue';
w.section = this;
@@
-4257,7
+4257,7
@@
function LuCI2()
}
});
}
});
- this.cbi.TypedSection = AbstractSection.extend({
+ this.cbi.TypedSection =
this.cbi.
AbstractSection.extend({
init: function(uci_type, options)
{
this.uci_type = uci_type;
init: function(uci_type, options)
{
this.uci_type = uci_type;
@@
-4388,9
+4388,9
@@
function LuCI2()
for (var i = 0; i < this.options.teasers.length; i++)
{
var f = this.options.teasers[i];
for (var i = 0; i < this.options.teasers.length; i++)
{
var f = this.options.teasers[i];
- if (f instanceof AbstractValue)
+ if (f instanceof
_luci2.cbi.
AbstractValue)
tf.push(f);
tf.push(f);
- else if (typeof(f) == 'string' && this.fields[f] instanceof AbstractValue)
+ else if (typeof(f) == 'string' && this.fields[f] instanceof
_luci2.cbi.
AbstractValue)
tf.push(this.fields[f]);
}
}
tf.push(this.fields[f]);
}
}
@@
-5061,7
+5061,7
@@
function LuCI2()
{
var w = widget ? new widget(uci_type, options) : null;
{
var w = widget ? new widget(uci_type, options) : null;
- if (!(w instanceof AbstractSection))
+ if (!(w instanceof
_luci2.cbi.
AbstractSection))
throw 'Widget must be an instance of AbstractSection';
w.map = this;
throw 'Widget must be an instance of AbstractSection';
w.map = this;