summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/view
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2016-01-18 11:23:07 +0100
committerJo-Philipp Wich <jow@openwrt.org>2016-01-18 11:23:11 +0100
commitbe8dba57a9824179a6b942e27e7203d0ba921129 (patch)
tree2cbaae9f248e87fb0165ffda1fb27f0de6fd3b38 /modules/luci-base/luasrc/view
parent1600b600dddc1a563e421dbbc39764766aa8639a (diff)
luci-base: improve tab hide logic
Do not rely on explicit child counts but inspect the code instead to decide when to hide tabs or not. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-base/luasrc/view')
-rw-r--r--modules/luci-base/luasrc/view/cbi/tabmenu.htm1
1 files changed, 0 insertions, 1 deletions
diff --git a/modules/luci-base/luasrc/view/cbi/tabmenu.htm b/modules/luci-base/luasrc/view/cbi/tabmenu.htm
index b96ac9ce4b..06c1414bf3 100644
--- a/modules/luci-base/luasrc/view/cbi/tabmenu.htm
+++ b/modules/luci-base/luasrc/view/cbi/tabmenu.htm
@@ -2,7 +2,6 @@
<ul class="cbi-tabmenu">
<%- self.selected_tab = luci.http.formvalue("tab." .. self.config .. "." .. section) %>
<%- for _, tab in ipairs(self.tab_names) do if #self.tabs[tab].childs > 0 then %>
- <script type="text/javascript">cbi_c['container.<%=self.config%>.<%=section%>.<%=tab%>'] = <%=#self.tabs[tab].childs%>;</script>
<%- if not self.selected_tab then self.selected_tab = tab end %>
<li id="tab.<%=self.config%>.<%=section%>.<%=tab%>" class="cbi-tab<%=(tab == self.selected_tab) and '' or '-disabled'%>">
<a onclick="this.blur(); return cbi_t_switch('<%=self.config%>.<%=section%>', '<%=tab%>')" href="<%=REQUEST_URI%>?tab.<%=self.config%>.<%=section%>=<%=tab%>"><%=self.tabs[tab].title%></a>