Added the media field for page type "Shortcut" as well
[Packages/TYPO3.CMS.git] / typo3 / alt_file_navframe.php
index 7828957..c8ebef1 100755 (executable)
@@ -72,7 +72,13 @@ class SC_alt_file_navframe {
                // Internal, dynamic:
        var $content;           // Content accumulates in this variable.
        var $foldertree;        // Folder tree object.
-       var $doc;                       // Template object.
+
+       /**
+        * document template object
+        *
+        * @var template
+        */
+       var $doc;
        var $backPath;
 
                // Internal, static: GPvar:
@@ -91,7 +97,6 @@ class SC_alt_file_navframe {
 
                        // Setting backPath
                $this->backPath = $BACK_PATH;
-               $this->doc->backPath = $BACK_PATH;
 
                        // Setting GPvars:
                $this->ajax = t3lib_div::_GP('ajax');
@@ -110,11 +115,12 @@ class SC_alt_file_navframe {
 
                                // Create template object:
                        $this->doc = t3lib_div::makeInstance('template');
+                       $this->doc->backPath = $BACK_PATH;
                        $this->doc->docType = 'xhtml_trans';
 
                                // Adding javascript code for AJAX (prototype), drag&drop and the pagetree
                        $this->doc->JScode  = '
-                       <script type="text/javascript" src="'.$this->backPath.'contrib/prototype.js"></script>
+                       <script type="text/javascript" src="'.$this->backPath.'contrib/prototype/prototype.js"></script>
                        <script type="text/javascript" src="'.$this->backPath.'tree.js"></script>'."\n";
 
                                // Setting JavaScript for menu.
@@ -143,10 +149,7 @@ class SC_alt_file_navframe {
                        );
 
                                // Click menu code is added:
-                       $CMparts=$this->doc->getContextMenuCode();
-                       $this->doc->bodyTagAdditions = $CMparts[1];
-                       $this->doc->JScode.= $CMparts[0];
-                       $this->doc->postCode.= $CMparts[2];
+                       $this->doc->getContextMenuCode();
                }
        }
 
@@ -200,6 +203,7 @@ class SC_alt_file_navframe {
        function printContent() {
                        // If we handle an AJAX call, send headers:
                if ($this->ajax) {
+                       header('X-JSON: ('.($this->foldertree->ajaxStatus?'true':'false').')');
                        header('Content-type: text/html; charset=utf-8');
                        // If it's the regular call to fully output the tree:
                } else {