|
|
|
@ -463,7 +463,7 @@ class Template |
|
|
|
|
/** |
|
|
|
|
* Set theme, include CSS files |
|
|
|
|
*/ |
|
|
|
|
public function set_css_files() |
|
|
|
|
public function set_css_static_files() |
|
|
|
|
{ |
|
|
|
|
global $disable_js_and_css_files; |
|
|
|
|
$css = array(); |
|
|
|
@ -475,24 +475,40 @@ class Template |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Default CSS Bootstrap |
|
|
|
|
$css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'bootstrap.css'); |
|
|
|
|
// Base CSS |
|
|
|
|
$css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'base.css'); |
|
|
|
|
$css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH) . 'bootstrap.css'); |
|
|
|
|
|
|
|
|
|
//Extra CSS files |
|
|
|
|
$css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/thickbox.css'; |
|
|
|
|
$css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/chosen/chosen.css'; |
|
|
|
|
$css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/thickbox.css'; |
|
|
|
|
$css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/chosen/chosen.css'; |
|
|
|
|
|
|
|
|
|
if (api_is_global_chat_enabled()) { |
|
|
|
|
$css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/chat/css/chat.css'; |
|
|
|
|
$css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/chat/css/chat.css'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$css[] = api_get_path(WEB_CSS_PATH).'font-awesome.css'; |
|
|
|
|
$css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/mediaelement/mediaelementplayer.css'; |
|
|
|
|
$css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/daterange/daterangepicker-bs3.css'; |
|
|
|
|
$css[] = api_get_path(WEB_CSS_PATH) . 'font-awesome.css'; |
|
|
|
|
$css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/mediaelement/mediaelementplayer.css'; |
|
|
|
|
$css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/daterange/daterangepicker-bs3.css'; |
|
|
|
|
|
|
|
|
|
//THEME CSS STYLE |
|
|
|
|
// $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'responsive.css'); |
|
|
|
|
// $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'responsive.css'); |
|
|
|
|
|
|
|
|
|
$css_file_to_string = null; |
|
|
|
|
foreach ($css as $file) { |
|
|
|
|
$css_file_to_string .= api_get_css($file); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!$disable_js_and_css_files) { |
|
|
|
|
$this->assign('css_static_file_to_string', $css_file_to_string); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* Set theme, include CSS files |
|
|
|
|
*/ |
|
|
|
|
public function set_css_custom_files() |
|
|
|
|
{ |
|
|
|
|
global $disable_js_and_css_files; |
|
|
|
|
// Base CSS |
|
|
|
|
$css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'base.css'); |
|
|
|
|
$css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).$this->theme.'/default.css'); |
|
|
|
|
|
|
|
|
|
if ($this->show_learnpath) { |
|
|
|
@ -532,9 +548,13 @@ class Template |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!$disable_js_and_css_files) { |
|
|
|
|
$this->assign('css_file_to_string', $css_file_to_string); |
|
|
|
|
$this->assign('css_custom_file_to_string', $css_file_to_string); |
|
|
|
|
|
|
|
|
|
$style_print = api_get_css(api_get_cdn_path(api_get_path(WEB_CSS_PATH).$this->theme.'/print.css'), 'print'); |
|
|
|
|
$style_print = ''; |
|
|
|
|
if (is_readable(api_get_path(SYS_CSS_PATH).$this->theme.'/print.css')) { |
|
|
|
|
$style_print = api_get_css(api_get_cdn_path(api_get_path(WEB_CSS_PATH) . $this->theme . '/print.css'), |
|
|
|
|
'print'); |
|
|
|
|
} |
|
|
|
|
$this->assign('css_style_print', $style_print); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -687,8 +707,9 @@ class Template |
|
|
|
|
$this->assign('title_string', $title_string); |
|
|
|
|
|
|
|
|
|
//Setting the theme and CSS files |
|
|
|
|
$this->set_css_files(); |
|
|
|
|
$css = $this->set_css_static_files(); |
|
|
|
|
$this->set_js_files(); |
|
|
|
|
$this->set_css_custom_files($css); |
|
|
|
|
//$this->set_js_files_post(); |
|
|
|
|
|
|
|
|
|
$browser = api_browser_support('check_browser'); |
|
|
|
|