summaryrefslogtreecommitdiffhomepage
path: root/themes/luci-theme-openwrt/luasrc
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/luci-theme-openwrt/luasrc
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/luci-theme-openwrt/luasrc')
-rw-r--r--themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm11
1 files changed, 8 insertions, 3 deletions
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">