Browse Source

add css frames.css and themes for document html scorm and BT#7683

aragonc 9 years ago
parent
commit
6456599755

+ 8 - 0
app/Resources/public/css/themes/frames.css

@@ -0,0 +1,8 @@
+/*
+    Theme Name: Frame Scorm
+    URI Project: http://www.chamilo.org
+    Description: Styles main base of Chamilo LMS appearance, works with Bootstrap 3.0.x
+    Author:
+        alex.aragon@beeznest.com
+    Version: 1.0
+*/

+ 1 - 1
main/inc/lib/svg-edit/extensions/imagelib/users.php

@@ -31,7 +31,7 @@ if (is_array($scan_files) && count($scan_files) > 0) {
 }
 $style = '<style>';
 $style .= '@import "'.api_get_path(WEB_CSS_PATH).'base.css";';
-$style .= '@import "'.api_get_path(WEB_CSS_PATH).api_get_visual_theme().'/default.css";';
+$style .= '@import "'.api_get_path(WEB_CSS_PATH).'themes/'.api_get_visual_theme().'/default.css";';
 $style .='</style>';
 
 ?>

+ 9 - 1
src/Chamilo/CoreBundle/Component/Editor/CkEditor/CkEditor.php

@@ -38,8 +38,16 @@ class CkEditor extends Editor
      */
     public function createHtml()
     {
+        $cssFile = api_get_path(SYS_CSS_PATH).'themes/'.api_get_visual_theme().'/frames.css';
+        if (!is_file($cssFile)) {
+            $cssFile = api_get_path(WEB_CSS_PATH).'frames.css';
+        } else {
+            $cssFile = api_get_path(WEB_CSS_PATH).'themes/'.api_get_visual_theme().'/frames.css';
+        }
+        
+        $style = '<link href="'.$cssFile.'" rel="stylesheet" media="screen" type="text/css" />';
         $html = '<textarea id="'.$this->getName().'" name="'.$this->getName().'" class="ckeditor">
-                 '.$this->value.'
+                 '.$style.$this->value.'
                  </textarea>';
         $html .= $this->editorReplace();