public function registerMedia()
 {
     parent::registerMedia();
     $this->templateScripts['ACE_THEME'] = config('cms.default_ace_theme', 'textmate');
     $this->templateScripts['DEFAULT_HTML_EDITOR'] = config('cms.default_html_editor', '');
     $this->templateScripts['DEFAULT_CODE_EDITOR'] = config('cms.default_code_editor', '');
     Meta::loadPackage('libraries', 'core');
     $this->includeModuleMediaFile($this->getRouterController());
     $this->includeMergedMediaFile('backendEvents', 'js/backendEvents');
 }
 public function registerMedia()
 {
     parent::registerMedia();
     $this->templateScripts['ACE_THEME'] = config('cms.default_ace_theme', 'textmate');
     $this->templateScripts['DEFAULT_HTML_EDITOR'] = config('cms.default_html_editor', '');
     $this->templateScripts['DEFAULT_CODE_EDITOR'] = config('cms.default_code_editor', '');
     Assets::package(['libraries', 'core']);
     $file = $this->getRouterController();
     if (app('module.loader')->findFile('resources/js', $file, 'js')) {
         Assets::js('controller.' . $file, \CMS::backendResourcesURL() . '/js/' . $file . '.js', 'global', FALSE, 999);
     }
     // TODO: разобраться с подключением событий и локалей в контроллер
     //Assets::group('global', 'events', '<script type="text/javascript">' . Assets::merge_files('js/events', 'js') . '</script>', 'global');
 }
 public function after()
 {
     $this->template->with('bodyId', $this->getRouterPath())->with('theme', config('cms.theme.default'));
     parent::after();
 }
Пример #4
0
 /**
  * @param DocumentInterface  $document
  * @param TemplateController $controller
  */
 public function onControllerLoad(DocumentInterface $document, TemplateController $controller)
 {
     $controller->includeModuleMediaFile('fields/' . $this->getType()->getType());
 }