projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a6dc74
)
luci-base: uci: fixed reorder bug where missed deletes caused off-by-one
author
Paul Donald
<
[email protected]
>
Mon, 25 Nov 2024 20:26:35 +0000
(21:26 +0100)
committer
Paul Donald
<
[email protected]
>
Mon, 25 Nov 2024 20:26:35 +0000
(21:26 +0100)
Signed-off-by: Paul Donald <
[email protected]
>
modules/luci-base/htdocs/luci-static/resources/uci.js
patch
|
blob
|
history
diff --git
a/modules/luci-base/htdocs/luci-static/resources/uci.js
b/modules/luci-base/htdocs/luci-static/resources/uci.js
index e52c184e51f2dc9bb7dc6c661e066d573dfbc0c5..35110c0227b4b8fc73a8c2765475ac99e8e32653 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/uci.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/uci.js
@@
-153,6
+153,7
@@
return baseclass.extend(/** @lends LuCI.uci.prototype */ {
reorderSections: function() {
var v = this.state.values,
n = this.state.creates,
+ d = this.state.deletes,
r = this.state.reorder,
tasks = [];
@@
-166,10
+167,16
@@
return baseclass.extend(/** @lends LuCI.uci.prototype */ {
for (var c in r) {
var o = [ ];
+ // skip deletes within re-orders
+ if (d[c])
+ continue;
+
+ // push creates
if (n[c])
for (var s in n[c])
o.push(n[c][s]);
+ // push values
for (var s in v[c])
o.push(v[c][s]);