diff options
author | Dirk Brenken <dev@brenken.org> | 2024-04-27 07:26:12 +0200 |
---|---|---|
committer | Dirk Brenken <dev@brenken.org> | 2024-04-27 07:26:59 +0200 |
commit | d4b8290f072767182e2d172da847291d49b9ce45 (patch) | |
tree | 3299b3dc6fab6fb24a2cbe34c36fec778b6b32f5 /applications/luci-app-banip/htdocs/luci-static | |
parent | c75232d8d29ba5a9cc5c07c3fff65248f12f1b08 (diff) |
luci-app-banip: fix "Apply & Restart" button call chain
Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-banip/htdocs/luci-static')
-rw-r--r-- | applications/luci-app-banip/htdocs/luci-static/resources/view/banip/overview.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/overview.js b/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/overview.js index 850b9a446f..8027bb9a53 100644 --- a/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/overview.js +++ b/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/overview.js @@ -14,11 +14,14 @@ function handleAction(ev) { if (ev === 'restart') { let map = document.querySelector('.cbi-map'); - dom.callClassMethod(map, 'save').then(function() { - classes.ui.changes.apply(false); + return dom.callClassMethod(map, 'save') + .then(L.bind(ui.changes.apply, ui.changes)) + .then(function() { + return fs.exec_direct('/etc/init.d/banip', [ev]); }); + } else { + return fs.exec_direct('/etc/init.d/banip', [ev]); } - return fs.exec_direct('/etc/init.d/banip', [ev]) } return view.extend({ |