summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2018-11-14 10:45:18 +0100
committerDirk Brenken <dev@brenken.org>2018-11-14 10:45:18 +0100
commit253f912f174046543380076d735ea0cb14f2cccb (patch)
tree4c668272b055ffc57588e39f5c919e072e1e8919
parentdc2877d39f49d878f99143cb5fe1cd86502b62d0 (diff)
luci-app-adblock: consolidate css
* fix IE Edge rendering issues * merge external styles in central css Signed-off-by: Dirk Brenken <dev@brenken.org>
-rw-r--r--applications/luci-app-adblock/luasrc/model/cbi/adblock/blacklist_tab.lua2
-rw-r--r--applications/luci-app-adblock/luasrc/model/cbi/adblock/configuration_tab.lua2
-rw-r--r--applications/luci-app-adblock/luasrc/model/cbi/adblock/whitelist_tab.lua2
-rw-r--r--applications/luci-app-adblock/luasrc/view/adblock/adblock_css.htm108
-rw-r--r--applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm37
-rw-r--r--applications/luci-app-adblock/luasrc/view/adblock/config_css.htm13
-rw-r--r--applications/luci-app-adblock/luasrc/view/adblock/logread.htm16
-rw-r--r--applications/luci-app-adblock/luasrc/view/adblock/runtime.htm16
8 files changed, 116 insertions, 80 deletions
diff --git a/applications/luci-app-adblock/luasrc/model/cbi/adblock/blacklist_tab.lua b/applications/luci-app-adblock/luasrc/model/cbi/adblock/blacklist_tab.lua
index b3b3f8d0e..4d1a9f7e6 100644
--- a/applications/luci-app-adblock/luasrc/model/cbi/adblock/blacklist_tab.lua
+++ b/applications/luci-app-adblock/luasrc/model/cbi/adblock/blacklist_tab.lua
@@ -23,7 +23,7 @@ if fs.stat(input).size >= 102400 then
end
m = SimpleForm("input", nil)
-m:append(Template("adblock/config_css"))
+m:append(Template("adblock/adblock_css"))
m.submit = translate("Save")
m.reset = false
diff --git a/applications/luci-app-adblock/luasrc/model/cbi/adblock/configuration_tab.lua b/applications/luci-app-adblock/luasrc/model/cbi/adblock/configuration_tab.lua
index 1e98f0204..1e7eda903 100644
--- a/applications/luci-app-adblock/luasrc/model/cbi/adblock/configuration_tab.lua
+++ b/applications/luci-app-adblock/luasrc/model/cbi/adblock/configuration_tab.lua
@@ -22,7 +22,7 @@ if fs.stat(input).size >= 102400 then
end
m = SimpleForm("input", nil)
-m:append(Template("adblock/config_css"))
+m:append(Template("adblock/adblock_css"))
m.submit = translate("Save")
m.reset = false
diff --git a/applications/luci-app-adblock/luasrc/model/cbi/adblock/whitelist_tab.lua b/applications/luci-app-adblock/luasrc/model/cbi/adblock/whitelist_tab.lua
index a78d9af4a..03dcecf1a 100644
--- a/applications/luci-app-adblock/luasrc/model/cbi/adblock/whitelist_tab.lua
+++ b/applications/luci-app-adblock/luasrc/model/cbi/adblock/whitelist_tab.lua
@@ -23,7 +23,7 @@ if fs.stat(input).size >= 102400 then
end
m = SimpleForm("input", nil)
-m:append(Template("adblock/config_css"))
+m:append(Template("adblock/adblock_css"))
m.submit = translate("Save")
m.reset = false
diff --git a/applications/luci-app-adblock/luasrc/view/adblock/adblock_css.htm b/applications/luci-app-adblock/luasrc/view/adblock/adblock_css.htm
new file mode 100644
index 000000000..5d95d132d
--- /dev/null
+++ b/applications/luci-app-adblock/luasrc/view/adblock/adblock_css.htm
@@ -0,0 +1,108 @@
+<style type="text/css">
+ textarea
+ {
+ width: 100%;
+ height: 450px;
+ border: 1px solid #cccccc;
+ padding: 5px;
+ font-size: 12px;
+ font-family: monospace;
+ resize: none;
+ white-space: pre;
+ overflow-wrap: normal;
+ overflow-x: scroll;
+ }
+
+ select[readonly],
+ textarea[readonly]
+ {
+ width: 100%;
+ height: 450px;
+ border: 1px solid #cccccc;
+ padding: 5px;
+ font-size: 12px;
+ font-family: monospace;
+ resize: none;
+ pointer-events: auto;
+ cursor: auto;
+ }
+
+ .table.cbi-section-table .th,
+ .table.cbi-section-table .td,
+ .cbi-section-table-cell,
+ .cbi-section-table-row,
+ .tr[data-title]::before
+ {
+ text-align: left;
+ vertical-align: top;
+ margin-left: 0px;
+ padding-left: 2px;
+ }
+
+ .table.cbi-section-table .th
+ {
+ white-space: nowrap;
+ }
+
+ .cbi-section-table-row > .cbi-value-field .cbi-input-select,
+ .table.cbi-section-table select
+ {
+ width: 70px;
+ }
+
+ .cbi-section-table-row > .cbi-value-field [data-dynlist] > input,
+ .table.cbi-section-table input[type="text"],
+ .cbi-dynlist > .item,
+ .table.cbi-section-table input,
+ .cbi-dynlist
+ {
+ display: inline-block;
+ width: 7em;
+ margin: 1px;
+ }
+
+ .td.cbi-value-field .cbi-button
+ {
+ width: auto;
+ margin: 1px 0 1px -2px;
+ }
+
+ .btn,
+ .cbi-button,
+ .item::after
+ {
+ -webkit-appearance: menulist;
+ }
+
+ .cbi-input-checkbox
+ {
+ height: 1em;
+ }
+
+ .cbi-input-text
+ {
+ text-align: left;
+ padding-left: 2px;
+ outline: none;
+ box-shadow: none;
+ background: transparent;
+ width: 7em;
+ }
+
+ .runtime
+ {
+ color: #37c;
+ font-weight: bold;
+ display: inline-block;
+ width: 100%;
+ padding-top: 0.5rem;
+ }
+
+ .button_running
+ {
+ display: inline-block;
+ width: 16px;
+ height: 16px;
+ margin: 0 5px;
+ }
+</style>
diff --git a/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm b/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm
index a6f228651..e145a3b4e 100644
--- a/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm
+++ b/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm
@@ -7,42 +7,7 @@ This is free software, licensed under the Apache License, Version 2.0
local anonclass = (not self.anonymous or self.sectiontitle) and "named" or "anonymous"
-%>
-<style type="text/css">
-.table.cbi-section-table .th,
-.table.cbi-section-table .td,
-.cbi-section-table-cell,
-.cbi-section-table-row,
-.tr[data-title]::before
-{
- text-align: left;
- vertical-align: top;
- margin-left: 0px;
- padding-left: 2px;
-}
-.table.cbi-section-table .th
-{
- white-space: nowrap;
-}
-.table.cbi-section-table input
-{
- width: 7em;
-}
-.cbi-section-table-row > .cbi-value-field [data-dynlist] > input,
-.table.cbi-section-table input
-{
- width: 7em;
-}
-
-.cbi-input-text
-{
- text-align: left;
- padding-left: 2px;
- outline: none;
- box-shadow: none;
- background: transparent;
- width: 7em;
-}
-</style>
+<%+adblock/adblock_css%>
<div class="cbi-section" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
<% if self.title then -%>
diff --git a/applications/luci-app-adblock/luasrc/view/adblock/config_css.htm b/applications/luci-app-adblock/luasrc/view/adblock/config_css.htm
deleted file mode 100644
index 2233a15e3..000000000
--- a/applications/luci-app-adblock/luasrc/view/adblock/config_css.htm
+++ /dev/null
@@ -1,13 +0,0 @@
-<style type="text/css">
- textarea
- {
- border: 1px solid #cccccc;
- padding: 5px;
- font-size: 12px;
- font-family: monospace;
- resize: none;
- white-space: pre;
- overflow-wrap: normal;
- overflow-x: scroll;
- }
-</style>
diff --git a/applications/luci-app-adblock/luasrc/view/adblock/logread.htm b/applications/luci-app-adblock/luasrc/view/adblock/logread.htm
index b50523349..7fe254ae8 100644
--- a/applications/luci-app-adblock/luasrc/view/adblock/logread.htm
+++ b/applications/luci-app-adblock/luasrc/view/adblock/logread.htm
@@ -4,21 +4,7 @@ This is free software, licensed under the Apache License, Version 2.0
-%>
<%+header%>
-<style type="text/css">
- select[readonly],
- textarea[readonly]
- {
- width: 100%;
- height: 450px;
- border: 1px solid #cccccc;
- padding: 5px;
- font-size: 12px;
- font-family: monospace;
- resize: none;
- pointer-events: auto;
- cursor: auto;
- }
-</style>
+<%+adblock/adblock_css%>
<script type="text/javascript">
//<![CDATA[
diff --git a/applications/luci-app-adblock/luasrc/view/adblock/runtime.htm b/applications/luci-app-adblock/luasrc/view/adblock/runtime.htm
index 4f7cfbf8a..ee20133d5 100644
--- a/applications/luci-app-adblock/luasrc/view/adblock/runtime.htm
+++ b/applications/luci-app-adblock/luasrc/view/adblock/runtime.htm
@@ -3,17 +3,7 @@ Copyright 2017-2018 Dirk Brenken (dev@brenken.org)
This is free software, licensed under the Apache License, Version 2.0
-%>
-<style type="text/css">
-.runtime
-{
- color: #37c;
- font-weight: bold;
- display: inline-block;
- width: 100%;
- padding-top: 0.5rem;
-}
-</style>
-
+<%+adblock/adblock_css%>
<script type="text/javascript">
//<![CDATA[
function status_update(json)
@@ -188,7 +178,7 @@ This is free software, licensed under the Apache License, Version 2.0
<label class="cbi-value-title" for="button_1"><%:Suspend / Resume Adblock%></label>
<div class="cbi-value-field">
<input class="cbi-button cbi-button-reset" id="btn1" type="button" value="" onclick="btn_action(this)" />
- <span id="btn1_running" style="display:inline-block; width:16px; height:16px; margin:0 5px"></span>
+ <span id="btn1_running" class="btn_running"></span>
</div>
</div>
<p />
@@ -196,6 +186,6 @@ This is free software, licensed under the Apache License, Version 2.0
<label class="cbi-value-title" for="button_2"><%:Refresh Blocklist Sources%></label>
<div class="cbi-value-field">
<input class="cbi-button cbi-button-apply" id="btn2" type="button" value="" onclick="btn_action(this)" />
- <span id="btn2_running" style="display:inline-block; width:16px; height:16px; margin:0 5px"></span>
+ <span id="btn2_running" class="btn_running"></span>
</div>
</div>