|
@@ -15,31 +15,12 @@ class TestFreeAnswer extends Basic
|
|
|
*/
|
|
|
public function getConfig()
|
|
|
{
|
|
|
- $config['toolbar_minToolbar'] = [
|
|
|
- ['NewPage', 'Templates', '-', 'PasteText'],
|
|
|
- ['Undo', 'Redo'],
|
|
|
- ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath'],
|
|
|
- ['BulletedList', 'NumberedList', 'HorizontalRule'],
|
|
|
- ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
|
|
|
- ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
|
|
|
- ['Toolbarswitch']
|
|
|
- ];
|
|
|
- $config['toolbar_maxToolbar'] = [
|
|
|
- ['NewPage', 'Templates', '-', 'Preview', 'Print'],
|
|
|
- ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
|
|
|
- ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
|
|
|
- ['Link', 'Unlink', 'Anchor', 'Glossary'],
|
|
|
- ['Image', 'Mapping', 'Video', 'Oembed', 'Youtube', 'Flash', 'Audio', 'leaflet', 'Smiley', 'SpecialChar', 'Asciimath', ],
|
|
|
- '/',
|
|
|
- ['Table', '-', 'CreateDiv'],
|
|
|
- ['BulletedList', 'NumberedList', 'HorizontalRule', '-', 'Outdent', 'Indent', 'Blockquote'],
|
|
|
- ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
|
|
|
- ['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript', '-', 'TextColor', 'BGColor'],
|
|
|
- [api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''],
|
|
|
- ['Styles', 'Format', 'Font', 'FontSize'],
|
|
|
- ['PageBreak', 'ShowBlocks'],
|
|
|
- ['Toolbarswitch']
|
|
|
- ];
|
|
|
+ if (api_get_setting('more_buttons_maximized_mode') != 'true') {
|
|
|
+ $config['toolbar'] = $this->getNormalToolbar();
|
|
|
+ } else {
|
|
|
+ $config['toolbar_minToolbar'] = $this->getSmallToolbar();
|
|
|
+ $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
|
|
|
+ }
|
|
|
|
|
|
$config['fullPage'] = false;
|
|
|
|
|
@@ -60,4 +41,56 @@ class TestFreeAnswer extends Basic
|
|
|
|
|
|
return $config;
|
|
|
}
|
|
|
+
|
|
|
+ protected function getMaximizedToolbar()
|
|
|
+ {
|
|
|
+ return [
|
|
|
+ ['NewPage', 'Templates', '-', 'Preview', 'Print'],
|
|
|
+ ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
|
|
|
+ ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
|
|
|
+ ['Link', 'Unlink', 'Anchor', 'Glossary'],
|
|
|
+ ['Image', 'Mapping', 'Video', 'Oembed', 'Youtube', 'Flash', 'Audio', 'leaflet', 'Smiley', 'SpecialChar', 'Asciimath',],
|
|
|
+ '/',
|
|
|
+ ['Table', '-', 'CreateDiv'],
|
|
|
+ ['BulletedList', 'NumberedList', 'HorizontalRule', '-', 'Outdent', 'Indent', 'Blockquote'],
|
|
|
+ ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
|
|
|
+ ['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript', '-', 'TextColor', 'BGColor'],
|
|
|
+ [api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''],
|
|
|
+ ['Styles', 'Format', 'Font', 'FontSize'],
|
|
|
+ ['PageBreak', 'ShowBlocks'],
|
|
|
+ ['Toolbarswitch']
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
+ protected function getNormalToolbar()
|
|
|
+ {
|
|
|
+ return [
|
|
|
+ [
|
|
|
+ 'Maximize',
|
|
|
+ 'Bold',
|
|
|
+ 'Image',
|
|
|
+ 'Link',
|
|
|
+ 'PasteFromWord',
|
|
|
+ 'Audio',
|
|
|
+ 'Table',
|
|
|
+ 'Subscript',
|
|
|
+ 'Superscript',
|
|
|
+ 'ShowBlocks'
|
|
|
+ ]
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
+ protected function getSmallToolbar()
|
|
|
+ {
|
|
|
+ return [
|
|
|
+ ['NewPage', 'Templates', '-', 'PasteText'],
|
|
|
+ ['Undo', 'Redo'],
|
|
|
+ ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath'],
|
|
|
+ ['BulletedList', 'NumberedList', 'HorizontalRule'],
|
|
|
+ ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
|
|
|
+ ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
|
|
|
+ ['Toolbarswitch']
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
}
|