Commit d45729ba authored by Benni Mack's avatar Benni Mack Committed by Anja Leichsenring
Browse files

[BUGFIX] Make ElementBrowser Trees expand again

Inside the popups the element browser trees don't reload anymore
because the RequireJS calls are added too late.

Resolves: #68012
Releases: master
Change-Id: I492833615d9c16352af667e384de36637fa6ebea
Reviewed-on: http://review.typo3.org/41041


Reviewed-by: default avatarThomas Schlumberger <thomas@b13.de>
Tested-by: default avatarThomas Schlumberger <thomas@b13.de>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent 20c8d8db
......@@ -856,6 +856,12 @@ class ElementBrowser {
* @return string Modified content variable.
*/
public function main_rte($wiz = FALSE) {
// needs to be executed before doc->startPage()
if (in_array($this->act, array('file', 'folder'))) {
$this->doc->getDragDropCode('folders', 'Tree.ajaxID = "SC_alt_file_navframe::expandCollapse"');
} elseif ($this->act === 'page') {
$this->doc->getDragDropCode('pages');
}
// Starting content:
$content = $this->doc->startPage('RTE link');
// Add the FlashMessages if any
......@@ -1255,9 +1261,6 @@ class ElementBrowser {
$files = $this->expandFolder($selectedFolder, $allowedExtensions);
}
// Create folder tree:
$this->doc->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/LegacyTree', 'function(Tree) {
Tree.ajaxID = "SC_alt_file_navframe::expandCollapse";
}');
$content .= '
<!--
Wrapper table for folder tree / file/folder list:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment