luci-app-travelmate: consolidate css 2284/head
authorDirk Brenken <dev@brenken.org>
Wed, 14 Nov 2018 10:43:39 +0000 (11:43 +0100)
committerDirk Brenken <dev@brenken.org>
Wed, 14 Nov 2018 10:43:39 +0000 (11:43 +0100)
* fix IE Edge rendering issues
* merge external styles in central css

Signed-off-by: Dirk Brenken <dev@brenken.org>
applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_firewall_tab.lua
applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_network_tab.lua
applications/luci-app-travelmate/luasrc/model/cbi/travelmate/cfg_wireless_tab.lua
applications/luci-app-travelmate/luasrc/model/cbi/travelmate/configuration_tab.lua
applications/luci-app-travelmate/luasrc/view/travelmate/config_css.htm [deleted file]
applications/luci-app-travelmate/luasrc/view/travelmate/logread.htm
applications/luci-app-travelmate/luasrc/view/travelmate/runtime.htm
applications/luci-app-travelmate/luasrc/view/travelmate/travelmate_css.htm [new file with mode: 0644]

index fea190e9b9a50348057518a6bb95d1424f40ef9c..8597912b209abaab260c29cc4f90e1244f2d241b 100644 (file)
@@ -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
 
index 6f0ade772d10dfd13ff7e0f377ac7c9285278058..36a32aefe89cc3dce4c335749cc0267d142b1c2a 100644 (file)
@@ -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
 
index ab59dfb3765229f0d89921da3bd9ef43e359a0f0..bb6205b9b3a61ed51b05e8bab90360f394090c8b 100644 (file)
@@ -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
 
index 7bb32c1ec58312453d3f092101be57ab6df9f0b3..c9cc587eddbfef8180e25c8f0ff608cc5653315e 100644 (file)
@@ -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 (file)
index 2233a15..0000000
+++ /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>
index 4457296f54cfeaab6c857f52be2ec12e7d4ef6aa..25c29b8bbe2c9b24ebeec28c3ae357acaf03e8b9 100644 (file)
@@ -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[
index 1a53b577d12afb98202afb95bfa045bea6cfd2f3..0b025fdaeeda99d04a74ee1d62e29d6b602aa4c2 100644 (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>
-
+<%+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 (file)
index 0000000..fc8036e
--- /dev/null
@@ -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>