summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2014-04-13 22:20:51 +0200
committerJo-Philipp Wich <jow@openwrt.org>2014-04-13 22:20:51 +0200
commit140ea54616c225b7d3629ebb3c1fd1ddf5c71692 (patch)
tree4c22f43ab8fdc205df70af69e3c38037161c84f7
parent1509f5561d2d66414ceb3450fe6512c872ec507d (diff)
downloadluci2-ui-140ea54616c225b7d3629ebb3c1fd1ddf5c71692.tar.gz
luci2: revert uci changes when closing cbi.Model dialog
-rw-r--r--luci2/htdocs/luci2/luci2.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/luci2/htdocs/luci2/luci2.js b/luci2/htdocs/luci2/luci2.js
index dac499f..95d3516 100644
--- a/luci2/htdocs/luci2/luci2.js
+++ b/luci2/htdocs/luci2/luci2.js
@@ -7273,9 +7273,8 @@ function LuCI2()
});
},
- reset: function()
+ revert: function()
{
- var self = this;
var packages = { };
for (var i = 0; i < this.sections.length; i++)
@@ -7284,6 +7283,13 @@ function LuCI2()
packages[this.uci_package] = true;
L.uci.unload(L.toArray(packages));
+ },
+
+ reset: function()
+ {
+ var self = this;
+
+ self.revert();
return self.insertInto(self.target);
},
@@ -7329,6 +7335,7 @@ function LuCI2()
var self = ev.data.self;
self.trigger('close', ev);
+ self.revert();
self.close();
},