summaryrefslogtreecommitdiffhomepage
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css8
-rw-r--r--themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm22
-rw-r--r--themes/luci-theme-material/luasrc/view/themes/material/header.htm21
-rw-r--r--themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm21
-rw-r--r--themes/luci-theme-rosy/luasrc/view/themes/rosy/header.htm95
5 files changed, 41 insertions, 126 deletions
diff --git a/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css b/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css
index 5b7baebdbd..c36d02f0b8 100644
--- a/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css
+++ b/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css
@@ -2049,6 +2049,10 @@ div.cbi-value var,
color: #0069d6;
}
+#modal_overlay > .modal.uci-dialog {
+ max-width: 900px;
+}
+
.uci-change-list {
line-height: 170%;
white-space: pre;
@@ -2111,8 +2115,8 @@ div.cbi-value var,
.uci-change-legend-label > var {
float: left;
margin-right: 4px;
- width: 10px;
- height: 10px;
+ width: 16px;
+ height: 16px;
display: block;
position: relative;
}
diff --git a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm
index d784e4ff94..697c5c7bf1 100644
--- a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm
+++ b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm
@@ -130,27 +130,6 @@
write('</ul>')
end
end
-
- local function render_changes()
- -- calculate the number of unsaved changes
- if tree.nodes[category] and tree.nodes[category].ucidata then
- local ucichanges = 0
-
- local i, j
- for i, j in pairs(require("luci.model.uci").cursor():changes()) do
- ucichanges = ucichanges + #j
- end
-
- if ucichanges > 0 then
- write('<a class="uci_change_indicator label notice" href="%s?redir=%s">%s: %d</a>' %{
- url(category, 'uci/changes'),
- http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/")),
- translate('Unsaved Changes'),
- ucichanges
- })
- end
- end
- end
-%>
<!DOCTYPE html>
<html lang="<%=luci.i18n.context.lang%>">
@@ -179,7 +158,6 @@
<a class="brand" href="#"><%=boardinfo.hostname or "?"%></a>
<% render_topmenu() %>
<div class="pull-right">
- <% render_changes() %>
<span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
<span class="label success" id="xhr_poll_status_on"><%:Auto Refresh%> <%:on%></span>
<span class="label" id="xhr_poll_status_off" style="display:none"><%:Auto Refresh%> <%:off%></span>
diff --git a/themes/luci-theme-material/luasrc/view/themes/material/header.htm b/themes/luci-theme-material/luasrc/view/themes/material/header.htm
index 9521314e1f..7ce195cc9f 100644
--- a/themes/luci-theme-material/luasrc/view/themes/material/header.htm
+++ b/themes/luci-theme-material/luasrc/view/themes/material/header.htm
@@ -155,26 +155,6 @@
write('</ul>')
end
end
-
- local function render_changes()
- -- calculate the number of unsaved changes
- if tree.nodes[category] and tree.nodes[category].ucidata then
- local ucichanges = 0
- local i, j
- for i, j in pairs(require("luci.model.uci").cursor():changes()) do
- ucichanges = ucichanges + #j
- end
-
- if ucichanges > 0 then
- write('<a class="uci_change_indicator label notice" href="%s?redir=%s">%s: %d</a>' %{
- url(category, 'uci/changes'),
- http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/")),
- translate('Unsaved Changes'),
- ucichanges
- })
- end
- end
- end
-%>
<!DOCTYPE html>
<html lang="<%=luci.i18n.context.lang%>">
@@ -209,7 +189,6 @@
<a id="logo" href="<%=url("admin/status/overview")%>"><img src="<%=media%>/brand.png" alt="OpenWrt"></a>
<a class="brand" href="#"><%=boardinfo.hostname or "?"%></a>
<div class="status">
- <% render_changes() %>
<span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
<span class="label success" id="xhr_poll_status_on"><span class="mobile-hide"><%:Auto Refresh%></span> <%:on%></span>
<span class="label" id="xhr_poll_status_off" style="display:none"><span class="mobile-hide"><%:Auto Refresh%></span> <%:off%></span>
diff --git a/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm b/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm
index c5186c40c5..fbe030d18c 100644
--- a/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm
+++ b/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm
@@ -125,25 +125,6 @@
end
end
end
-
- local function render_changes()
- if tree.nodes[category] and tree.nodes[category].ucidata then
- local ucic = 0
- local i, j
- for i, j in pairs(require("luci.model.uci").cursor():changes()) do
- ucic = ucic + #j
- end
-
- if ucic > 0 then
- write('<div id="savemenu" class="uci_change_indicator"><a class="warning" href="%s?redir=%s">%s: %d</a></div>' %{
- url(category, 'uci/changes'),
- http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/")),
- translate('Unsaved Changes'),
- ucic
- })
- end
- end
- end
-%>
<?xml version="1.0" encoding="utf-8"?>
@@ -234,8 +215,6 @@
</ul>
<% end %>
-<% render_changes() %>
-
<div class="clear"></div>
</div>
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 c10dea9dd5..c20d9c0485 100644
--- a/themes/luci-theme-rosy/luasrc/view/themes/rosy/header.htm
+++ b/themes/luci-theme-rosy/luasrc/view/themes/rosy/header.htm
@@ -3,7 +3,7 @@
luci-theme-rosy
Copyright 2018 Rosy Song <rosysong@rosinson.com>
Copyright 2018 Yan Lan Shen <yanlan.shen@rosinson.com>
-
+
Have a bug? Please create an issue here on GitHub!
https://github.com/rosywrt/luci-theme-rosy/issues
@@ -146,68 +146,44 @@
end
end
- local function render_logout()
- local childs = disp.node_childs(cattree)
- if #childs > 0 then
-
- for i, r in ipairs(childs) do
- local nnode = cattree.nodes[r]
- local grandchildren = disp.node_childs(nnode)
-
+ local function render_logout()
+ local childs = disp.node_childs(cattree)
+ if #childs > 0 then
+
+ for i, r in ipairs(childs) do
+ local nnode = cattree.nodes[r]
+ local grandchildren = disp.node_childs(nnode)
+
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>' %{
- title,
- nodeurl(category, r, nnode.query),
- title
- })
- end
- end
-
- end
- end
-
-
- local function render_changes()
- -- calculate the number of unsaved changes
- if tree.nodes[category] and tree.nodes[category].ucidata then
- local ucichanges = 0
-
- for i, j in pairs(require("luci.model.uci").cursor():changes()) do
- for k, l in pairs(j) do
- for m, n in pairs(l) do
- ucichanges = ucichanges + 1;
- end
- end
- end
+ local title = pcdata(striptags(translate(nnode.title)))
+
+ write('<span class="label logout"><a data-title="%s" href="%s">%s</a></span>' %{
+ title,
+ nodeurl(category, r, nnode.query),
+ title
+ })
+ end
+ end
+
+ end
+ end
- if ucichanges > 0 then
- write('<a class="uci_change_indicator label notice" href="%s?redir=%s"><span class="mobile-hide">%s:</span> %d</a>' %{
- url(category, 'uci/changes'),
- http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/")),
- translate('Unsaved Changes'),
- ucichanges
- })
- end
- end
- end
local function auth_level()
- local childs = disp.node_childs(cattree)
+ local childs = disp.node_childs(cattree)
if #childs > 0 then
- for i, r in ipairs(childs) do
- local nnode = cattree.nodes[r]
- local grandchildren = disp.node_childs(nnode)
-
+ for i, r in ipairs(childs) do
+ local nnode = cattree.nodes[r]
+ local grandchildren = disp.node_childs(nnode)
+
if #grandchildren > 0 then
-- If this value is returned, the current interface is the logged-in data output interface
return "auth"
else
-- If this value is returned, it indicates that the current interface is a data output interface that does not require login.
return "noauth"
- end
- end
+ end
+ end
end
-- If this value is returned, the current interface is the login interface
return "login"
@@ -260,7 +236,6 @@
<span class="showSide"></span>
<a class="brand PC-hide" href="#"><%=boardinfo.hostname or "?"%></a>
<div class="btn-con pull-right">
- <% render_changes() %>
<span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
<span class="label success" id="xhr_poll_status_on"><span class="mobile-hide">
<%:Auto Refresh%></span>
@@ -274,10 +249,10 @@
</div>
</header>
<div style="" class="loading">
- <span>
- <div class="loading-img">
- <img src="<%=media%>/loading.svg">
- </div>Loading...
+ <span>
+ <div class="loading-img">
+ <img src="<%=media%>/loading.svg">
+ </div>Loading...
</span>
</div>
<div class="main">
@@ -292,10 +267,10 @@
</div>
<div class="main-right">
<div id="maincontent">
- <div class="logoImg">
- <img class="mobile-hide" src="<%=media%>/logo.png" alt="Rosy">
+ <div class="logoImg">
+ <img class="mobile-hide" src="<%=media%>/logo.png" alt="Rosy">
<img src="<%=media%>/mobile-loginBG.png" class="PC-hide">
- <a class="brand" href="#"><%=boardinfo.hostname or "?"%></a>
+ <a class="brand" href="#"><%=boardinfo.hostname or "?"%></a>
</div>
<div class="container">
<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>