[BUGFIX] JavaScript error on page load - TYPO3.LLL.Workspace is undefined
authorMichael Klapper <klapper@aoemedia.de>
Wed, 15 Jun 2011 09:32:43 +0000 (11:32 +0200)
committerMichael Klapper <klapper@aoemedia.de>
Wed, 15 Jun 2011 09:36:10 +0000 (11:36 +0200)
Change-Id: I3047982b6762df556e3f9e6ab854081836b82c3b
Resolves: #27470
Releases: 4.6, 4.5

typo3/sysext/workspaces/Classes/Controller/PreviewController.php

index 2acd211..3771226 100644 (file)
@@ -63,7 +63,6 @@ class Tx_Workspaces_Controller_PreviewController extends Tx_Workspaces_Controlle
                $this->pageRenderer->addJsFile($this->backPath . 'js/extjs/iframepanel.js');
 
                $this->pageRenderer->addJsFile($resourcePath . 'JavaScript/Ext.ux.plugins.TabStripContainer.js');
-               $this->pageRenderer->addJsFile($resourcePath . 'JavaScript/preview.js');
 
                        // todo this part should be done with inlineLocallanglabels
                $this->pageRenderer->addJsInlineCode('workspace-inline-code', $this->generateJavascript());
@@ -117,6 +116,9 @@ class Tx_Workspaces_Controller_PreviewController extends Tx_Workspaces_Controlle
                        modeVbox: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.modeVbox', TRUE) . "',
                        modeHbox: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.modeHbox', TRUE) . "'
                };\n");
+
+               $resourcePath = t3lib_extMgm::extRelPath('workspaces') . 'Resources/Public/';
+               $this->pageRenderer->addJsFile($resourcePath . 'JavaScript/preview.js');
        }
 
        /**