Fix api_get_bootstrap_and_font_awesome

pull/3890/head
Julio Montoya 4 years ago
parent 59479e50f5
commit 147f19f9dd
  1. 9
      public/main/inc/lib/api.lib.php
  2. 2
      public/main/inc/lib/pdf.lib.php
  3. 2
      src/CoreBundle/Controller/EditorController.php

@ -6263,11 +6263,16 @@ function api_get_css($file, $media = 'screen')
return '<link href="'.$file.'" rel="stylesheet" media="'.$media.'" type="text/css" />'."\n";
}
function api_get_bootstrap_and_font_awesome($returnOnlyPath = false)
function api_get_bootstrap_and_font_awesome($returnOnlyPath = false, $returnFileLocation = false)
{
$url = api_get_path(WEB_PUBLIC_PATH).'build/css/bootstrap.css';
if ($returnOnlyPath) {
return api_get_path(SYS_PUBLIC_PATH).'build/css/bootstrap.css';
if ($returnFileLocation) {
return api_get_path(SYS_PUBLIC_PATH).'build/css/bootstrap.css';
}
return $url;
}
return '<link href="'.$url.'" rel="stylesheet" type="text/css" />'."\n";

@ -475,7 +475,7 @@ class PDF
if ($addDefaultCss) {
$basicStyles = [
api_get_bootstrap_and_font_awesome(true),
api_get_bootstrap_and_font_awesome(true, true),
api_get_path(SYS_PUBLIC_PATH).'build/css/app.css',
api_get_path(SYS_PUBLIC_PATH).'build/css/themes/'.api_get_visual_theme().'/default.css',
];

@ -224,7 +224,7 @@ class EditorController extends BaseController
$params = [
// @todo replace api_get_bootstrap_and_font_awesome
'bootstrap_css' => api_get_bootstrap_and_font_awesome(true),
'bootstrap_css' => api_get_bootstrap_and_font_awesome(true, false),
'css_editor' => ChamiloApi::getEditorBlockStylePath(),
'more_buttons_in_max_mode' => $moreButtonsInMaximizedMode,
'type' => $type,

Loading…
Cancel
Save