/** * Retrieve some HTML to be output in all admin requests for this module (and its descendants). * By default this module calls the jsloader::render method, and includes some standard styles * * @abstract * @see \CGExtensions\jsloader\jsloader::render(); * @return bool */ public function GetHeaderHTML() { $config = \Cmsapp::get_instance()->GetConfig(); $out = \CGExtensions\jsloader\jsloader::render(array('session' => session_id())); $mod = cms_utils::get_module(MOD_CGEXTENSIONS); $fn = $mod->find_module_file('css/admin_styles.css'); if ($fn) { $css = str_replace($config['root_path'], $config['root_url'], $fn); $out .= '<link rel="stylesheet" href="' . $css . '"/>' . "\n"; } if ($this->GetName() != MOD_CGEXTENSIONS) { $fn = $this->find_module_file('css/admin_styles.css'); if ($fn) { $css = str_replace($config['root_path'], $config['root_url'], $fn); $out .= '<link rel="stylesheet" href="' . $css . '"/>' . "\n"; } } return $out; }
public static function cgjs_render($params, $smarty) { $out = \CGExtensions\jsloader\jsloader::render($params); if (isset($params['assign'])) { $smarty->assign($params['assign'], $out); return; } return $out; }