From 23964a71e49a3b70a3d229379326f0f6f7c75016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Ra=C3=B1a?= Date: Mon, 27 Dec 2010 15:32:48 +0100 Subject: [PATCH] Feature #2479 rev. wiki tool bars --- .../lib/fckeditor/toolbars/extended/wiki.php | 1 + .../toolbars/extended/wiki_feedback.php | 41 ++++++++----- .../toolbars/extended/wiki_student.php | 56 +++++++++++------- .../fckeditor/toolbars/extended/wiki_task.php | 59 ++++++++++++------- 4 files changed, 98 insertions(+), 59 deletions(-) diff --git a/main/inc/lib/fckeditor/toolbars/extended/wiki.php b/main/inc/lib/fckeditor/toolbars/extended/wiki.php index a1b2b3f05e..3d27c2057f 100755 --- a/main/inc/lib/fckeditor/toolbars/extended/wiki.php +++ b/main/inc/lib/fckeditor/toolbars/extended/wiki.php @@ -8,6 +8,7 @@ // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options //NOTE: Does not include Replace because it is redundant, being in the same tab to Find + //TODO: DocProps, asciimath don't run ok here. // Hide/show SpellCheck buttom diff --git a/main/inc/lib/fckeditor/toolbars/extended/wiki_feedback.php b/main/inc/lib/fckeditor/toolbars/extended/wiki_feedback.php index ede7a9c6b6..1bd251a237 100755 --- a/main/inc/lib/fckeditor/toolbars/extended/wiki_feedback.php +++ b/main/inc/lib/fckeditor/toolbars/extended/wiki_feedback.php @@ -7,6 +7,17 @@ // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options +//NOTE: Does not include Replace because it is redundant, being in the same tab to Find. + +//TODO: DocProps, asciimath don't run ok here. + +// Hide/show SpellCheck buttom +if ((api_get_setting('allow_spellcheck') == 'true')) { + $VSpellCheck='SpellCheck'; +} +else{ + $VSpellCheck=''; +} // This is the visible toolbar set when the editor has "normal" size. $config['ToolbarSets']['Normal'] = array( array('Link','Unlink','Bold','Italic','TextColor','BGColor','mimetex') @@ -15,21 +26,21 @@ $config['ToolbarSets']['Normal'] = array( // This is the visible toolbar set when the editor is maximized. // If it has not been defined, then the toolbar set for the "normal" size is used. $config['ToolbarSets']['Maximized'] = array( - array('FitWindow','DocProps','-','Save','NewPage','Preview','-','Templates'), - array('Cut','Copy','Paste','PasteText','PasteWord','-','Print'), - array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'), - array('Link','Unlink','Anchor','Wikilink','Glossary'), - '/', - array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'), - array('OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'), - array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'), - array('Rule','SpecialChar','PageBreak'), - array('mimetex','asciimath','Image','imgmapPopup','Flash','MP3','EmbedMovies','flvPlayer','YouTube','googlemaps','Smiley'), - '/', - array('Style','FontFormat','FontName','FontSize'), - array('TextColor','BGColor'), - array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp'), - array('ShowBlocks','Source') + array('Save','NewPage','Templates','-','Preview','Print'), + array('Cut','Copy','Paste','PasteText','PasteWord'), + array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'), + array('Link','Unlink','Anchor','Glossary'), + array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'), +'/', + array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'), + array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'), + array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'), + array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'), + array($VSpellCheck), + array('Style','FontFormat','FontName','FontSize'), + array('PageBreak','ShowBlocks','Source'), + array('FitWindow') + ); // Sets whether the toolbar can be collapsed/expanded or not. diff --git a/main/inc/lib/fckeditor/toolbars/extended/wiki_student.php b/main/inc/lib/fckeditor/toolbars/extended/wiki_student.php index 69ff2a8563..e7077954c3 100755 --- a/main/inc/lib/fckeditor/toolbars/extended/wiki_student.php +++ b/main/inc/lib/fckeditor/toolbars/extended/wiki_student.php @@ -7,36 +7,48 @@ // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options +//NOTE: Does not include Replace because it is redundant, being in the same tab to Find. +//NOTE: ONLY FOR TEACHERS: source, insert html + +//TODO: DocProps, asciimath don't run ok here. + +// Hide/show SpellCheck buttom +if ((api_get_setting('allow_spellcheck') == 'true')) { + $VSpellCheck='SpellCheck'; +} +else{ + $VSpellCheck=''; +} + // This is the visible toolbar set when the editor has "normal" size. $config['ToolbarSets']['Normal'] = array( - array('FitWindow','Save','NewPage','PageBreak','Preview','-','PasteText','-','Undo','Redo','-','SelectAll','-','Find'), - array('Wikilink','Link','Unlink','Anchor'), - array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex','asciimath'), - array('Table','Rule','Smiley','SpecialChar','googlemaps'), - array('FontFormat','FontName','FontSize'), - array('Bold','Italic','Underline'), - array('Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'), - array('ShowBlocks') +array('Save','NewPage','Templates','-','PasteText'), + array('Undo','Redo'), + array('Wikilink','Link','Image','flvPlayer','Table','mimetex'), + array('UnorderedList','OrderedList','Rule'), + array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'), + array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor'), + array('FitWindow') ); // This is the visible toolbar set when the editor is maximized. // If it has not been defined, then the toolbar set for the "normal" size is used. $config['ToolbarSets']['Maximized'] = array( - array('FitWindow','DocProps','-','Save','NewPage','Preview','-','Templates'), + array('Save','NewPage','-','Preview','Print'), array('Cut','Copy','Paste','PasteText','PasteWord'), - array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'), - array('Link','Unlink','Anchor','Wikilink','Glossary'), - '/', - array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'), - array('OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'), - array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'), - array('Rule','SpecialChar','PageBreak'), - array('mimetex','asciimath','Image','imgmapPopup','Flash','MP3','EmbedMovies','flvPlayer','googlemaps','Smiley'), - '/', - array('Style','FontFormat','FontName','FontSize'), - array('TextColor','BGColor'), - array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp'), - array('ShowBlocks') + array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'), + array('Wikilink','Link','Unlink','Anchor','Glossary'), + array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','mimetex','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'), +'/', + array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'), + array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'), + array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'), + array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'), + array($VSpellCheck), + array('Style','FontFormat','FontName','FontSize'), + array('PageBreak','ShowBlocks'), + array('FitWindow') + ); // Sets whether the toolbar can be collapsed/expanded or not. diff --git a/main/inc/lib/fckeditor/toolbars/extended/wiki_task.php b/main/inc/lib/fckeditor/toolbars/extended/wiki_task.php index 97e7e13e75..dd84970cf3 100755 --- a/main/inc/lib/fckeditor/toolbars/extended/wiki_task.php +++ b/main/inc/lib/fckeditor/toolbars/extended/wiki_task.php @@ -7,35 +7,50 @@ // For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options +//NOTE: Does not include Replace because it is redundant, being in the same tab to Find. + +//TODO: DocProps, asciimath don't run ok here. + +// Hide/show SpellCheck buttom +if ((api_get_setting('allow_spellcheck') == 'true')) { + $VSpellCheck='SpellCheck'; +} +else{ + $VSpellCheck=''; +} + // This is the visible toolbar set when the editor has "normal" size. $config['ToolbarSets']['Normal'] = array( - array('FitWindow','-','PasteWord','-','Undo','Redo'), - array('Link','Unlink'), - array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'), - array('Table'), - array('Bold','Italic','Underline'), - array('JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList','-','TextColor','BGColor'), - array('Source') + array('NewPage','Templates','-','PasteText'), + array('Undo','Redo'), + array('Link','Image','flvPlayer','Table','mimetex'), + array('UnorderedList','OrderedList','Rule'), + array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'), + array('FontFormat','FontName','Bold','Italic','Underline','TextColor','BGColor'), + array('FitWindow') ); // This is the visible toolbar set when the editor is maximized. // If it has not been defined, then the toolbar set for the "normal" size is used. +// This is the visible toolbar set when the editor is maximized. +// If it has not been defined, then the toolbar set for the "normal" size is used. + $config['ToolbarSets']['Maximized'] = array( - array('FitWindow','DocProps','-','Save','NewPage','Preview','-','Templates'), - array('Cut','Copy','Paste','PasteText','PasteWord','-','Print'), - array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'), - array('Link','Unlink','Anchor','Wikilink','Glossary'), - '/', - array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'), - array('OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'), - array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'), - array('Rule','SpecialChar','PageBreak'), - array('mimetex','asciimath','Image','imgmapPopup','Flash','MP3','EmbedMovies','flvPlayer','YouTube','googlemaps','Smiley'), - '/', - array('Style','FontFormat','FontName','FontSize'), - array('TextColor','BGColor'), - array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp'), - array('ShowBlocks','Source') + array('NewPage','Templates','-','Preview','Print'), + array('Cut','Copy','Paste','PasteText','PasteWord'), + array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'), + array('Link','Unlink','Anchor','Glossary'), + array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'), +'/', + array('Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'), + array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'), + array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'), + array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'), + array($VSpellCheck), + array('Style','FontFormat','FontName','FontSize'), + array('PageBreak','ShowBlocks','Source'), + array('FitWindow') + ); // Sets whether the toolbar can be collapsed/expanded or not.