From 140ea54616c225b7d3629ebb3c1fd1ddf5c71692 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 13 Apr 2014 22:20:51 +0200 Subject: [PATCH] luci2: revert uci changes when closing cbi.Model dialog --- luci2/htdocs/luci2/luci2.js | 11 +++++++++-- 1 file 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(); }, -- 2.30.2