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 996c18de8c6fd8607303cf748b457b646fb7a45c..30e306331d286dd230718de3aa479b5cc3ed8534 100644 (file)
@@ -6841,6 +6841,9 @@ function LuCI2()
                        if (cur == tab_index)
                                tabh.addClass('active');
 
+                       if (!tab.fields.length)
+                               tabh.hide();
+
                        return tabh;
                },