summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-banip/htdocs/luci-static/resources
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2024-04-21 21:59:48 +0200
committerDirk Brenken <dev@brenken.org>2024-04-21 22:00:13 +0200
commitaa463d007fcea9cd5164d7b6e678884589ca4ac2 (patch)
treea18099c50e3678f58055851e6715afad4ab7e56e /applications/luci-app-banip/htdocs/luci-static/resources
parentc6e201a4ed118ce07fb80e32a02ad0bfa980557e (diff)
luci-app-banip: sync with 0.9.5-2
* fixed Set search issues in LuCI Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-banip/htdocs/luci-static/resources')
-rw-r--r--applications/luci-app-banip/htdocs/luci-static/resources/view/banip/setreport.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/setreport.js b/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/setreport.js
index aa716a1b43..a6f8ddc0fe 100644
--- a/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/setreport.js
+++ b/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/setreport.js
@@ -43,17 +43,15 @@ function handleAction(report, ev) {
'click': ui.createHandlerFn(this, function (ev) {
let ip = document.getElementById('search').value.trim().toLowerCase();
if (ip) {
- document.getElementById('run').classList.add("spinning");
document.getElementById('search').value = ip;
document.getElementById('result').textContent = 'The search is running, please wait...';
- L.resolveDefault(fs.exec_direct('/etc/init.d/banip', ['search', ip])).then(function (res) {
+ return L.resolveDefault(fs.exec_direct('/etc/init.d/banip', ['search', ip])).then(function (res) {
let result = document.getElementById('result');
if (res) {
result.textContent = res.trim();
} else {
result.textContent = _('No Search results!');
}
- document.getElementById('run').classList.remove("spinning");
document.getElementById('search').value = '';
})
}
@@ -110,16 +108,14 @@ function handleAction(report, ev) {
'click': ui.createHandlerFn(this, function (ev) {
let set = document.getElementById('set').value;
if (set) {
- document.getElementById('run').classList.add("spinning");
document.getElementById('result').textContent = 'The survey is running, please wait...';
- L.resolveDefault(fs.exec_direct('/etc/init.d/banip', ['survey', set])).then(function (res) {
+ return L.resolveDefault(fs.exec_direct('/etc/init.d/banip', ['survey', set])).then(function (res) {
let result = document.getElementById('result');
if (res) {
result.textContent = res.trim();
} else {
result.textContent = _('No Search results!');
}
- document.getElementById('run').classList.remove("spinning");
document.getElementById('set').value = '';
})
}