Feature #6256: $TCA: Newline for Tabs (--div--)
authorIngmar Schlecht <ingmar.schlecht@typo3.org>
Sat, 10 Nov 2007 10:35:24 +0000 (10:35 +0000)
committerIngmar Schlecht <ingmar.schlecht@typo3.org>
Sat, 10 Nov 2007 10:35:24 +0000 (10:35 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2683 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms.php
typo3/template.php

index d9f75a0..a996ea1 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-10  Ingmar Schlecht  <ingmar@typo3.org>
+
+       * Feature #6256: $TCA: Newline for Tabs (--div--)
+
 2007-11-09  Benjamin Mack  <mack@xnos.org>
 
        * (feature/cleanup) Refactored clickmenu to speed up the BE
index 154e2d5..7d40de9 100755 (executable)
@@ -575,6 +575,8 @@ class t3lib_TCEforms        {
                                                                                $this->pushToDynNestedStack('tab', $tabIdentStringMD5.'-'.($out_sheet+1));
                                                                                $out_array[$out_sheet] = array();
                                                                                $out_array_meta[$out_sheet]['title'] = $this->sL($parts[1]);
+                                                                                       // Register newline for Tab
+                                                                               $out_array_meta[$out_sheet]['newline'] = ($parts[2] == "newline");
                                                                        }
                                                                } else {        // Setting alternative title for "General" tab if "--div--" is the very first element.
                                                                        $out_array_meta[$out_sheet]['title'] = $this->sL($parts[1]);
@@ -648,7 +650,8 @@ class t3lib_TCEforms        {
                                                'label' => $out_array_meta[$idx]['title'],
                                                'content' => '<table border="0" cellspacing="0" cellpadding="0" width="100%">'.
                                                                $resstr.
-                                                       '</table>'
+                                                       '</table>',
+                                               'newline' => $out_array_meta[$idx]['newline'],  // Newline for this tab/sheet
                                        );
                                }
                        }
index 9676055..d42b882 100755 (executable)
@@ -1415,7 +1415,7 @@ $str.=$this->docBodyTagBegin().
                                $index+=1;      // Need to add one so checking for first index in JavaScript is different than if it is not set at all.
 
                                        // Switch to next tab row if needed
-                               if (!$foldout && $titleLenCount>$newRowCharLimit)       {       // 50 characters is probably a reasonable count of characters before switching to next row of tabs.
+                               if (!$foldout && ($titleLenCount>$newRowCharLimit | ($def['newline'] === true && $titleLenCount > 0))) { // 50 characters is probably a reasonable count of characters before switching to next row of tabs.
                                        $titleLenCount=0;
                                        $tabRows++;
                                        $options[$tabRows] = array();