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 (parent:
c67d90d
)
luci2: support custom section ordering in L.cbi.TypedSection and L.cbi.TableSection
author
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 13 Apr 2014 20:48:41 +0000
(22:48 +0200)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 13 Apr 2014 20:48:41 +0000
(22:48 +0200)
luci2/htdocs/luci2/luci2.js
patch
|
blob
|
history
diff --git
a/luci2/htdocs/luci2/luci2.js
b/luci2/htdocs/luci2/luci2.js
index
d275d1b
..
849a4d4
100644
(file)
--- a/
luci2/htdocs/luci2/luci2.js
+++ b/
luci2/htdocs/luci2/luci2.js
@@
-6482,6
+6482,11
@@
function LuCI2()
return true;
},
return true;
},
+ sort: function(section1, section2)
+ {
+ return 0;
+ },
+
sections: function(cb)
{
var s1 = L.uci.sections(this.map.uci_package);
sections: function(cb)
{
var s1 = L.uci.sections(this.map.uci_package);
@@
-6492,6
+6497,8
@@
function LuCI2()
if (this.filter(s1[i]))
s2.push(s1[i]);
if (this.filter(s1[i]))
s2.push(s1[i]);
+ s2.sort(this.sort);
+
if (typeof(cb) == 'function')
for (var i = 0; i < s2.length; i++)
cb.call(this, s2[i]);
if (typeof(cb) == 'function')
for (var i = 0; i < s2.length; i++)
cb.call(this, s2[i]);