Merge pull request #2283 from dibdot/adblock

luci-app-adblock: consolidate css
This commit is contained in:
Dirk Brenken 2018-11-14 11:48:45 +01:00 committed by GitHub
commit 206df14e73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 116 additions and 80 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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>

View file

@ -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 -%>

View file

@ -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>

View file

@ -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[

View file

@ -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>