diff options
19 files changed, 276 insertions, 138 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 b3b3f8d0eb..4d1a9f7e63 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 1e98f0204b..1e7eda9032 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 a78d9af4ac..03dcecf1aa 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 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> diff --git a/applications/luci-app-banip/luasrc/view/banip/banip_css.htm b/applications/luci-app-banip/luasrc/view/banip/banip_css.htm index 807102452c..86efcc5f20 100644 --- a/applications/luci-app-banip/luasrc/view/banip/banip_css.htm +++ b/applications/luci-app-banip/luasrc/view/banip/banip_css.htm @@ -1,6 +1,8 @@ <style type="text/css"> textarea { + width: 100%; + height: 450px; border: 1px solid #cccccc; padding: 5px; font-size: 12px; @@ -51,16 +53,32 @@ .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 + .table.cbi-section-table input, + .cbi-dynlist { + display: inline-block; width: 6em; + 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; @@ -68,9 +86,9 @@ outline: none; box-shadow: none; background: transparent; - width: 4em; + width: 6em; } - + .runtime { color: #37c; @@ -79,7 +97,7 @@ width: 100%; padding-top: 0.5rem; } - + .ripe_desc { font-style: italic; @@ -88,4 +106,12 @@ height: 20px; margin: 2px 2px; } + + .button_running + { + display: inline-block; + width: 16px; + height: 16px; + margin: 0 5px; + } </style> diff --git a/applications/luci-app-banip/luasrc/view/banip/runtime.htm b/applications/luci-app-banip/luasrc/view/banip/runtime.htm index 041fcb143c..65a58bd374 100644 --- a/applications/luci-app-banip/luasrc/view/banip/runtime.htm +++ b/applications/luci-app-banip/luasrc/view/banip/runtime.htm @@ -124,7 +124,7 @@ function btn_action(action) <label class="cbi-value-title" for="button_1"><%:Refresh IPSets%></label> <div class="cbi-value-field"> <input class="cbi-button cbi-button-apply" id="btn1" type="button" name="do_refresh" value="<%:Refresh%>" 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> diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_firewall_tab.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_firewall_tab.lua index fea190e9b9..8597912b20 100644 --- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_firewall_tab.lua +++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_firewall_tab.lua @@ -11,7 +11,7 @@ if not fs.access(input) then end m = SimpleForm("input", nil) -m:append(Template("travelmate/config_css")) +m:append(Template("travelmate/travelmate_css")) m.submit = translate("Save") m.reset = false diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_network_tab.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_network_tab.lua index 6f0ade772d..36a32aefe8 100644 --- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_network_tab.lua +++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_network_tab.lua @@ -11,7 +11,7 @@ if not fs.access(input) then end m = SimpleForm("input", nil) -m:append(Template("travelmate/config_css")) +m:append(Template("travelmate/travelmate_css")) m.submit = translate("Save") m.reset = false diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_wireless_tab.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_wireless_tab.lua index ab59dfb376..bb6205b9b3 100644 --- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_wireless_tab.lua +++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_wireless_tab.lua @@ -11,7 +11,7 @@ if not fs.access(input) then end m = SimpleForm("input", nil) -m:append(Template("travelmate/config_css")) +m:append(Template("travelmate/travelmate_css")) m.submit = translate("Save") m.reset = false diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/configuration_tab.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/configuration_tab.lua index 7bb32c1ec5..c9cc587edd 100644 --- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/configuration_tab.lua +++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/configuration_tab.lua @@ -13,7 +13,7 @@ if not fs.access(input) then end m = SimpleForm("input", nil) -m:append(Template("travelmate/config_css")) +m:append(Template("travelmate/travelmate_css")) m.submit = translate("Save") m.reset = false diff --git a/applications/luci-app-travelmate/luasrc/view/travelmate/config_css.htm b/applications/luci-app-travelmate/luasrc/view/travelmate/config_css.htm deleted file mode 100644 index 2233a15e31..0000000000 --- a/applications/luci-app-travelmate/luasrc/view/travelmate/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-travelmate/luasrc/view/travelmate/logread.htm b/applications/luci-app-travelmate/luasrc/view/travelmate/logread.htm index 4457296f54..25c29b8bbe 100644 --- a/applications/luci-app-travelmate/luasrc/view/travelmate/logread.htm +++ b/applications/luci-app-travelmate/luasrc/view/travelmate/logread.htm @@ -4,22 +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> +<%+travelmate/travelmate_css%> <script type="text/javascript"> //<![CDATA[ diff --git a/applications/luci-app-travelmate/luasrc/view/travelmate/runtime.htm b/applications/luci-app-travelmate/luasrc/view/travelmate/runtime.htm index 1a53b577d1..0b025fdaee 100644 --- a/applications/luci-app-travelmate/luasrc/view/travelmate/runtime.htm +++ b/applications/luci-app-travelmate/luasrc/view/travelmate/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> - +<%+travelmate/travelmate_css%> <script type="text/javascript"> //<![CDATA[ function status_update(json) @@ -148,7 +138,7 @@ This is free software, licensed under the Apache License, Version 2.0 <label class="cbi-value-title" for="button_1"><%:Restart Travelmate%></label> <div class="cbi-value-field"> <input class="cbi-button cbi-button-reset" id="btn1" type="button" name="do_restart" value="<%:Restart%>" 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> <div class="cbi-value" id="button_2"> @@ -200,10 +190,10 @@ This is free software, licensed under the Apache License, Version 2.0 if fs.access("/usr/bin/qrencode") then qrcode = luci.sys.exec("/usr/bin/qrencode --inline --8bit --type=SVG --output=- 'WIFI:S:\"'" .. e_ssid .. "'\";T:'" .. enc .. "';P:\"'" .. e_key .. "'\";H:'" .. hidden .. "';'") -%> - <div class="cbi-value" style="border-bottom: 0px; margin-bottom: 0px; padding: 0.25em 0.6em; text-align: left"> + <div class="qr-code"> <%=qrcode%> </div> - <div class="cbi-value" style="border-bottom: 0px; margin-bottom: 0px; padding: 0.25em 0.6em; text-align: left"> + <div class="qr-code"> <em><%:AP on %><%=device%><%: with SSID %>"<%=ssid%>"</em> <hr /> </div> @@ -214,7 +204,7 @@ This is free software, licensed under the Apache License, Version 2.0 end) if not qrcode then -%> - <div class="cbi-value" style="border-bottom: 0px; margin-bottom: 0px; padding: 0.25em 0.6em; text-align: left"> + <div class="qr-code"> <em><%:For QR-Code support please install package 'qrencode'!%></em> </div> <%- diff --git a/applications/luci-app-travelmate/luasrc/view/travelmate/travelmate_css.htm b/applications/luci-app-travelmate/luasrc/view/travelmate/travelmate_css.htm new file mode 100644 index 0000000000..fc8036e334 --- /dev/null +++ b/applications/luci-app-travelmate/luasrc/view/travelmate/travelmate_css.htm @@ -0,0 +1,116 @@ +<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; + } + + .qr-code + { + border-bottom: 0px; + margin-bottom: 0px; + padding: 0.25em 0.6em; + text-align: left + } +</style> diff --git a/themes/luci-theme-rosy/luasrc/view/themes/rosy/header.htm b/themes/luci-theme-rosy/luasrc/view/themes/rosy/header.htm index e7316770bf..21fa78e3c6 100644 --- a/themes/luci-theme-rosy/luasrc/view/themes/rosy/header.htm +++ b/themes/luci-theme-rosy/luasrc/view/themes/rosy/header.htm @@ -154,9 +154,7 @@ local nnode = cattree.nodes[r] local grandchildren = disp.node_childs(nnode) - if #grandchildren > 0 then - - else + if #grandchildren <= 0 then local title = pcdata(striptags(translate(nnode.title))) write('<span class="label logout"><a data-title="%s" href="%s">%s</a></span>' %{ @@ -287,7 +285,7 @@ <p> <%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%> </p> - <div><a class="btn" href="<%=url(" admin/system/admin")%>"> <%:Go to password configuration...%></a></div> + <div><a class="btn" href="<%=url("admin/system/admin")%>"> <%:Go to password configuration...%></a></div> </div> <%- end -%> |