* fixed a minor display error in installer category tree
authorThomas Hempel <thomas.hempel@typo3.org>
Thu, 20 Dec 2007 12:44:36 +0000 (12:44 +0000)
committerThomas Hempel <thomas.hempel@typo3.org>
Thu, 20 Dec 2007 12:44:36 +0000 (12:44 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2852 709f56b5-9817-0410-a4d7-c38de5d9e867

typo3/sysext/install/modules/setup/class.tx_install_module_setup.php
typo3/sysext/install/modules/setup/res/styles.css

index 28afcdb..c9574ba 100644 (file)
@@ -322,9 +322,17 @@ class tx_install_module_setup extends tx_install_module_base       {
                        // first level
                foreach ($data as $level1Key => $level1Value)   {
                        if (is_array($level1Value))     {
-                               $content .= '<li id="item_'.$level1Key.'" class="tree_item"><a href="#" onclick="toggleElement(\''.$level1Key.'\'); return false;"><img id="img_'.$level1Key.'" src="'.$this->pObj->getBasicsObject()->getInstallerWebPath().'imgs/icons/plus.gif" /></a>';
+                               $onlyRootDeliverables = ((count($level1Value) == 1 && isset($level1Value['root'])));
+                               
+                               if (!$onlyRootDeliverables)     {
+                                       $content .= '<li id="item_'.$level1Key.'" class="tree_item">';
+                                       $content .= '<a href="#" onclick="toggleElement(\''.$level1Key.'\'); return false;"><img id="img_'.$level1Key.'" src="'.$this->pObj->getBasicsObject()->getInstallerWebPath().'imgs/icons/plus.gif" /></a>';
+                               } else {
+                                       $content .= '<li id="item_'.$level1Key.'" class="tree_item_nosub">';
+                               }
                                $content .= $this->renderTreeElement($level1Key);
-                               if (is_array($level1Value))     {
+                               
+                               if (is_array($level1Value) && !$onlyRootDeliverables)   {
                                        $content .= '<ul id="'.$level1Key.'" class="subLeaf" style="display:none">';
                                        foreach ($level1Value as $level2Key => $level2Value)    {
                                                $content .= '<li id="item_'.$level2Key.'" class="tree_item">'.$this->renderTreeElement($level1Key, $level2Key).'</li>';
index 27a860d..b2123eb 100644 (file)
@@ -77,6 +77,10 @@ label em     {
        padding: 2px 3px 0px 2px;
 }
 
+.tree_item_nosub       {
+       padding-left: 14px;
+}
+
 .help_container        {
        border-bottom: 3px gray solid;
        width: 100%;