[BUGFIX] Correct response object usage and LegacyTree usage 97/44197/3
authorMarkus Klein <markus.klein@typo3.org>
Wed, 21 Oct 2015 10:25:56 +0000 (12:25 +0200)
committerBenjamin Kott <info@bk2k.info>
Wed, 21 Oct 2015 11:26:30 +0000 (13:26 +0200)
Resolves: #70909
Releases: master
Change-Id: I8c14c9e2e7278db2e30f82c28532a134fff4bf56
Reviewed-on: https://review.typo3.org/44197
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Benjamin Kott <info@bk2k.info>
Tested-by: Benjamin Kott <info@bk2k.info>
typo3/sysext/backend/Classes/Controller/FileSystemNavigationFrameController.php
typo3/sysext/backend/Classes/Controller/PageTreeNavigationController.php
typo3/sysext/recordlist/Resources/Public/JavaScript/BrowseFiles.js

index 36acb89..303bd5f 100644 (file)
@@ -258,7 +258,7 @@ class FileSystemNavigationFrameController
         $this->init();
         $tree = $this->foldertree->getBrowsableTree();
         if ($this->foldertree->getAjaxStatus() === false) {
-            $response->withStatus(500);
+            $response = $response->withStatus(500);
         } else {
             $response->getBody()->write(json_encode($tree));
         }
index b56c5a3..78b154b 100644 (file)
@@ -333,7 +333,7 @@ class PageTreeNavigationController
         $this->init();
         $tree = $this->pagetree->getBrowsableTree();
         if (!$this->pagetree->ajaxStatus) {
-            $response->withStatus(500);
+            $response = $response->withStatus(500);
         } else {
             $response->getBody()->write(json_encode($tree));
         }
index c199bc4..74be57b 100644 (file)
@@ -14,7 +14,7 @@
 /**
  * File selection
  */
-define(['jquery', 'TYPO3/CMS/Recordlist/ElementBrowser'], function($, ElementBrowser) {
+define(['jquery', 'TYPO3/CMS/Recordlist/ElementBrowser', 'TYPO3/CMS/Backend/LegacyTree'], function($, ElementBrowser, Tree) {
        'use strict';
 
        var BrowseFiles = {
@@ -85,6 +85,8 @@ define(['jquery', 'TYPO3/CMS/Recordlist/ElementBrowser'], function($, ElementBro
                }
        };
 
+       Tree.ajaxID = 'sc_alt_file_navframe_expandtoggle';
+
        $(function() {
                $.extend(BrowseFiles.elements, $('body').data('elements'));