Index: t3lib/class.t3lib_tceforms.php =================================================================== --- t3lib/class.t3lib_tceforms.php (Revision 9107) +++ t3lib/class.t3lib_tceforms.php (Arbeitskopie) @@ -235,7 +235,7 @@ */ var $clipObj=FALSE; var $enableClickMenu=FALSE; // Enable click menu on reference icons. - var $enableTabMenu = FALSE; // Enable Tab Menus. If set to true, the JavaScript content from template::getDynTabMenuJScode() must be included in the document. + var $enableTabMenu = FALSE; // Enable Tab Menus. var $renderReadonly = FALSE; // When enabled all fields are rendered non-editable. var $form_rowsToStylewidth = 9.58; // Form field width compensation: Factor from NN4 form field widths to style-aware browsers (like NN6+ and MSIE, with the $CLIENT[FORMSTYLE] value set) @@ -4374,7 +4374,7 @@ function getDynTabMenu($parts, $idString, $dividersToTabsBehaviour = 1) { if (is_object($GLOBALS['TBE_TEMPLATE'])) { $GLOBALS['TBE_TEMPLATE']->backPath = $this->backPath; - return $GLOBALS['TBE_TEMPLATE']->getDynTabMenu($parts, $idString, 0, false, 50, 1, false, 1, $dividersToTabsBehaviour); + return $GLOBALS['TBE_TEMPLATE']->getDynTabMenu($parts, $idString, 0, FALSE, 0, 1, FALSE, 1, $dividersToTabsBehaviour); } else { $output = ''; foreach($parts as $singlePad) { Index: typo3/template.php =================================================================== --- typo3/template.php (Revision 9107) +++ typo3/template.php (Arbeitskopie) @@ -1695,15 +1695,15 @@ * @param string Identification string. This should be unique for every instance of a dynamic menu! * @param integer If "1", then enabling one tab does not hide the others - they simply toggles each sheet on/off. This makes most sense together with the $foldout option. If "-1" then it acts normally where only one tab can be active at a time BUT you can click a tab and it will close so you have no active tabs. * @param boolean If set, the tabs are rendered as headers instead over each sheet. Effectively this means there is no tab menu, but rather a foldout/foldin menu. Make sure to set $toggle as well for this option. - * @param integer Character limit for a new row. + * @param integer Character limit for a new row, 0 by default, because this parameter is deprecated since TYPO3 4.5 * @param boolean If set, tab table cells are not allowed to wrap their content * @param boolean If set, the tabs will span the full width of their position * @param integer Default tab to open (for toggle <=0). Value corresponds to integer-array index + 1 (index zero is "1", index "1" is 2 etc.). A value of zero (or something non-existing) will result in no default tab open. * @param integer 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. */ - function getDynTabMenu($menuItems,$identString,$toggle=0,$foldout=FALSE,$newRowCharLimit=50,$noWrap=1,$fullWidth=FALSE,$defaultTabIndex=1,$dividers2tabs=2) { - // load the static code, if not already done with the function below + public function getDynTabMenu($menuItems, $identString, $toggle = 0, $foldout = FALSE, $newRowCharLimit = 0, $noWrap = 1, $fullWidth = FALSE, $defaultTabIndex = 1, $dividers2tabs = 2) { + // load the static code, if not already done with the function below $this->loadJavascriptLib('js/tabmenu.js'); $content = ''; @@ -1722,10 +1722,12 @@ $tabRows=0; $titleLenCount = 0; foreach($menuItems as $index => $def) { - $index+=1; // Need to add one so checking for first index in JavaScript is different than if it is not set at all. + // Need to add one so checking for first index in JavaScript + // is different than if it is not set at all. + $index+=1; // Switch to next tab row if needed - if (!$foldout && ($titleLenCount>$newRowCharLimit | ($def['newline'] === true && $titleLenCount > 0))) { + if (!$foldout && (($newRowCharLimit > 0 && $titleLenCount > $newRowCharLimit) | ($def['newline'] === TRUE && $titleLenCount > 0))) { $titleLenCount=0; $tabRows++; $options[$tabRows] = array(); @@ -1739,7 +1741,7 @@ $isEmpty = !(strcmp(trim($def['content']),'') || strcmp(trim($def['icon']),'')); - // "Removes" empty tabs + // "Removes" empty tabs if ($isEmpty && $dividers2tabs == 1) { continue; } @@ -1849,9 +1851,11 @@ * (as long as it is called before $this->startPage()) * The return value is not needed anymore * + * @deprecated since TYPO3 4.5, as the getDynTabMenu() function includes the function automatically since TYPO3 4.3 * @return string JavaScript section for the HTML header. (return value is deprecated since TYPO3 4.3, will be removed in TYPO3 4.5) */ function getDynTabMenuJScode() { + t3lib_div::logDeprecatedFunction(); $this->loadJavascriptLib('js/tabmenu.js'); // return value deprecated since TYPO3 4.3 return ''; Index: typo3/alt_doc.php =================================================================== --- typo3/alt_doc.php (Revision 9107) +++ typo3/alt_doc.php (Arbeitskopie) @@ -494,7 +494,7 @@ t3lib_BEfunc::viewOnClick($this->popViewId,'',t3lib_BEfunc::BEgetRootLine($this->popViewId),'',$this->viewUrl,$this->popViewId_addParams). ' } ' : '') - ).$this->doc->getDynTabMenuJScode(); + ); // Setting up the context sensitive menu: $this->doc->getContextMenuCode(); Index: typo3/sysext/cms/layout/db_new_content_el.php =================================================================== --- typo3/sysext/cms/layout/db_new_content_el.php (Revision 9107) +++ typo3/sysext/cms/layout/db_new_content_el.php (Arbeitskopie) @@ -200,7 +200,6 @@ $this->doc->backPath = $BACK_PATH; $this->doc->setModuleTemplate('templates/db_new_content_el.html'); $this->doc->JScode=''; - $this->doc->JScodeLibArray['dyntabmenu'] = $this->doc->getDynTabMenuJScode(); $this->doc->form='
'; // Setting up the context sensitive menu: @@ -347,7 +346,7 @@ .typo3-dyntabmenu-divs table { margin: 15px; } .typo3-dyntabmenu-divs table td { padding: 3px; } '; - $code = $LANG->getLL('sel1',1) . '

' . $this->doc->getDynTabMenu($menuItems, 'new-content-element-wizard', false, false, 100); + $code = $LANG->getLL('sel1',1) . '

' . $this->doc->getDynTabMenu($menuItems, 'new-content-element-wizard', FALSE, FALSE); } else { $code = $LANG->getLL('sel1',1) . '

'; foreach ($menuItems as $section) { Index: typo3/sysext/version/ws/workspaceforms.php =================================================================== --- typo3/sysext/version/ws/workspaceforms.php (Revision 9107) +++ typo3/sysext/version/ws/workspaceforms.php (Arbeitskopie) @@ -137,7 +137,6 @@ $this->doc->form = ''; $this->doc->getContextMenuCode(); - $this->doc->JScode.= $this->doc->getDynTabMenuJScode(); // Parent initialization: t3lib_SCbase::init(); Index: typo3/sysext/version/ws/index.php =================================================================== --- typo3/sysext/version/ws/index.php (Revision 9107) +++ typo3/sysext/version/ws/index.php (Arbeitskopie) @@ -289,9 +289,6 @@ // Setting up the context sensitive menu: $this->doc->getContextMenuCode(); - // Add JS for dynamic tabs: - $this->doc->JScode.= $this->doc->getDynTabMenuJScode(); - // Setting publish access permission for workspace: $this->publishAccess = $BE_USER->workspacePublishAccess($BE_USER->workspace); @@ -338,7 +335,7 @@ ); // Add hidden fields and create tabs: - $content = $this->doc->getDynTabMenu($menuItems,'user_ws'); + $content = $this->doc->getDynTabMenu($menuItems, 'user_ws'); $this->content.=$this->doc->section('',$content,0,1); // Setting up the buttons and markers for docheader Index: typo3/sysext/setup/mod/index.php =================================================================== --- typo3/sysext/setup/mod/index.php (Revision 9107) +++ typo3/sysext/setup/mod/index.php (Arbeitskopie) @@ -288,7 +288,6 @@ $this->doc = t3lib_div::makeInstance('template'); $this->doc->backPath = $GLOBALS['BACK_PATH']; $this->doc->setModuleTemplate('templates/setup.html'); - $this->doc->JScodeLibArray['dyntabmenu'] = $this->doc->getDynTabMenuJScode(); $this->doc->form = ''; $this->doc->tableLayout = array( 'defRow' => array( @@ -427,7 +426,7 @@ // render the menu items $menuItems = $this->renderUserSetup(); - $this->content .= $this->doc->spacer(20) . $this->doc->getDynTabMenu($menuItems, 'user-setup', false, false, 100, 1, false, 1, $this->dividers2tabs); + $this->content .= $this->doc->spacer(20) . $this->doc->getDynTabMenu($menuItems, 'user-setup', FALSE, FALSE, 0, 1, FALSE, 1, $this->dividers2tabs); // Submit and reset buttons Index: typo3/sysext/impexp/app/index.php =================================================================== --- typo3/sysext/impexp/app/index.php (Revision 9107) +++ typo3/sysext/impexp/app/index.php (Arbeitskopie) @@ -299,9 +299,6 @@ } '); - // Set up JS for dynamic tab menu - $this->doc->JScode .= $this->doc->getDynTabMenuJScode(); - // Setting up the context sensitive menu: $this->doc->getContextMenuCode();