Add api_get_cidreq

pull/2487/head
jmontoyaa 9 years ago
parent 1418db4cf5
commit 4c0a779c6d
  1. 4
      main/inc/lib/javascript/ckeditor/config_js.php
  2. 20
      main/template/default/javascript/editor/ckeditor/config_js.tpl

@ -5,13 +5,15 @@ require_once '../../../global.inc.php';
$moreButtonsInMaximizedMode = false;
if (api_get_setting('more_buttons_maximized_mode') == 'true') {
if (api_get_setting('more_buttons_maximized_mode') === 'true') {
$moreButtonsInMaximizedMode = true;
}
$template = new Template();
$template->assign('moreButtonsInMaximizedMode', $moreButtonsInMaximizedMode);
$template->assign('course_condition', api_get_cidreq());
header('Content-type: application/x-javascript');
$template->display('default/javascript/editor/ckeditor/config_js.tpl');

@ -20,37 +20,37 @@ CKEDITOR.editorConfig = function (config) {
];
//Style for default CKEditor Chamilo LMS
config.stylesSet = [
{
{
name : 'Title 1',
element : 'h1',
attributes : { 'class': 'ck ck-title' }
},
{
{
name : 'Title 2',
element : 'h2',
attributes : { 'class': 'ck ck-title2' }
},
{
{
name : 'Alert Success',
element : 'p',
attributes : { 'class': 'alert alert-success' }
},
{
{
name : 'Alert Info',
element : 'p',
attributes : { 'class': 'alert alert-info' }
},
{
{
name : 'Alert Warning',
element : 'p',
attributes : { 'class': 'alert alert-warning' }
},
{
{
name : 'Alert Danger',
element : 'p',
attributes : { 'class': 'alert alert-danger' }
},
{
{
name : 'Section Article' ,
element : 'h3' ,
attributes : { 'class': 'ck ck-article' }
@ -95,8 +95,8 @@ CKEDITOR.editorConfig = function (config) {
attributes: { 'class':'ck-style3'}
}
];
{% if moreButtonsInMaximizedMode %}
config.toolbar = 'minToolbar';
config.smallToolbar = 'minToolbar';
@ -104,7 +104,7 @@ CKEDITOR.editorConfig = function (config) {
{% endif %}
// File manager (elFinder)
config.filebrowserBrowseUrl = '{{ _p.web_lib ~ 'elfinder/filemanager.php' }}';
config.filebrowserBrowseUrl = '{{ _p.web_lib ~ 'elfinder/filemanager.php?' }}{{ course_condition }}';
// Allows to use "class" attribute inside divs and spans.
config.allowedContent = true;

Loading…
Cancel
Save