luci-app-adblock: sync with adblock 2.5.1 1096/head
authorDirk Brenken <dev@brenken.org>
Tue, 4 Apr 2017 12:11:41 +0000 (14:11 +0200)
committerDirk Brenken <dev@brenken.org>
Tue, 4 Apr 2017 12:11:41 +0000 (14:11 +0200)
* 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>
applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua
applications/luci-app-adblock/luasrc/view/adblock/query.htm

index 7919b71516f7a9e8729650d901264a679d8b4672..b8318fe9949286d329a509e18184a6d6a25fa7cf 100644 (file)
@@ -30,14 +30,14 @@ if data.adblock == nil then
        btn.inputstyle = nil
        btn.disabled = true
 elseif dnsFile1 ~= "" or dnsFile2 ~= "" then
-       btn.inputtitle = "Suspend adblock"
+       btn.inputtitle = translate("Suspend adblock")
        btn.inputstyle = "reset"
        btn.disabled = false
        function btn.write()
                luci.sys.call("/etc/init.d/adblock suspend >/dev/null 2>&1")
        end
 else
-       btn.inputtitle = "Resume adblock"
+       btn.inputtitle = translate("Resume adblock")
        btn.inputstyle = "apply"
        btn.disabled = false
        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)"),
        translate("Space separated list of interfaces that trigger a reload action. "..
-       "To disable reload trigger at all set it to 'false'."))
-o3.rmempty =false
+       "To disable reload trigger at all remove all entries."))
+o3.rmempty =true
 
 -- Runtime information
 
index be606301ec92ccad4b1f7c889c89235574a4347c..5e064af858ede3751058a5d34568078f84246b4c 100644 (file)
@@ -25,7 +25,7 @@ This is free software, licensed under the Apache License, Version 2.0
                        ;
                        input.parentNode.style.display = 'block';
                        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)
                                {
                                        if (x.responseText)