[BUGFIX] Hide empty tabs in DynTabMenu 98/34198/2
authorBenjamin Mack <benni@typo3.org>
Sat, 15 Nov 2014 10:08:51 +0000 (11:08 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Sat, 15 Nov 2014 12:09:38 +0000 (13:09 +0100)
Due to a previous tab patch, empty
tabs in e.g. FormEngine are always
shown but disabled (= unstyled).

The patch sets the default tab
behaviour to hide tabs that are
empty.

Releases: master
Resolves: #62972
Change-Id: I1d9c99269204cfdefa67b74085118def22b1ff9f
Reviewed-on: http://review.typo3.org/34198
Reviewed-by: Felix Kopp <felix-source@phorax.com>
Tested-by: Felix Kopp <felix-source@phorax.com>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/backend/Classes/Template/DocumentTemplate.php

index 2472d72..62cf059 100644 (file)
@@ -1583,7 +1583,7 @@ function jumpToUrl(URL) {
         * @param int $tabBehaviour If set to '1' empty tabs will be remove, If set to '2' empty tabs will be disabled
         * @return string JavaScript section for the HTML header.
         */
-       public function getDynTabMenu($menuItems, $identString, $toggle = 0, $foldout = FALSE, $noWrap = TRUE, $fullWidth = FALSE, $defaultTabIndex = 1, $tabBehaviour = 2) {
+       public function getDynTabMenu($menuItems, $identString, $toggle = 0, $foldout = FALSE, $noWrap = TRUE, $fullWidth = FALSE, $defaultTabIndex = 1, $tabBehaviour = 1) {
                // Load the static code, if not already done with the function below
                $this->loadJavascriptLib('sysext/backend/Resources/Public/JavaScript/tabmenu.js');
                $content = '';