diff --git a/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Documents.php b/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Documents.php index 7f563c6620..064703673a 100644 --- a/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Documents.php +++ b/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Documents.php @@ -25,6 +25,7 @@ class Documents extends Basic $config['toolbar'] = $this->getNormalToolbar(); } else { $config['toolbar_minToolbar'] = $this->getMinimizedToolbar(); + $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar(); } $config['extraPlugins'] = $this->getPluginsToString(); @@ -84,12 +85,61 @@ class Documents extends Basic '/', ['Styles', 'Format', 'Font', 'FontSize'], ['Bold', 'Italic', 'Underline'], - ['JustifyLeft', 'JustifyCenter', 'JustifyRight'], + ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'], api_get_setting('enabled_wiris') === 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''], ['Source'], ]; } + /** + * @return array + */ + protected function getMaximizedToolbar() + { + return [ + $this->getNewPageBlock(), + ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', 'inserthtml'], + ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'], + ['Link', 'Unlink', 'Anchor', 'Glossary'], + [ + 'Image', + 'Mapping', + 'Video', + 'Oembed', + 'Flash', + 'Youtube', + 'Audio', + 'leaflet', + 'Smiley', + 'SpecialChar', + 'Asciimath', + 'Asciisvg', + ], + '/', + ['Table', '-', 'CreateDiv'], + ['BulletedList', 'NumberedList', 'HorizontalRule', '-', 'Outdent', 'Indent', 'Blockquote'], + ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'], + [ + 'Bold', + 'Italic', + 'Underline', + 'Strike', + '-', + 'Subscript', + 'Superscript', + '-', + 'TextColor', + 'BGColor', + api_get_configuration_value('translate_html') ? 'Language' : '', + ], + [api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''], + ['Styles', 'Format', 'Font', 'FontSize'], + ['PageBreak', 'ShowBlocks'], + api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''], + ['Toolbarswitch', 'Source'], + ]; + } + /** * Get the toolbar configuration when CKEditor is minimized. * @@ -112,7 +162,7 @@ class Documents extends Basic 'Asciisvg', ], ['BulletedList', 'NumberedList', 'HorizontalRule'], - ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'], + ['JustifyLeft', 'JustifyCenter', 'JustifyRight'], ['Styles', 'Format', 'Font', @@ -124,12 +174,11 @@ class Documents extends Basic 'BGColor', ], [ - 'Language', + api_get_configuration_value('translate_html') ? 'Language' : '', 'ShowBlocks', - 'Source', ], api_get_setting('enabled_wiris') === 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''], - ['Toolbarswitch'], + ['Toolbarswitch', 'Source'], ]; } } diff --git a/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/DocumentsStudent.php b/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/DocumentsStudent.php index 16a9525f5e..98012086b9 100644 --- a/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/DocumentsStudent.php +++ b/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/DocumentsStudent.php @@ -148,7 +148,7 @@ class DocumentsStudent extends Basic 'Asciisvg', ], ['BulletedList', 'NumberedList', 'HorizontalRule'], - ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'], + ['JustifyLeft', 'JustifyCenter', 'JustifyRight'], [ 'Format', 'Font', diff --git a/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/IntroductionSection.php b/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/IntroductionSection.php index 93d6c3647b..139c047051 100644 --- a/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/IntroductionSection.php +++ b/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/IntroductionSection.php @@ -25,6 +25,7 @@ class IntroductionSection extends Basic $config['toolbar'] = $this->getNormalToolbar(); } else { $config['toolbar_minToolbar'] = $this->getMinimizedToolbar(); + $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar(); } $config['extraPlugins'] = $this->getPluginsToString(); @@ -113,7 +114,8 @@ class IntroductionSection extends Basic ], ['BulletedList', 'NumberedList', 'HorizontalRule'], ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'], - ['Styles', + [ + 'Styles', 'Format', 'Font', 'FontSize', @@ -122,14 +124,62 @@ class IntroductionSection extends Basic 'Underline', 'TextColor', 'BGColor', + api_get_configuration_value('translate_html') ? 'Language' : '', ], [ - 'Language', 'ShowBlocks', - 'Source', ], api_get_setting('enabled_wiris') === 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''], - ['Toolbarswitch'], + ['Toolbarswitch', 'Source'], + ]; + } + + /** + * @return array + */ + protected function getMaximizedToolbar() + { + return [ + $this->getNewPageBlock(), + ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', 'inserthtml'], + ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'], + ['Link', 'Unlink', 'Anchor', 'Glossary'], + [ + 'Image', + 'Mapping', + 'Video', + 'Oembed', + 'Flash', + 'Youtube', + 'Audio', + 'leaflet', + 'Smiley', + 'SpecialChar', + 'Asciimath', + 'Asciisvg', + ], + '/', + ['Table', '-', 'CreateDiv'], + ['BulletedList', 'NumberedList', 'HorizontalRule', '-', 'Outdent', 'Indent', 'Blockquote'], + ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'], + [ + 'Bold', + 'Italic', + 'Underline', + 'Strike', + '-', + 'Subscript', + 'Superscript', + '-', + 'TextColor', + 'BGColor', + api_get_configuration_value('translate_html') ? 'Language' : '', + ], + [api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''], + ['Styles', 'Format', 'Font', 'FontSize'], + ['PageBreak', 'ShowBlocks'], + api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''], + ['Toolbarswitch', 'Source'], ]; } } diff --git a/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TestQuestionDescription.php b/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TestQuestionDescription.php index 3355e6b9e1..8fb345566d 100644 --- a/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TestQuestionDescription.php +++ b/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TestQuestionDescription.php @@ -105,8 +105,7 @@ class TestQuestionDescription extends Basic [api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''], ['Styles', 'Format', 'Font', 'FontSize'], ['PageBreak', 'ShowBlocks'], - ['Toolbarswitch'], - ['Source'] + ['Toolbarswitch', 'Source'], ]; } @@ -138,7 +137,7 @@ class TestQuestionDescription extends Basic ['Styles', 'Format', 'Font', 'FontSize'], ['Bold', 'Italic', 'Underline'], ['JustifyLeft', 'JustifyCenter', 'JustifyRight'], - ['Source'] + ['Source'], ]; } @@ -167,8 +166,7 @@ class TestQuestionDescription extends Basic 'BGColor', api_get_configuration_value('translate_html') ? 'Language' : '', ], - ['Toolbarswitch'], - ['Source'] + ['Toolbarswitch', 'Source'], ]; } }