From: Jo-Philipp Wich Date: Tue, 24 Sep 2019 06:05:11 +0000 (+0200) Subject: luci-mod-network: interfaces.js: map remove action to network.deleteNetwork() X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e630b32498767164004e965f34471d70d6e6f51c;p=oweals%2Fluci.git luci-mod-network: interfaces.js: map remove action to network.deleteNetwork() Signed-off-by: Jo-Philipp Wich --- 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 624718dd8..b49d36d46 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 @@ -740,6 +740,12 @@ return L.view.extend({ }, this)); }; + s.handleRemove = function(section_id, ev) { + return network.deleteNetwork(section_id).then(L.bind(function(section_id, ev) { + return form.GridSection.prototype.handleRemove.apply(this, [section_id, ev]); + }, this, section_id, ev)); + }; + o = s.option(form.DummyValue, '_ifacebox'); o.modalonly = false; o.textvalue = function(section_id) {