[TASK] Remove tree code in element browser selection 56/41256/2
authorBenjamin Mack <benni@typo3.org>
Tue, 14 Jul 2015 22:32:47 +0000 (00:32 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Tue, 14 Jul 2015 22:33:36 +0000 (00:33 +0200)
Resolves: #68144
Releases: master
Change-Id: I37b34fcd132718c18d8c7483d3e9df3b481ec764
Reviewed-on: http://review.typo3.org/41256
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Build/Resources/Public/Less/TYPO3/_element_tree.less
typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php
typo3/sysext/t3skin/Resources/Public/Css/visual/t3skin.css

index 2bcc082..72d3992 100644 (file)
@@ -165,6 +165,12 @@ body#imp-exp-mod ul#treeRoot {
        }
 }
 
+ul#flatTreeRoot {
+       li:last-child:before {
+               background-color: #f1f1f1;
+       }
+}
+
 //
 // Configuration trees, used in Admin Tools => Configuration
 //
index 93235fb..84f1549 100644 (file)
@@ -1603,7 +1603,7 @@ class ElementBrowser {
                        $db = $this->getDatabaseConnection();
                        $picon = IconUtility::getSpriteIconForRecord('pages', $mainPageRec);
                        $picon .= BackendUtility::getRecordTitle('pages', $mainPageRec, TRUE);
-                       $out .= $picon . '<br />';
+                       $out .= $picon . '<ul class="list-tree" id="flatTreeRoot">';
                        // Look up tt_content elements from the expanded page:
                        $res = $db->exec_SELECTquery(
                                'uid,header,hidden,starttime,endtime,fe_group,CType,colPos,bodytext',
@@ -1624,28 +1624,11 @@ class ElementBrowser {
                                        $selected = ' class="bg-success"';
                                }
                                // Putting list element HTML together:
-                               $out .= '<img' . IconUtility::skinImg($GLOBALS['BACK_PATH'], ('gfx/ol/join' . ($c == $cc ? 'bottom' : '')
-                                               . '.gif'), 'width="18" height="16"') . ' alt="" />' . $arrCol
+                               $out .= '<li>'
                                        . '<a href="#"' . $selected . ' onclick="return link_typo3Page(\'' . $expPageId . '\',\'#' . $row['uid'] . '\');">'
-                                       . $icon . BackendUtility::getRecordTitle('tt_content', $row, TRUE) . '</a><br />';
-                               // Finding internal anchor points:
-                               if (GeneralUtility::inList('text,textpic', $row['CType'])) {
-                                       $split = preg_split('/(<a[^>]+name=[\'"]?([^"\'>[:space:]]+)[\'"]?[^>]*>)/i', $row['bodytext'], -1, PREG_SPLIT_DELIM_CAPTURE);
-                                       foreach ($split as $skey => $sval) {
-                                               if ($skey % 3 == 2) {
-                                                       // Putting list element HTML together:
-                                                       $sval = substr($sval, 0, 100);
-                                                       $out .= '<img' . IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/ol/line.gif',
-                                                                       'width="18" height="16"') . ' alt="" />'
-                                                               . '<img' . IconUtility::skinImg($GLOBALS['BACK_PATH'], ('gfx/ol/join'
-                                                                       . ($skey + 3 > count($split) ? 'bottom' : '') . '.gif'), 'width="18" height="16"')
-                                                                       . ' alt="" />' . '<a href="#" onclick="return link_typo3Page(' . GeneralUtility::quoteJSvalue($expPageId)
-                                                                       . ',' . GeneralUtility::quoteJSvalue('#' . $sval) . ');">' . htmlspecialchars((' <A> ' . $sval))
-                                                                       . '</a><br />';
-                                               }
-                                       }
-                               }
+                                       . $icon . BackendUtility::getRecordTitle('tt_content', $row, TRUE) . '</a></li>';
                        }
+                       $out .= '</ul>';
                }
                return $out;
        }
index abe7f02..064a040 100644 (file)
@@ -10850,6 +10850,9 @@ body#imp-exp-mod ul#treeRoot > li:first-child {
 body#imp-exp-mod ul#treeRoot ul li:last-child:before {
   background-color: #f1f1f1;
 }
+ul#flatTreeRoot li:last-child:before {
+  background-color: #f1f1f1;
+}
 table.t3-tree-config {
   background: #ececec;
   background-image: linear-gradient(center top, #ffffff 0px, #ececec 100px);