public function before() { parent::before(); if ($this->auto_render === TRUE) { Assets::js('jquery', ADMIN_RESOURCES . 'libs/jquery.min.js'); Assets::package(array('jquery-ui', 'backbone', 'notify', 'underscore', 'select2', 'core', 'bootstrap')); } }
public function before() { parent::before(); $uri = URL::site(rawurldecode(Request::$initial->uri())); $message = 'Критическая ошибка'; //$this->template->content->page = $uri; if (Request::$initial !== Request::$current) { if ($message = rawurldecode($this->request->param('message'))) { //$this->template->content->message = $message; $this->template->content = $message; } } //$this->template->content->action = $this->request->action(); }
public function after() { if ($this->auto_render === TRUE) { // Выводим навигацию в шаблон $this->template->navigation = View::factory('global/navigation', array('navigation' => $this->navigation->menu())); // Выводим хлебные крошки в шаблон $breadcrumbs = new Navigation_Helper_Breadcrumbs(); $breadcrumbs->setSeparator('/ '); $breadcrumbs->setContainer($this->navigation->pages()); $this->template->breadcrumbs = $breadcrumbs->render(); // Глобальные стили $styles = array('public/css/common.css'); // Глобальные JS скрипты $scripts = array('public/js/jquery-1.7.1.min.js'); $this->template->styles = array_merge($this->template->styles, $styles); $this->template->scripts = array_merge($scripts, $this->template->scripts); unset($styles, $scripts); // Делаем параметр page глобальной переменной в шаблонах $this->template->set_global('page', $this->page); } parent::after(); }
public function init_media() { parent::init_media(); $this->template_js_params['ACE_THEME'] = Config::get('ace', 'theme', 'textmate'); $this->template_js_params['DEFAULT_FILTER'] = Config::get('site', 'default_filter_id', ''); Assets::package(array('jquery', 'bootstrap', 'notify', 'select2', 'dropzone', 'fancybox', 'datepicker', 'underscore', 'core')); foreach (array('.js', '-message.js') as $file_name) { $filename = Kohana::$cache_dir . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, array('i18n', NULL)) . I18n::lang() . $file_name; if (file_exists($filename)) { Assets::js('i18n', BASE_URL . 'cms/cache/i18n/' . I18n::lang() . $file_name, 'global', FALSE, 0); } } $file = $this->request->controller(); $directory = $this->request->directory(); if (!empty($directory)) { $file = $directory . '/' . $file; } $file = strtolower($file); if (Kohana::find_file('media', FileSystem::normalize_path('js/controller/' . $file), 'js')) { Assets::js('controller.' . $file, ADMIN_RESOURCES . 'js/controller/' . $file . '.js', 'global', FALSE, 999); } Assets::group('global', 'events', '<script type="text/javascript">' . Assets::merge_files('js/events', 'js') . '</script>', 'global'); }
public function before() { parent::before(); Assets::package(array('jquery', 'elfinder', 'jquery-ui', 'backbone', 'core', 'underscore')); }
public function before() { parent::before(); $this->template->scripts[] = 'public/js/install.js'; }