From 931531310e2f125ec905b061ab0bbf43236704d1 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Fri, 5 Jan 2018 18:56:39 +0100 Subject: luci-app-adblock: sync with adblock 3.4.1 * refine logfile search term * textarea 'autoscroll down' in logfile view * left-align blocklist source table plus a more compact design Signed-off-by: Dirk Brenken --- .../luasrc/view/adblock/blocklist.htm | 80 ++++++++++++++++++++++ .../luasrc/view/adblock/logread.htm | 8 ++- 2 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm (limited to 'applications/luci-app-adblock/luasrc/view/adblock') diff --git a/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm b/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm new file mode 100644 index 0000000000..aae64075ff --- /dev/null +++ b/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm @@ -0,0 +1,80 @@ +<%# +Copyright 2017-2018 Dirk Brenken (dev@brenken.org) +This is free software, licensed under the Apache License, Version 2.0 +-%> + +<%- +local rowcnt = 1 +function rowstyle() + rowcnt = rowcnt + 1 + return (rowcnt % 2) + 1 +end + +function width(o) + if o.width then + if type(o.width) == 'number' then + return ' style="width:%dpx"' % o.width + end + return ' style="width:%s"' % o.width + end + return '' +end +-%> + + + +
+ <% if self.title then -%> + <%=self.title%> + <%- end %> +
<%=self.description%>
+
+ <%- local count = 0 -%> + + + <%- if self.sectionhead then -%> + + <%- else -%> + + <%- end -%> + <%- for i, k in pairs(self.children) do -%> + + <%- count = count + 1; end; -%> + + <%- local isempty = true + for i, k in ipairs(self:cfgsections()) do + section = k + isempty = false + scope = { valueheader = "cbi/cell_valueheader", valuefooter = "cbi/cell_valuefooter" } + -%> + + + <%- + for k, node in ipairs(self.children) do + if not node.optional then + node:render(section, scope or {}) + end + end + -%> + + <%- end -%> + <%- if isempty then -%> + + + + <%- end -%> +
<%=self.sectionhead%> > + <%-=k.title-%> +
<%=k%>

<%:This section contains no values yet%>
+
+
diff --git a/applications/luci-app-adblock/luasrc/view/adblock/logread.htm b/applications/luci-app-adblock/luasrc/view/adblock/logread.htm index 5e25a549c6..082ec806f8 100644 --- a/applications/luci-app-adblock/luasrc/view/adblock/logread.htm +++ b/applications/luci-app-adblock/luasrc/view/adblock/logread.htm @@ -1,5 +1,5 @@ <%# -Copyright 2017 Dirk Brenken (dev@brenken.org) +Copyright 2017-2018 Dirk Brenken (dev@brenken.org) This is free software, licensed under the Apache License, Version 2.0 -%> @@ -11,4 +11,10 @@ This is free software, licensed under the Apache License, Version 2.0 + + + <%+footer%> -- cgit v1.2.3