summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js3
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js6
2 files changed, 8 insertions, 1 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js
index 67aecf262c..8ba259e2c9 100644
--- a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js
+++ b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js
@@ -922,6 +922,9 @@ return baseclass.extend({
s.getOption('vlan_filtering').updateDefaultValue(s.section);
+ s.map.addedVLANs = s.map.addedVLANs || [];
+ s.map.addedVLANs.push(section_id);
+
return this.redraw();
}, this));
};
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js
index 7e9eadf788..694d43141f 100644
--- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js
+++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js
@@ -1302,7 +1302,7 @@ return view.extend({
nettools.addDeviceOptions(s, dev, isNew);
};
- s.handleModalCancel = function(/* ... */) {
+ s.handleModalCancel = function(map /*, ... */) {
var name = uci.get('network', this.addedSection, 'name')
uci.sections('network', 'bridge-vlan', function(bvs) {
@@ -1310,6 +1310,10 @@ return view.extend({
uci.remove('network', bvs['.name']);
});
+ if (map.addedVLANs)
+ for (var i = 0; i < map.addedVLANs.length; i++)
+ uci.remove('network', map.addedVLANs[i]);
+
return form.GridSection.prototype.handleModalCancel.apply(this, arguments);
};