summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--modules/luci-base/luasrc/dispatcher.lua17
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_status.htm47
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm5
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_uci/revert.htm2
-rw-r--r--themes/luci-theme-openwrt/htdocs/luci-static/openwrt.org/cascade.css78
5 files changed, 77 insertions, 72 deletions
diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua
index 6850d7e3a9..6d5a8f4d3d 100644
--- a/modules/luci-base/luasrc/dispatcher.lua
+++ b/modules/luci-base/luasrc/dispatcher.lua
@@ -703,15 +703,22 @@ function _create_node(path)
local last = table.remove(path)
local parent = _create_node(path)
- c = {nodes={}, auto=true}
- -- the node is "in request" if the request path matches
- -- at least up to the length of the node path
- if parent.inreq and context.path[#path+1] == last then
- c.inreq = true
+ c = {nodes={}, auto=true, inreq=true}
+
+ local _, n
+ for _, n in ipairs(path) do
+ if context.path[_] ~= n then
+ c.inreq = false
+ break
+ end
end
+
+ c.inreq = c.inreq and (context.path[#path + 1] == last)
+
parent.nodes[last] = c
context.treecache[name] = c
end
+
return c
end
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_status.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_status.htm
index 85468252e9..ad20ea38fe 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_status.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_status.htm
@@ -24,21 +24,22 @@
else
icon = "<%=resource%>/icons/signal-75-100.png";
- var s = document.getElementById('<%=self.option%>-iw-signal');
- if (s)
- s.innerHTML = String.format(
- '<img src="%s" title="<%:Signal%>: %d <%:dBm%> / <%:Noise%>: %d <%:dBm%>" /><br />' +
- '<small>%d%%</small>', icon, iw.signal, iw.noise, p
- );
+ var s = document.getElementById('<%=self.option%>-iw-status'),
+ small = s.querySelector('small'),
+ info = s.querySelector('span');
+
+ small.innerHTML = info.innerHTML = String.format(
+ '<img src="%s" title="<%:Signal%>: %d <%:dBm%> / <%:Noise%>: %d <%:dBm%>" />&#160;<br />%d%%&#160;',
+ icon, iw.signal, iw.noise, p
+ );
- var d = document.getElementById('<%=self.option%>-iw-description');
- if (d && is_assoc)
- d.innerHTML = String.format(
+ if (is_assoc)
+ info.innerHTML = String.format(
'<strong><%:Mode%>:</strong> %s | ' +
'<strong><%:SSID%>:</strong> %h<br />' +
- '<strong><%:BSSID%>:</strong> %s | ' +
+ '<strong><%:BSSID%>:</strong> %s<br />' +
'<strong><%:Encryption%>:</strong> %s<br />' +
- '<strong><%:Channel%>:</strong> %d (%.3f <%:GHz%>) | ' +
+ '<strong><%:Channel%>:</strong> %d (%.3f <%:GHz%>)<br />' +
'<strong><%:Tx-Power%>:</strong> %d <%:dBm%><br />' +
'<strong><%:Signal%>:</strong> %d <%:dBm%> | ' +
'<strong><%:Noise%>:</strong> %d <%:dBm%><br />' +
@@ -50,8 +51,8 @@
iw.txpower, iw.signal, iw.noise,
iw.bitrate ? iw.bitrate : 0, iw.country
);
- else if (d)
- d.innerHTML = String.format(
+ else
+ info.innerHTML = String.format(
'<strong><%:SSID%>:</strong> %h | ' +
'<strong><%:Mode%>:</strong> %s<br />' +
'<em><%:Wireless is disabled or not associated%></em>',
@@ -62,17 +63,13 @@
);
//]]></script>
-<div class="table">
- <div class="tr cbi-section-table">
- <div class="td"></div>
- <div class="td cbi-value-field" style="width:16px; padding:3px" id="<%=self.option%>-iw-signal">
- <img src="<%=resource%>/icons/signal-none.png" title="<%:Not associated%>" /><br />
- <small>0%</small>
- </div>
- <div class="td cbi-value-field" style="vertical-align:middle; text-align:left; padding:3px" id="<%=self.option%>-iw-description">
- <em><%:Collecting data...%></em>
- </div>
- </div>
-</div>
+<span class="ifacebadge large" id="<%=self.option%>-iw-status">
+ <small>
+ <img src="<%=resource%>/icons/signal-none.png" title="<%:Not associated%>" />&#160;
+ </small>
+ <span>
+ <em><%:Collecting data...%></em>
+ </span>
+</span>
<%+cbi/valuefooter%>
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm b/modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm
index 9eec012547..0a4bc6578c 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm
@@ -14,7 +14,7 @@
</ul>
<div class="cbi-section">
- <legend><%:Backup / Restore%></legend>
+ <h3><%:Backup / Restore%></h3>
<div class="cbi-section-descr"><%:Click "Generate archive" to download a tar archive of the current configuration files. To reset the firmware to its initial state, click "Perform reset" (only possible with squashfs images).%></div>
<div class="cbi-section-node">
<form class="inline" method="post" action="<%=url('admin/system/flashops/backup')%>">
@@ -38,7 +38,6 @@
</form>
<% end %>
</div>
- <br />
<div class="cbi-section-descr"><%:To restore configuration files, you can upload a previously generated backup archive here.%></div>
<div class="cbi-section-node">
<form class="inline" method="post" action="<%=url('admin/system/flashops/restore')%>" enctype="multipart/form-data">
@@ -58,7 +57,7 @@
</div>
<div class="cbi-section">
- <legend><%:Flash new firmware image%></legend>
+ <h3><%:Flash new firmware image%></h3>
<% if upgrade_avail then %>
<form method="post" action="<%=url('admin/system/flashops/sysupgrade')%>" enctype="multipart/form-data">
<input type="hidden" name="token" value="<%=token%>" />
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_uci/revert.htm b/modules/luci-mod-admin-full/luasrc/view/admin_uci/revert.htm
index dff53420aa..ff23d568dc 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_uci/revert.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_uci/revert.htm
@@ -27,7 +27,7 @@
<div class="alert-message" id="cbi_apply_status" style="display:none"></div>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
- uci_apply(true);
+ uci_revert();
});
</script>
diff --git a/themes/luci-theme-openwrt/htdocs/luci-static/openwrt.org/cascade.css b/themes/luci-theme-openwrt/htdocs/luci-static/openwrt.org/cascade.css
index 6f1bae6710..4bde3eaea2 100644
--- a/themes/luci-theme-openwrt/htdocs/luci-static/openwrt.org/cascade.css
+++ b/themes/luci-theme-openwrt/htdocs/luci-static/openwrt.org/cascade.css
@@ -111,7 +111,7 @@ a img {
#mainmenu ul li.selected > a {
background: #fff;
- color: #59d;
+ color: #37c;
border: 1px dotted #444;
border-width: 1px 0;
}
@@ -145,7 +145,7 @@ a img {
#tabmenu {
padding: 0;
- margin: -.5em -.5em 1em -.5em;
+ margin: -.5em -.5em .5em -.5em;
background: #bbb;
}
@@ -231,25 +231,28 @@ hr {
font-weight: normal;
padding: .5em;
border-radius: 3px;
- color: #000;
+ border: 1px solid #a22;
+ color: #a22;
+ background: #fee;
+ margin: 0 0 .5em 0;
}
.alert-message.notice {
- background: linear-gradient(#ccc 0%, #eee 100%);
- color: #4a6b7c;
+ border-color: #15a;
+ background: #e6f6ff;
+ color: #15a;
}
.alert-message.warning {
- background: linear-gradient(#dda 0%, #dd8 100%);
- color: #c00;
+ border-color: #ed5;
+ background: #fe9;
+ color: #650;
}
-.alert-message > * {
- margin: .5em;
-}
-
-.alert-message > h4 {
- font-weight: bold;
+.alert-message .btn,
+.alert-message .cbi-button {
+ background: inherit;
+ border-color: inherit;
}
div.hostinfo {
@@ -419,7 +422,11 @@ fieldset > legend + * { clear: both; }
}
.cbi-section {
- padding: .5em 0;
+ margin: 0 0 .5em 0;
+}
+
+.cbi-section > h3,
+.cbi-section > legend {
margin-top: .5em;
}
@@ -539,11 +546,11 @@ img.cbi-image-button {
text-align: center;
font-weight: bold;
line-height: 13pt;
- height: 14pt;
+ height: 16pt;
}
.btn:hover, .cbi-button:hover {
- box-shadow: 0 0 3px #59d;
+ box-shadow: 0 0 3px #37c;
}
.btn[disabled],
@@ -559,8 +566,8 @@ img.cbi-image-button {
.cbi-button-fieldadd,
.cbi-button-add,
.cbi-button-save {
- border-color: #7b7;
- color: #7b7;
+ border-color: #595;
+ color: #595;
}
.cbi-button-neutral,
@@ -578,33 +585,33 @@ img.cbi-image-button {
.cbi-button-apply,
.cbi-button-reload,
.cbi-button-edit {
- border-color: #59d;
- color: #59d;
+ border-color: #37c;
+ color: #37c;
}
.cbi-button-negative,
.cbi-section-remove .cbi-button,
.cbi-button-remove {
- border-color: #b77;
- color: #b77;
+ border-color: #a22;
+ color: #a22;
}
.cbi-button-action.important,
.cbi-page-actions .cbi-button-apply,
.cbi-section-actions .cbi-button-edit {
color: #fff;
- background: #59d;
+ background: #37c;
}
.cbi-button-positive.important,
.cbi-page-actions .cbi-button-save {
color: #fff;
- background: #7b7;
+ background: #595;
}
.cbi-page-actions .cbi-button-apply + .cbi-button-save {
background: #fff;
- color: #7b7;
+ color: #595;
}
.cbi-input-invalid {
@@ -741,14 +748,16 @@ div.cbi-optionals {
position: relative;
border: 1px dotted #555;
background: #fff;
- margin-bottom: 5px;
+ margin-bottom: .5em;
}
.cbi-section-node-tabbed {
border-top: none;
+ margin-top: -.5em;
}
-.cbi-section-node .cbi-value:last-child {
+.cbi-section-node .cbi-value:last-child,
+.cbi-section-node .cbi-optionals:last-child {
border-bottom: none;
}
@@ -809,7 +818,6 @@ div.cbi-optionals {
display: flex;
justify-content: flex-end;
margin: -3px;
- padding: 0 .25em .25em .25em;
}
.cbi-page-actions > form {
@@ -903,7 +911,7 @@ div.cbi-optionals {
ul.cbi-tabmenu {
list-style-type: none;
display: flex;
- margin: 0 !important;
+ margin: 0 0 .5em 0 !important;
padding: 0 0 0 5px;
border-bottom: 1px solid #bbb;
}
@@ -1303,6 +1311,7 @@ ul.cbi-tabmenu li.cbi-tab {
.ifacebadge.large,
.network-status-table .ifacebox-body .ifacebadge {
flex: 1;
+ -webkit-flex: 1 1 auto;
margin: .5em .25em .25em .25em;
padding: .5em;
min-width: 220px;
@@ -1636,7 +1645,7 @@ ul.cbi-tabmenu li.cbi-tab {
.btn, .cbi-button {
font-size: 9pt !important;
- line-height: 11pt;
+ line-height: 13pt;
}
#maincontent {
@@ -1665,10 +1674,6 @@ ul.cbi-tabmenu li.cbi-tab {
text-align: left;
}
- .cbi-section {
- padding: .25em;
- }
-
.cbi-value-title {
float: none;
font-weight: bold;
@@ -1690,6 +1695,7 @@ ul.cbi-tabmenu li.cbi-tab {
.cbi-page-actions {
flex-wrap: wrap;
+ margin: -2px;
}
.cbi-page-actions > .cbi-button-link {
@@ -1722,8 +1728,4 @@ ul.cbi-tabmenu li.cbi-tab {
#cbi-network-switch_vlan .td.cbi-section-actions {
flex-basis: 100%;
}
-
- .network-status-table .ifacebox {
- margin: 0 0 .5em 0;
- }
}