Fixed bug #5497: Links in Task Center
authorBernhard Kraft <kraftb@think-open.at>
Fri, 16 Jan 2009 13:48:13 +0000 (13:48 +0000)
committerBernhard Kraft <kraftb@think-open.at>
Fri, 16 Jan 2009 13:48:13 +0000 (13:48 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4729 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/template.php

index bd4216e..8f535ee 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,12 @@
+2009-01-16  Bernhard Kraft  <kraftb@think-open.at>
+
+       * Fixed bug #5497: Links in Task Center
+
 2009-01-15  Steffen Kamper  <info@sk-typo3.de> 
 
        * Fixed bug #10057: hide/unhide page causes error when done via the context menu
        * Fixed bug #8787: titles length in list module (thanks to Stefano Cecere)
-       
+
 2009-01-14  Jeff Segars <jeff@webempoweredchurch.org>
 
        * Fixed bug #10064: config.admPanel has no effect (thanks to Ralf Hettinger)
@@ -13,7 +17,7 @@
        * Added feature #10138: htmlArea RTE: add Clear RTE cache option to BE Clear cache menu
        * Fixed bug #10140: htmlArea RTE: Alignment of td's and th's in out-of-the-box installation
 
-2009-01-14  Steffen Kamper  <info@sk-typo3.de> 
+2009-01-14  Steffen Kamper  <info@sk-typo3.de>
 
        * Fixed bug #10143 spamProtectEmailAddresses_atSubst does not work correctly if linktext contains email address with uppercase charachters (thanks to Helmut Hummel)
        * Fixed bug #9885: Add Hook to ClearCacheMenu
index 2921ce4..6cff266 100755 (executable)
@@ -1485,10 +1485,10 @@ $str.=$this->docBodyTagBegin().
                                        $onclick = 'this.blur(); DTM_activate("'.$id.'","'.$index.'", '.($toggle<0?1:0).'); return false;';
                                }
 
-                               $isNotEmpty = strcmp(trim($def['content']),'');
+                               $isEmpty = !(strcmp(trim($def['content']),'') || strcmp(trim($def['icon']),''));
 
                                // "Removes" empty tabs
-                               if (!$isNotEmpty && $dividers2tabs == 1) {
+                               if ($isEmpty && $dividers2tabs == 1) {
                                        continue;
                                }
 
@@ -1498,24 +1498,24 @@ $str.=$this->docBodyTagBegin().
                                if (!$foldout)  {
                                                // Create TAB cell:
                                        $options[$tabRows][] = '
-                                                       <td class="'.($isNotEmpty ? 'tab' : 'disabled').'" id="'.$id.'-'.$index.'-MENU"'.$noWrap.$mouseOverOut.'>'.
-                                                       ($isNotEmpty ? '<a href="#" onclick="'.htmlspecialchars($onclick).'"'.($def['linkTitle'] ? ' title="'.htmlspecialchars($def['linkTitle']).'"':'').'>' : '').
+                                                       <td class="'.($isEmpty ? 'disabled' : 'tab').'" id="'.$id.'-'.$index.'-MENU"'.$noWrap.$mouseOverOut.'>'.
+                                                       ($isEmpty ? '' : '<a href="#" onclick="'.htmlspecialchars($onclick).'"'.($def['linkTitle'] ? ' title="'.htmlspecialchars($def['linkTitle']).'"':'').'>').
                                                        $def['icon'].
                                                        ($def['label'] ? htmlspecialchars($def['label']) : '&nbsp;').
                                                        $requiredIcon.
                                                        $this->icons($def['stateIcon'],'margin-left: 10px;').
-                                                       ($isNotEmpty ? '</a>' :'').
+                                                       ($isEmpty ? '' : '</a>').
                                                        '</td>';
                                        $titleLenCount+= strlen($def['label']);
                                } else {
                                                // Create DIV layer for content:
                                        $divs[] = '
-                                               <div class="'.($isNotEmpty ? 'tab' : 'disabled').'" id="'.$id.'-'.$index.'-MENU"'.$mouseOverOut.'>'.
-                                                       ($isNotEmpty ? '<a href="#" onclick="'.htmlspecialchars($onclick).'"'.($def['linkTitle'] ? ' title="'.htmlspecialchars($def['linkTitle']).'"':'').'>' : '').
+                                               <div class="'.($isEmpty ? 'disabled' : 'tab').'" id="'.$id.'-'.$index.'-MENU"'.$mouseOverOut.'>'.
+                                                       ($isEmpty ? '' : '<a href="#" onclick="'.htmlspecialchars($onclick).'"'.($def['linkTitle'] ? ' title="'.htmlspecialchars($def['linkTitle']).'"':'').'>').
                                                        $def['icon'].
                                                        ($def['label'] ? htmlspecialchars($def['label']) : '&nbsp;').
                                                        $requiredIcon.
-                                                       ($isNotEmpty ? '</a>' : '').
+                                                       ($isEmpty ? '' : '</a>').
                                                        '</div>';
                                }
 
@@ -1530,7 +1530,7 @@ $str.=$this->docBodyTagBegin().
                                                DTM_array["'.$id.'"]['.$c.'] = "'.$id.'-'.$index.'";
                                ';
                                        // If not empty and we have the toggle option on, check if the tab needs to be expanded
-                               if ($toggle == 1 && $isNotEmpty) {
+                               if ($toggle == 1 && !$isEmpty) {
                                        $JSinit[] = '
                                                if (top.DTM_currentTabs["'.$id.'-'.$index.'"]) { DTM_toggle("'.$id.'","'.$index.'",1); }
                                        ';