luci-app-adblock: sync with adblock 2.5.1

* made buttons translatable
* accept empty values for interface trigger input field
* replace 'url' with 'luci.dispatcher.build_url'

Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
Dirk Brenken 2017-04-04 14:11:41 +02:00
parent 3dc08a354b
commit 03ae05549d
2 changed files with 5 additions and 5 deletions

View file

@ -30,14 +30,14 @@ if data.adblock == nil then
btn.inputstyle = nil btn.inputstyle = nil
btn.disabled = true btn.disabled = true
elseif dnsFile1 ~= "" or dnsFile2 ~= "" then elseif dnsFile1 ~= "" or dnsFile2 ~= "" then
btn.inputtitle = "Suspend adblock" btn.inputtitle = translate("Suspend adblock")
btn.inputstyle = "reset" btn.inputstyle = "reset"
btn.disabled = false btn.disabled = false
function btn.write() function btn.write()
luci.sys.call("/etc/init.d/adblock suspend >/dev/null 2>&1") luci.sys.call("/etc/init.d/adblock suspend >/dev/null 2>&1")
end end
else else
btn.inputtitle = "Resume adblock" btn.inputtitle = translate("Resume adblock")
btn.inputstyle = "apply" btn.inputstyle = "apply"
btn.disabled = false btn.disabled = false
function btn.write() function btn.write()
@ -51,8 +51,8 @@ o2.rmempty = false
o3 = s:option(Value, "adb_iface", translate("Restrict interface reload trigger to certain interface(s)"), o3 = s:option(Value, "adb_iface", translate("Restrict interface reload trigger to certain interface(s)"),
translate("Space separated list of interfaces that trigger a reload action. ".. translate("Space separated list of interfaces that trigger a reload action. "..
"To disable reload trigger at all set it to 'false'.")) "To disable reload trigger at all remove all entries."))
o3.rmempty =false o3.rmempty =true
-- Runtime information -- Runtime information

View file

@ -25,7 +25,7 @@ This is free software, licensed under the Apache License, Version 2.0
; ;
input.parentNode.style.display = 'block'; input.parentNode.style.display = 'block';
input.style.display = 'inline'; input.style.display = 'inline';
stxhr.post('<%=url('admin/services/adblock/advanced/result/')%>' + domain, { token: '<%=token%>' }, stxhr.post('<%=luci.dispatcher.build_url('admin/services/adblock/advanced/result/')%>' + domain, { token: '<%=token%>' },
function(x) function(x)
{ {
if (x.responseText) if (x.responseText)