Ejemplo n.º 1
0
 /**
  * Initializes the controller before invoking an action method.
  *
  * @return void
  */
 protected function initializeAction()
 {
     parent::initializeAction();
     $this->stageService = GeneralUtility::makeInstance('TYPO3\\CMS\\Workspaces\\Service\\StagesService');
     $this->workspaceService = GeneralUtility::makeInstance('TYPO3\\CMS\\Workspaces\\Service\\WorkspaceService');
     $this->template->setExtDirectStateProvider();
     $resourcePath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('workspaces') . 'Resources/Public/StyleSheet/preview.css';
     $GLOBALS['TBE_STYLES']['extJS']['theme'] = $resourcePath;
     $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 . 'sysext/backend/Resources/Public/JavaScript/notifications.js');
     $this->pageRenderer->addJsFile($this->backPath . 'sysext/backend/Resources/Public/JavaScript/flashmessages.js');
     $this->pageRenderer->addJsFile($this->backPath . 'sysext/backend/Resources/Public/JavaScript/iframepanel.js');
     $resourcePathJavaScript = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('workspaces') . 'Resources/Public/JavaScript/';
     $jsFiles = array('Ext.ux.plugins.TabStripContainer.js', 'Store/mainstore.js', 'helpers.js', 'actions.js');
     foreach ($jsFiles as $jsFile) {
         $this->pageRenderer->addJsFile($resourcePathJavaScript . $jsFile);
     }
     $this->pageRenderer->addInlineSetting('RecordHistory', 'moduleUrl', BackendUtility::getModuleUrl('record_history'));
     // todo this part should be done with inlineLocallanglabels
     $this->pageRenderer->addJsInlineCode('workspace-inline-code', $this->generateJavascript());
 }
Ejemplo n.º 2
0
 /**
  * Initializes the controller before invoking an action method.
  *
  * @return void
  */
 protected function initializeAction()
 {
     parent::initializeAction();
     $backendRelPath = ExtensionManagementUtility::extRelPath('backend');
     $workspacesRelPath = ExtensionManagementUtility::extRelPath('workspaces');
     $this->stageService = GeneralUtility::makeInstance(\TYPO3\CMS\Workspaces\Service\StagesService::class);
     $this->workspaceService = GeneralUtility::makeInstance(\TYPO3\CMS\Workspaces\Service\WorkspaceService::class);
     $this->pageRenderer->addJsFile($backendRelPath . 'Resources/Public/JavaScript/ExtDirect.StateProvider.js');
     $resourcePath = $workspacesRelPath . 'Resources/Public/Css/preview.css';
     $GLOBALS['TBE_STYLES']['extJS']['theme'] = $resourcePath;
     $this->pageRenderer->loadExtJS();
     // 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($backendRelPath . 'Resources/Public/JavaScript/notifications.js');
     $this->pageRenderer->addJsFile($backendRelPath . 'Resources/Public/JavaScript/iframepanel.js');
     $resourcePathJavaScript = $workspacesRelPath . 'Resources/Public/JavaScript/';
     $jsFiles = array('Ext.ux.plugins.TabStripContainer.js', 'Store/mainstore.js', 'helpers.js', 'actions.js');
     foreach ($jsFiles as $jsFile) {
         $this->pageRenderer->addJsFile($resourcePathJavaScript . $jsFile);
     }
     $this->pageRenderer->addInlineSetting('FormEngine', 'moduleUrl', BackendUtility::getModuleUrl('record_edit'));
     $this->pageRenderer->addInlineSetting('RecordHistory', 'moduleUrl', BackendUtility::getModuleUrl('record_history'));
     // @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();
     $backendRelPath = ExtensionManagementUtility::extRelPath('backend');
     $this->stageService = GeneralUtility::makeInstance(StagesService::class);
     $this->workspaceService = GeneralUtility::makeInstance(WorkspaceService::class);
     $this->pageRenderer->addJsFile($backendRelPath . 'Resources/Public/JavaScript/ExtDirect.StateProvider.js');
     $this->pageRenderer->loadExtJS(false, false);
     // Load  JavaScript:
     $this->pageRenderer->addExtDirectCode(array('TYPO3.Workspaces', 'TYPO3.ExtDirectStateProvider'));
     $states = $this->getBackendUser()->uc['moduleData']['Workspaces']['States'];
     $this->pageRenderer->addInlineSetting('Workspaces', 'States', $states);
     $this->pageRenderer->addInlineSetting('FormEngine', 'moduleUrl', BackendUtility::getModuleUrl('record_edit'));
     $this->pageRenderer->addInlineSetting('RecordHistory', 'moduleUrl', BackendUtility::getModuleUrl('record_history'));
     // @todo this part should be done with inlineLocallanglabels
     $this->pageRenderer->addJsInlineCode('workspace-inline-code', $this->generateJavascript());
 }
Ejemplo n.º 4
0
 /**
  * Initializes the controller before invoking an action method.
  *
  * @return void
  */
 protected function initializeAction()
 {
     parent::initializeAction();
     $states = $this->getBackendUser()->uc['moduleData']['Workspaces']['States'];
     $this->pageRenderer->addInlineSetting('Workspaces', 'States', $states);
     foreach ($this->getAdditionalResourceService()->getLocalizationResources() as $localizationResource) {
         $this->pageRenderer->addInlineLanguageLabelFile($localizationResource);
     }
     $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Workspaces/Backend');
     $this->pageRenderer->addInlineSetting('FormEngine', 'moduleUrl', BackendUtility::getModuleUrl('record_edit'));
     $this->pageRenderer->addInlineSetting('RecordHistory', 'moduleUrl', BackendUtility::getModuleUrl('record_history'));
     $this->pageRenderer->addInlineSetting('Workspaces', 'id', (int) GeneralUtility::_GP('id'));
 }
Ejemplo n.º 5
0
 /**
  * Initializes the controller before invoking an action method.
  *
  * @return void
  */
 protected function initializeAction()
 {
     parent::initializeAction();
     $backendRelPath = ExtensionManagementUtility::extRelPath('backend');
     $this->pageRenderer->addJsFile($backendRelPath . 'Resources/Public/JavaScript/ExtDirect.StateProvider.js');
     if (WorkspaceService::isOldStyleWorkspaceUsed()) {
         $flashMessage = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessage::class, $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:warning.oldStyleWorkspaceInUser'), '', \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING);
         /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
         $flashMessageService = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessageService::class);
         /** @var $defaultFlashMessageQueue \TYPO3\CMS\Core\Messaging\FlashMessageQueue */
         $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
         $defaultFlashMessageQueue->enqueue($flashMessage);
     }
     $this->pageRenderer->loadExtJS();
     $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($backendRelPath . 'Resources/Public/JavaScript/extjs/ux/Ext.grid.RowExpander.js');
     $this->pageRenderer->addJsFile($backendRelPath . 'Resources/Public/JavaScript/extjs/ux/Ext.app.SearchField.js');
     $this->pageRenderer->addJsFile($backendRelPath . 'Resources/Public/JavaScript/extjs/ux/Ext.ux.FitToParent.js');
     $resourcePath = ExtensionManagementUtility::extRelPath('workspaces') . 'Resources/Public/JavaScript/';
     // @todo Integrate additional stylesheet resources
     $this->pageRenderer->addCssFile($resourcePath . 'gridfilters/css/GridFilters.css');
     $this->pageRenderer->addCssFile($resourcePath . 'gridfilters/css/RangeMenu.css');
     $filters = array($resourcePath . 'gridfilters/menu/RangeMenu.js', $resourcePath . 'gridfilters/menu/ListMenu.js', $resourcePath . 'gridfilters/GridFilters.js', $resourcePath . 'gridfilters/filter/Filter.js', $resourcePath . 'gridfilters/filter/StringFilter.js', $resourcePath . 'gridfilters/filter/DateFilter.js', $resourcePath . 'gridfilters/filter/ListFilter.js', $resourcePath . 'gridfilters/filter/NumericFilter.js', $resourcePath . 'gridfilters/filter/BooleanFilter.js', $resourcePath . 'gridfilters/filter/BooleanFilter.js');
     $custom = $this->getAdditionalResourceService()->getJavaScriptResources();
     $resources = array($resourcePath . 'Component/RowDetailTemplate.js', $resourcePath . 'Component/RowExpander.js', $resourcePath . 'Component/TabPanel.js', $resourcePath . 'Store/mainstore.js', $resourcePath . 'configuration.js', $resourcePath . 'helpers.js', $resourcePath . 'actions.js', $resourcePath . 'component.js', $resourcePath . 'toolbar.js', $resourcePath . 'grid.js', $resourcePath . 'workspaces.js');
     $javaScriptFiles = array_merge($filters, $custom, $resources);
     foreach ($javaScriptFiles as $javaScriptFile) {
         $this->pageRenderer->addJsFile($javaScriptFile);
     }
     foreach ($this->getAdditionalResourceService()->getLocalizationResources() as $localizationResource) {
         $this->pageRenderer->addInlineLanguageLabelFile($localizationResource);
     }
     $this->pageRenderer->addInlineSetting('FormEngine', 'moduleUrl', BackendUtility::getModuleUrl('record_edit'));
     $this->pageRenderer->addInlineSetting('RecordHistory', 'moduleUrl', BackendUtility::getModuleUrl('record_history'));
 }