[BUGFIX] ElementBrowser highlighting for active selected file 20/44720/4
authorJosef Glatz <josef.glatz@typo3.org>
Sat, 14 Nov 2015 17:02:29 +0000 (18:02 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Sat, 14 Nov 2015 19:48:37 +0000 (20:48 +0100)
Due the ElementBrowser refactoring, highlighting for
currently selected file must be added again.

Releases: master
Resolves: #71230
Change-Id: I6bec9ed5cd317e88f2cdb89e58d560d567bab535
Reviewed-on: https://review.typo3.org/44720
Reviewed-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Tested-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/recordlist/Classes/LinkHandler/FileLinkHandler.php

index e46e20d..04668f6 100644 (file)
@@ -228,17 +228,19 @@ class FileLinkHandler extends AbstractLinkHandler implements LinkHandlerInterfac
         // Get files from the folder:
         $folderContent = $this->getFolderContent($folder, $extensionList);
         if (!empty($folderContent)) {
-            $out .= '<ul class="list-tree list-tree-root">';
+            $out .= '<ul class="list-tree">';
             foreach ($folderContent as $fileOrFolderObject) {
                 list($fileIdentifier, $icon) = $this->renderItem($fileOrFolderObject);
                 $selected = $currentIdentifier === $fileIdentifier ? ' class="active"' : '';
                 $out .=
                     '<li' . $selected . '>
-                                               <a href="#" class="t3js-fileLink" title="' . htmlspecialchars($fileOrFolderObject->getName()) . '" data-file="file:' . htmlspecialchars($fileIdentifier) . '">
-                                                       ' .    $icon . '
-                                                       ' . htmlspecialchars(GeneralUtility::fixed_lgd_cs($fileOrFolderObject->getName(), $titleLen)) . '
-                                               </a>
-                                       </li>';
+                        <span class="list-tree-group">
+                            <a href="#" class="t3js-fileLink list-tree-group" title="' . htmlspecialchars($fileOrFolderObject->getName()) . '" data-file="file:' . htmlspecialchars($fileIdentifier) . '">
+                                <span class="list-tree-icon">' . $icon . '</span>
+                                <span class="list-tree-title">' . htmlspecialchars(GeneralUtility::fixed_lgd_cs($fileOrFolderObject->getName(), $titleLen)) . '</span>
+                            </a>
+                        </span>
+                    </li>';
             }
             $out .= '</ul>';
         }