summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-adblock
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2018-07-31 11:26:43 +0200
committerGitHub <noreply@github.com>2018-07-31 11:26:43 +0200
commit9217240b04abf4a5d60652c3f925bc7c4115a87d (patch)
tree0c41e39f9c89607696d5977df08b13fbab15236c /applications/luci-app-adblock
parent26bbd01f37cd6e665e5e315709f55f454fcaa3b9 (diff)
parentb8f83946816702ba3b73c9573c266a2fdae6e615 (diff)
Merge pull request #2019 from dibdot/adblock
luci-app-adblock: "final" fixes
Diffstat (limited to 'applications/luci-app-adblock')
-rw-r--r--applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua5
-rw-r--r--applications/luci-app-adblock/luasrc/view/adblock/runtime.htm14
2 files changed, 8 insertions, 11 deletions
diff --git a/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua b/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua
index 3bf739291..2ecaaab72 100644
--- a/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua
+++ b/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua
@@ -3,7 +3,6 @@
local fs = require("nixio.fs")
local uci = require("luci.model.uci").cursor()
-local sys = require("luci.sys")
local util = require("luci.util")
local dump = util.ubus("network.interface", "dump", {})
@@ -13,10 +12,6 @@ m = Map("adblock", translate("Adblock"),
.. "<a href=\"%s\" target=\"_blank\">"
.. "check the online documentation</a>", "https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md"))
-function m.on_apply(self)
- luci.sys.call("/etc/init.d/adblock reload >/dev/null 2>&1")
-end
-
-- Main adblock options
s = m:section(NamedSection, "global", "adblock")
diff --git a/applications/luci-app-adblock/luasrc/view/adblock/runtime.htm b/applications/luci-app-adblock/luasrc/view/adblock/runtime.htm
index 05cdde73b..3f4d64259 100644
--- a/applications/luci-app-adblock/luasrc/view/adblock/runtime.htm
+++ b/applications/luci-app-adblock/luasrc/view/adblock/runtime.htm
@@ -6,7 +6,7 @@ This is free software, licensed under the Apache License, Version 2.0
<style type="text/css">
.runtime
{
- color: #0069d6;
+ color: #37c;
font-weight: bold;
display: inline-block;
width: 100%;
@@ -18,10 +18,12 @@ This is free software, licensed under the Apache License, Version 2.0
//<![CDATA[
function status_update(json)
{
- var view = document.getElementById("value_1");
- var btn1 = document.getElementById("btn1");
- var btn2 = document.getElementById("btn2");
- var input = json.data.adblock_status;
+ var view = document.getElementById("value_1");
+ var btn1 = document.getElementById("btn1");
+ var btn1_running = document.getElementById("btn1_running");
+ var btn2 = document.getElementById("btn2");
+ var btn2_running = document.getElementById("btn2_running");
+ var input = json.data.adblock_status;
view.innerHTML = input || "-";
if (input === "enabled")
@@ -126,7 +128,7 @@ This is free software, licensed under the Apache License, Version 2.0
btn2.value = "<%:Refresh%>";
btn2.name = "do_refresh";
btn1.disabled = true;
- btn2.disabled = false;
+ btn2.disabled = true;
return;
}
status_update(json_info)