luci2: Hide empty tabs when rendering cbi maps
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 1 Feb 2014 18:08:36 +0000 (18:08 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 1 Feb 2014 18:08:36 +0000 (18:08 +0000)
luci2/htdocs/luci2/luci2.js

index 996c18d..30e3063 100644 (file)
@@ -6841,6 +6841,9 @@ function LuCI2()
                        if (cur == tab_index)
                                tabh.addClass('active');
 
+                       if (!tab.fields.length)
+                               tabh.hide();
+
                        return tabh;
                },