diff options
Diffstat (limited to 'applications/luci-app-adblock/luasrc/view/adblock')
5 files changed, 113 insertions, 77 deletions
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 0000000000..5d95d132df --- /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 a6f2286513..e145a3b4ef 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 2233a15e31..0000000000 --- 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 b505233490..7fe254ae80 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 4f7cfbf8a1..ee20133d5a 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> |