diff --git a/app/Resources/public/css/frames.css b/app/Resources/public/css/frames.css index 1aa4950f37..e0533c52b3 100644 --- a/app/Resources/public/css/frames.css +++ b/app/Resources/public/css/frames.css @@ -20,9 +20,3 @@ a{ a:hover{ text-decoration: underline; } -img{ - border: 1px solid #ccc; - border-radius: 5px; - padding: 5px; - background: #fff; -} \ No newline at end of file diff --git a/main/admin/settings.lib.php b/main/admin/settings.lib.php index b8e5adbeb8..3882483796 100755 --- a/main/admin/settings.lib.php +++ b/main/admin/settings.lib.php @@ -1000,6 +1000,7 @@ function add_edit_template() { $form->addButtonSave(get_lang('Ok'), 'submit'); // Setting the rules: the required fields. + $form->addRule('template_image', get_lang('ThisFieldIsRequired'), 'required'); $form->addRule('title', get_lang('ThisFieldIsRequired'), 'required'); $form->addRule('template_text', get_lang('ThisFieldIsRequired'), 'required'); @@ -1042,7 +1043,7 @@ function add_edit_template() { // Store the information in the database (as insert or as update). $table_system_template = Database :: get_main_table('system_template'); if ($_GET['action'] == 'add') { - $content_template = '
{CSS}'.Database::escape_string($values['template_text']).''; + $content_template = Security::remove_XSS($values['template_text'], COURSEMANAGERLOWSECURITY); $params = [ 'title' => $values['title'], 'content' => $content_template, diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ar.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ar.js index 5223facd08..15b00bb299 100644 --- a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ar.js +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ar.js @@ -3,11 +3,11 @@ Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'mathjax', 'ar', { - title: 'Mathematics in TeX', // MISSING - button: 'Math', // MISSING - dialogInput: 'Write your TeX here', // MISSING + title: 'الرياصيات في Tex', + button: 'رياضيات', + dialogInput: 'أكتب Tex خاصتك هنا', docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', - docLabel: 'TeX documentation', // MISSING - loading: 'تحميل', - pathName: 'math' // MISSING + docLabel: 'وثائق Tex', + loading: 'جاري التحميل...', + pathName: 'رياضيات' } ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/bg.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/bg.js new file mode 100644 index 0000000000..bf4fec7a2a --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/bg.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'bg', { + title: 'Формули в TeX формат', + button: 'Формули', + dialogInput: 'Въведете вашите данни с TeX форматиране тук', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX документация', + loading: 'зареждане...', + pathName: 'формули' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/da.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/da.js index d56f8f2df5..5853003b76 100644 --- a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/da.js +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/da.js @@ -5,9 +5,9 @@ For licensing, see LICENSE.md or http://ckeditor.com/license CKEDITOR.plugins.setLang( 'mathjax', 'da', { title: 'Matematik i TeX', button: 'Matematik', - dialogInput: 'Write your TeX here', // MISSING + dialogInput: 'Skriv din TeX her', docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', docLabel: 'TeX dokumentation', - loading: 'loading...', // MISSING + loading: 'henter...', pathName: 'matematik' } ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/de.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/de.js index 9a1cf64cb9..05104ba864 100644 --- a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/de.js +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/de.js @@ -7,7 +7,7 @@ CKEDITOR.plugins.setLang( 'mathjax', 'de', { button: 'Rechnung', dialogInput: 'Schreiben Sie hier in Tex', docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', - docLabel: 'Tex Dokumentation', - loading: 'lädt...', + docLabel: 'TeX-Dokumentation', + loading: 'Ladevorgang...', pathName: 'rechnen' } ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/eu.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/eu.js new file mode 100644 index 0000000000..8c9626f099 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/eu.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'eu', { + title: 'Matematikak TeX-en', + button: 'Matematika', + dialogInput: 'Idatzi zure TeX hemen', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX dokumentazioa', + loading: 'kargatzen...', + pathName: 'matematika' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/id.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/id.js new file mode 100644 index 0000000000..6189d7a4b6 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/id.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'id', { + title: 'Mathematics in TeX', // MISSING + button: 'Matematika', + dialogInput: 'Tulis Tex anda disini', + docUrl: 'http:// MISSING //en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX documentation', // MISSING + loading: 'memuat...', + pathName: 'math' // MISSING +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ko.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ko.js new file mode 100644 index 0000000000..6ce465dec3 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ko.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'ko', { + title: 'TeX 문법 수식', + button: '수식', + dialogInput: '여기 TeX 를 입력하세요', + docUrl: 'http://ko.wikipedia.org/wiki/%EC%9C%84%ED%82%A4%EB%B0%B1%EA%B3%BC:TeX_%EB%AC%B8%EB%B2%95', + docLabel: 'TeX 문서', + loading: '불러오는 중...', + pathName: '수식' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sv.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sv.js index f24b12ce25..d480d241f1 100644 --- a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sv.js +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sv.js @@ -8,6 +8,6 @@ CKEDITOR.plugins.setLang( 'mathjax', 'sv', { dialogInput: 'Skriv din TeX här', docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', docLabel: 'TeX dokumentation', - loading: 'laddar', + loading: 'laddar...', pathName: 'matte' } ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ug.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ug.js new file mode 100644 index 0000000000..8e19f4643b --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ug.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'ug', { + title: 'TeX شەكلىدىكى ماتېماتىكا فورمۇلا تەھرىرلىگۈچ', + button: 'ماتېماتىكا فورمۇلا', + dialogInput: 'بۇ جايغا TeX ڭىزنى يېزىڭ', + docUrl: 'http:// MISSING //en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX documentation', // MISSING + loading: 'loading...', // MISSING + pathName: 'math' // MISSING +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/plugin.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/plugin.js index 482a8b7fd6..8338b914d7 100644 --- a/main/inc/lib/javascript/ckeditor/plugins/mathjax/plugin.js +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/plugin.js @@ -4,17 +4,14 @@ */ /** - * @fileOverview [Mathematical Formulas](http://ckeditor.com/addon/mathjax) plugin. + * @fileOverview The [Mathematical Formulas](http://ckeditor.com/addon/mathjax) plugin that allows you to create and modify mathematical equations written in TeX directly in CKEditor.. */ 'use strict'; ( function() { - - var cdn = 'http:\/\/cdn.mathjax.org\/mathjax\/2.2-latest\/MathJax.js?config=TeX-AMS_HTML'; - CKEDITOR.plugins.add( 'mathjax', { - lang: 'af,ar,ca,cs,cy,da,de,el,en,en-gb,eo,es,fa,fi,fr,gl,he,hr,hu,it,ja,km,ku,lt,nb,nl,no,pl,pt,pt-br,ro,ru,sk,sl,sq,sv,tr,tt,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE% + lang: 'af,ar,bg,ca,cs,cy,da,de,el,en,en-gb,eo,es,eu,fa,fi,fr,gl,he,hr,hu,id,it,ja,km,ko,ku,lt,nb,nl,no,pl,pt,pt-br,ro,ru,sk,sl,sq,sv,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE% requires: 'widget,dialog', icons: 'mathjax', hidpi: true, // %REMOVE_LINE_CORE% @@ -22,6 +19,10 @@ init: function( editor ) { var cls = editor.config.mathJaxClass || 'math-tex'; + if ( !editor.config.mathJaxLib ) { + CKEDITOR.error( 'mathjax-no-config' ); + } + editor.widgets.add( 'mathjax', { inline: true, dialog: 'mathjax', @@ -127,8 +128,10 @@ // Add MathJax script to page preview. editor.on( 'contentPreview', function( evt ) { - evt.data.dataValue = evt.data.dataValue.replace( /<\/head>/, - '' + // Load MathJax lib. - '' + + '' + '' + '' + '' + @@ -431,14 +434,20 @@ } )(); /** - * Sets the path to the MathJax library. It can be both a local - * resource and a location different than the default CDN. + * Sets the path to the MathJax library. It can be both a local resource and a location different than the default CDN. * * Please note that this must be a full or absolute path. * - * config.mathJaxLib = 'http:\/\/example.com\/libs\/MathJax.js'; + * Read more in the [documentation](#!/guide/dev_mathjax) + * and see the [SDK sample](http://sdk.ckeditor.com/samples/mathjax.html). * - * @cfg {String} [mathJaxLib='http:\/\/cdn.mathjax.org\/mathjax\/2.2-latest\/MathJax.js?config=TeX-AMS_HTML'] + * config.mathJaxLib = '//cdn.mathjax.org/mathjax/2.2-latest/MathJax.js?config=TeX-AMS_HTML'; + * + * **Note:** Since CKEditor 4.5 this option does not have a default value, so it must + * be set in order to enable the MathJax plugin. + * + * @since 4.3 + * @cfg {String} mathJaxLib * @member CKEDITOR.config */ @@ -455,6 +464,9 @@ * * \( \sqrt{4} = 2 \) * + * Read more in the [documentation](#!/guide/dev_mathjax) + * and see the [SDK sample](http://sdk.ckeditor.com/samples/mathjax.html). + * * @cfg {String} [mathJaxClass='math-tex'] * @member CKEDITOR.config */ diff --git a/main/inc/lib/template.lib.php b/main/inc/lib/template.lib.php index c84f469274..420a828b95 100755 --- a/main/inc/lib/template.lib.php +++ b/main/inc/lib/template.lib.php @@ -606,6 +606,8 @@ class Template // Logo $logo = return_logo($this->theme); $this->assign('logo', $logo); + + $this->assign('show_media_element', 1); } /** @@ -857,7 +859,7 @@ class Template $notification = return_notification_menu(); $this->assign('notification_menu', $notification); - + $resize = ''; if (api_get_setting('accessibility_font_resize') == 'true') { $resize .= '