add css frame.css in CkEditor BT#7683

1.10.x
aragonc 10 years ago
parent 86e4df09c0
commit fccfb6b77d
  1. 44
      app/Resources/public/css/frames.css
  2. 8
      app/Resources/public/css/themes/frames.css
  3. 8
      main/inc/lib/pdf.lib.php
  4. 2
      main/inc/lib/svg-edit/extensions/imagelib/groups.php
  5. 2
      main/inc/lib/svg-edit/extensions/imagelib/index.php
  6. 4
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/CkEditor.php

@ -0,0 +1,44 @@
/*
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
*/
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,300italic,400italic);
body{
color: #666;
font-family: 'Open Sans', sans-serif;
padding: 20px;
line-height: 30px;
background: #E8F5FC;
}
a{
text-decoration: none;
color: #00829C;
}
a:hover{
text-decoration: underline;
}
h1{
border-radius: 5px;
border: 1px solid #ccc;
padding-top: 10px;
padding-bottom: 10px;
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#ffffff+0,e5e5e5+100;White+3D */
background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top, #ffffff 0%, #e5e5e5 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#e5e5e5)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); /* IE10+ */
background: linear-gradient(to bottom, #ffffff 0%,#e5e5e5 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e5e5e5',GradientType=0 ); /* IE6-9 */
}
img{
border: 1px solid #ccc;
border-radius: 5px;
padding: 5px;
background: #fff;
}

@ -1,8 +0,0 @@
/*
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
*/

@ -83,11 +83,11 @@ class PDF
Display::$global_template->assign('pdf_content', $content);
$organization = api_get_setting('Institution');
$img = api_get_path(SYS_CODE_PATH).'css/'.api_get_visual_theme().'/images/header-logo.png';
$img = api_get_path(SYS_CSS_PATH).'themes/'.api_get_visual_theme().'/images/header-logo.png';
// Search for classic logo
if (file_exists($img)) {
$img = api_get_path(WEB_CODE_PATH).'css/'.api_get_visual_theme().'/images/header-logo.png';
$img = api_get_path(WEB_CSS_PATH).'themes/'.api_get_visual_theme().'/images/header-logo.png';
$organization = "<img src='$img'>";
} else {
// Just use the platform title.
@ -100,9 +100,9 @@ class PDF
$pdfLogo = api_get_setting('pdf_logo_header');
if ($pdfLogo === 'true') {
$visualTheme = api_get_visual_theme();
$img = api_get_path(SYS_CODE_PATH).'css/'.$visualTheme.'/images/pdf_logo_header.png';
$img = api_get_path(SYS_CSS_PATH).'themes/'.$visualTheme.'/images/pdf_logo_header.png';
if (file_exists($img)) {
$img = api_get_path(WEB_CODE_PATH) . 'css/' . $visualTheme . '/images/pdf_logo_header.png';
$img = api_get_path(WEB_CSS_PATH) . 'themes/' . $visualTheme . '/images/pdf_logo_header.png';
$organization = "<img src='$img'>";
}
}

@ -47,7 +47,7 @@ if (is_array($all_files) && count($all_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>';
?>

@ -46,7 +46,7 @@ $web_path = api_get_path(WEB_COURSE_PATH).$course_info['path'].'/document/image
$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>';
?>

@ -38,14 +38,16 @@ class CkEditor extends Editor
*/
public function createHtml()
{
$style = '';
if (trim($this->value) == '<html><head><title></title></head><body></body></html>') {
$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">
'.$style.$this->value.'
</textarea>';

Loading…
Cancel
Save