summaryrefslogtreecommitdiffhomepage
path: root/themes
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-07-07 15:12:47 +0200
committerJo-Philipp Wich <jo@mein.io>2018-07-09 11:51:43 +0200
commitc0de036b3162d73e9fad878afaa32e7ca0df1fed (patch)
tree38a670eb18907dccdb44bb05b19c175a3dc11a19 /themes
parent069c0c93e1045188c9e86c8e7204b0647d2fdb19 (diff)
treewide: always include cbi.js
Include cbi.js in the main header template like it is done for xhr.js and remove the page specific includes. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'themes')
-rw-r--r--themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm1
-rw-r--r--themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm1
-rw-r--r--themes/luci-theme-material/luasrc/view/themes/material/header.htm1
-rw-r--r--themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm11
4 files changed, 11 insertions, 3 deletions
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 aaacf56b8..6ad32efb4 100644
--- a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm
+++ b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm
@@ -170,6 +170,7 @@
<% if css then %>
<style title="text/css"><%= css %></style>
<% end -%>
+ <script src="<%=resource%>/cbi.js"></script>
<script src="<%=resource%>/xhr.js"></script>
</head>
diff --git a/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm b/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm
index b6ed1f713..4a1c7b644 100644
--- a/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm
+++ b/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm
@@ -81,6 +81,7 @@
</style>
<% end -%>
<meta name="viewport" content="initial-scale=1.0" />
+<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
<script type="text/javascript" src="<%=resource%>/xhr.js"></script>
<title><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(tostring(node.title)) or '')) %> - LuCI</title>
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 b6341a2c3..f97db2575 100644
--- a/themes/luci-theme-material/luasrc/view/themes/material/header.htm
+++ b/themes/luci-theme-material/luasrc/view/themes/material/header.htm
@@ -211,6 +211,7 @@
<% if css then %>
<style title="text/css"><%= css %></style>
<% end -%>
+ <script src="<%=resource%>/cbi.js"></script>
<script src="<%=resource%>/xhr.js"></script>
</head>
<body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>">
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 773cf1f82..e77f9a4bf 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
@@ -87,6 +87,9 @@
local childs = disp.node_childs(node)
if #childs > 0 then
if level > 2 then
+ if level == 3 then
+ write('<div id="tabmenu">')
+ end
write('<ul class="cbi-tabmenu">')
end
@@ -112,6 +115,9 @@
if level > 2 then
write('</ul>')
+ if level == 3 then
+ write('</div>')
+ end
end
if selected_node then
@@ -157,6 +163,7 @@
<%= css %>
</style>
<% end -%>
+<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
<script type="text/javascript" src="<%=resource%>/xhr.js"></script>
<script type="text/javascript">//<![CDATA[
document.addEventListener('DOMContentLoaded', function() {
@@ -240,9 +247,7 @@
</div>
<div id="maincontent">
- <div id="tabmenu">
- <% if category then render_tabmenu(category, cattree) end %>
- </div>
+ <% if category then render_tabmenu(category, cattree) end %>
<noscript>
<div class="alert-message warning">