/** * Initializes the controller before invoking an action method. * * @return void */ protected function initializeAction() { parent::initializeAction(); $this->template->setExtDirectStateProvider(); $resourcePath = t3lib_extMgm::extRelPath('workspaces') . 'Resources/Public/'; $GLOBALS['TBE_STYLES']['extJS']['theme'] = $resourcePath . 'StyleSheet/preview.css'; $this->pageRenderer->loadExtJS(); $this->pageRenderer->enableExtJSQuickTips(); // Load JavaScript: $this->pageRenderer->addExtDirectCode(array('TYPO3.Workspaces', 'TYPO3.ExtDirectStateProvider')); $states = $GLOBALS['BE_USER']->uc['moduleData']['Workspaces']['States']; $this->pageRenderer->addInlineSetting('Workspaces', 'States', $states); $this->pageRenderer->addJsFile($this->backPath . '../t3lib/js/extjs/ux/flashmessages.js'); $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()); }
/** * Initializes the controller before invoking an action method. * * @return void */ protected function initializeAction() { parent::initializeAction(); $this->template->setExtDirectStateProvider(); if (tx_Workspaces_Service_Workspaces::isOldStyleWorkspaceUsed()) { $message = t3lib_div::makeInstance('t3lib_FlashMessage', $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:warning.oldStyleWorkspaceInUser'), '', t3lib_FlashMessage::WARNING); t3lib_FlashMessageQueue::addMessage($message); } $this->pageRenderer->loadExtJS(); $this->pageRenderer->enableExtJSQuickTips(); $states = $GLOBALS['BE_USER']->uc['moduleData']['Workspaces']['States']; $this->pageRenderer->addInlineSetting('Workspaces', 'States', $states); // Load JavaScript: $this->pageRenderer->addExtDirectCode(array('TYPO3.Workspaces')); $this->pageRenderer->addJsFile($this->backPath . '../t3lib/js/extjs/ux/flashmessages.js'); $this->pageRenderer->addJsFile($this->backPath . '../t3lib/js/extjs/ux/Ext.grid.RowExpander.js'); $this->pageRenderer->addJsFile($this->backPath . '../t3lib/js/extjs/ux/Ext.app.SearchField.js'); $this->pageRenderer->addJsFile($this->backPath . '../t3lib/js/extjs/ux/Ext.ux.FitToParent.js'); $resourcePath = t3lib_extMgm::extRelPath('workspaces') . 'Resources/Public/JavaScript/'; $this->pageRenderer->addCssFile($resourcePath . 'gridfilters/css/GridFilters.css'); $this->pageRenderer->addCssFile($resourcePath . 'gridfilters/css/RangeMenu.css'); $jsFiles = array('gridfilters/menu/RangeMenu.js', 'gridfilters/menu/ListMenu.js', 'gridfilters/GridFilters.js', 'gridfilters/filter/Filter.js', 'gridfilters/filter/StringFilter.js', 'gridfilters/filter/DateFilter.js', 'gridfilters/filter/ListFilter.js', 'gridfilters/filter/NumericFilter.js', 'gridfilters/filter/BooleanFilter.js', 'gridfilters/filter/BooleanFilter.js', 'configuration.js', 'helpers.js', 'actions.js', 'component.js', 'toolbar.js', 'grid.js', 'workspaces.js'); foreach ($jsFiles as $jsFile) { $this->pageRenderer->addJsFile($resourcePath . $jsFile); } }