[svn r21821] FS#2867 - The FCKEditor: Moving toolbar related data, myconfig.js ---> myconfig.php.

skala
Ivan Tcholakov 17 years ago
parent c93aaf4c29
commit e52d0451c1
  1. 2
      main/inc/lib/fckeditor/fckeditor.php
  2. 6
      main/inc/lib/fckeditor/myconfig.js
  3. 491
      main/inc/lib/fckeditor/myconfig.php

@ -197,7 +197,7 @@ class FCKeditor
$config = $this->get_default_configuration();
$this->read_configuration($config);
if ((api_is_allowed_to_edit() || api_is_platform_admin()) && ($this->Config['BlockCopyPaste'] === true)) {
if ((api_is_allowed_to_edit() || api_is_platform_admin()) && isset($this->Config['BlockCopyPaste'])) {
$this->Config['BlockCopyPaste'] = false;
}

@ -54,6 +54,10 @@ FCKConfig.SmileyWindowHeight = 250 ;
* Editor's toolbar definitions.
*/
/*
// TODO: These definitions have been moved in myconfig.php, they will be removed from here.
FCKConfig.ToolbarSets["Full"] = [
['FitWindow','PasteWord','Link','Unlink','Anchor','-','Image','flvPlayer','Flash','EmbedMovies','MP3','YouTube','Table','Rule','-','Subscript', 'Superscript','-','OrderedList','UnorderedList','Outdent','Indent','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],'/',['FontFormat','Style','FontName','FontSize','Bold','Italic','Underline','StrikeThrough','TextColor', 'BGColor','-','Source']
] ;
@ -480,6 +484,8 @@ FCKConfig.ToolbarSets["Gradebook"] = [
['Source']
] ;
*/
/*
* Toolbar drop-down lists customizations.
*/

@ -33,71 +33,430 @@
* Editor's toolbar definitions.
*/
/*
* Platform administrator's tools
*/
$config['ToolbarSets']['Full'] = array(
array('FitWindow','PasteWord','Link','Unlink','Anchor','-','Image','flvPlayer','Flash','EmbedMovies','MP3','YouTube','Table','Rule','-','Subscript', 'Superscript','-','OrderedList','UnorderedList','Outdent','Indent','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),'/',
array('FontFormat','Style','FontName','FontSize','Bold','Italic','Underline','StrikeThrough','TextColor', 'BGColor','-','Source')
);
$config['ToolbarSets']['Middle'] = array(
array('FontSize','Bold','Italic','Underline','StrikeThrough','TextColor','-','OrderedList','UnorderedList','-','Rule','Link','Unlink','Table','-','Image','Flash','Source')
);
$config['ToolbarSets']['Small'] = array(
array('Bold','Italic','Underline','StrikeThrough','Link','Unlink','Image','Flash','OrderedList','UnorderedList','Table')
);//used by test ? exercice/feedback.php
////
///// Admin tools /////
// Edit platform home page
$config['ToolbarSets']['EditHomePage'] = array(
array('NewPage','Templates','Save','Print','PageBreak','FitWindow','-','PasteWord','-','Undo','Redo','-','SelectAll','-','Find'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','Smiley','SpecialChar','googlemaps'),
array('FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
array('Source')
);
// Insert or Edit a page link in the platform home page
$config['ToolbarSets']['LinksHomePage'] = array(
array('NewPage','Templates','Save','Print','PageBreak','FitWindow','-','PasteWord','-','Undo','Redo','-','SelectAll','-','Find'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','Smiley','SpecialChar','googlemaps'),
array('FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
array('Source')
);
// System Announcements
$config['ToolbarSets']['SystemAnnouncements'] = array(
array('Save','FitWindow','PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','SpecialChar'),
array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'),
'/',
array('Style','FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','JustifyRight')
);
// Global Agenda
$config['ToolbarSets']['GlobalAgenda'] = array(
array('FitWindow','-','PasteWord','-','Undo','Redo'),
array('Link','Unlink'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','SpecialChar','googlemaps'),
array('FontName','FontSize'),
array('Bold','Italic','Underline'),
array('OrderedList','UnorderedList','-','TextColor','BGColor'),
array('Source')
);
// Admin Templates
$config['ToolbarSets']['AdminTemplates'] = array(
array('NewPage','Templates','Save','Print','PageBreak','FitWindow','-','PasteWord','-','Undo','Redo','-','SelectAll','-','Find'),
array('Bold','Italic','Underline'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','Smiley','SpecialChar','googlemaps'),
array('FontFormat','FontName','FontSize'),
array('JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
array('Source')
);
// FAQ
$config['ToolbarSets']['FAQ'] = array(
array('Save','Preview','Source')
);
///// users tools /////
// My Profile (optional fields)
$config['ToolbarSets']['Profil'] = array(
array('FitWindow','-','PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','Smiley'),
'/',
array('FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList','-','TextColor','BGColor'),
array('Source')
);
// Messages
$config['ToolbarSets']['Messages'] = array(
array('FitWindow','Undo','Redo'),
array('Link','Unlink'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','Smiley','googlemaps'),
array('Bold','Italic','Underline'),
array('OrderedList','UnorderedList','-','Blockquote','-','TextColor'),
array('ShowBlocks')
);
///// Course tools /////
// Course introduction
$config['ToolbarSets']['Introduction'] = array(
array('NewPage','FitWindow','-','PasteWord','-','Undo','Redo','-','SelectAll'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','SpecialChar'),
array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'),
'/',
array('Style','FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','JustifyRight')
);
// Agenda
$config['ToolbarSets']['Agenda'] = array(
array('Save','FitWindow','PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','SpecialChar'),
'/',
array('Style','FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
array('Source')
);
$config['ToolbarSets']['Agenda_Student'] = array(
array('Save','FitWindow','PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','SpecialChar'),
'/',
array('FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
array('ShowBlocks')
);
// Announcements
$config['ToolbarSets']['Announcements'] = array(
array('Save','FitWindow','PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','SpecialChar'),
array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'),
'/',
array('Style','FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','JustifyRight')
);
$config['ToolbarSets']['Announcements_Student'] = array(
array('Save','FitWindow','PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','SpecialChar'),
array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
'/',
array('Style','FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','JustifyRight'),
array('ShowBlocks')
);
// Blog
$config['ToolbarSets']['Blog'] = array(
array('FitWindow','-','PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','googlemaps'),
array('FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList','-','TextColor','BGColor'),
array('Source')
);
$config['ToolbarSets']['Blog_Student'] = array(
array('FitWindow','-','PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','googlemaps'),
array('FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList','-','TextColor','BGColor'),
array('ShowBlocks')
);
$config['ToolbarSets']['BlogComment'] = array(
array('FitWindow','-','PasteWord','-','Undo','Redo'),
array('Link','Unlink'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','googlemaps'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList','-','TextColor','BGColor'),
array('Source')
);
$config['ToolbarSets']['BlogComment_Student'] = array(
array('FitWindow','-','PasteWord','-','Undo','Redo'),
array('Link','Unlink'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','googlemaps'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList','-','TextColor','BGColor'),
array('ShowBlocks')
);
// Course Description
$config['ToolbarSets']['CourseDescription'] = array(
array('NewPage','Save','FitWindow','PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','SpecialChar'),
array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','Source'),
'/',
array('Style','FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','JustifyRight')
);
// Documents
$config['ToolbarSets']['Documents'] = array(
array('Save','FitWindow','PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','SpecialChar'),
array('Outdent','Indent','-','TextColor','BGColor','-','OrderedList','UnorderedList','-','Source'),
'/',
array('Style','FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','JustifyRight')
);
$config['ToolbarSets']['Documents_Student'] = array(
array('Save','FitWindow','PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','SpecialChar'),
array('Outdent','Indent','-','TextColor','BGColor','-','OrderedList','UnorderedList'),
'/',
array('Style','FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','JustifyRight'),
array('ShowBlocks')
);
// Forum
$config['ToolbarSets']['ForumLight'] = array(
array('Bold','Italic','Underline','StrikeThrough')
);
$config['ToolbarSets']['Forum'] = array(
array('Save','FitWindow','PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','SpecialChar'),
array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','Source'),
'/',
array('Style','FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','JustifyRight')
);
$config['ToolbarSets']['Forum_Student'] = array(
array('Save','FitWindow','PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','SpecialChar'),
array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
'/',
array('Style','FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','JustifyRight'),
array('ShowBlocks')
);
// Glossary
$config['ToolbarSets']['Glossary'] = array(
array('Save','FitWindow','PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','SpecialChar'),
array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'),
'/',
array('Style','FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','JustifyRight')
);
// Learning Path
$config['ToolbarSets']['LearnPath'] = array(
array('PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','Table','SpecialChar'),
array('Outdent','Indent','TextColor','BGColor','-','OrderedList','UnorderedList','JustifyLeft','JustifyCenter','JustifyRight'),
'/',
array('Style','FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline','-','Source'),
);//save, FitWindow don't run well here
$config['ToolbarSets']['CommentLearningPath'] = array(
array('Link','Unlink','Bold','Italic','TextColor','BGColor','Source')
);
// Notebook
$config['ToolbarSets']['Notebook'] = array(
array('Save','FitWindow','-','PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','SpecialChar'),
array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'),
'/',
array('Style','FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','JustifyRight')
);
$config['ToolbarSets']['Notebook_Student'] = array(
array('Save','FitWindow','-','PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','SpecialChar'),
array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
'/',
array('Style','FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','JustifyRight'),
array('ShowBlocks')
);
// Survey
$config['ToolbarSets']['Survey'] = array(
array('FitWindow'),
array('Link','Unlink'),
array('Image'),
array('Table'),
array('FontSize'),
array('Bold','Italic'),
array('OrderedList','UnorderedList','-','TextColor'),
array('Source')
);
// Test
$config['ToolbarSets']['TestDescription'] = array(
array('FitWindow','-','PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','SpecialChar'),
array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'),
'/',
array('Style','FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','JustifyRight')
);
$config['ToolbarSets']['QuestionDescription'] = array(
array('FitWindow','-','PasteWord','-','Undo','Redo'),
array('Link','Unlink'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','SpecialChar'),
array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'),
'/',
array('Style','FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('JustifyLeft','JustifyCenter','JustifyRight')
);
$config['ToolbarSets']['Answer'] = array(
array('FitWindow','Bold','Image','Link','PasteWord','MP3','Table','Subscript','Superscript','Source')
);
$config['ToolbarSets']['FreeAnswer'] = array(
array('FitWindow','Bold','Image','Link','PasteWord','MP3','Table','Subscript','Superscript','ShowBlocks')
);
$config['ToolbarSets']['CommentAnswers'] = array(
array('Link','Unlink','Bold','Italic','TextColor','BGColor')
);
// Wiki
$config['ToolbarSets']['Wiki'] = array(
array('NewPage','Templates','Save','PageBreak','Preview','FitWindow','-','PasteText','-','Undo','Redo','-','SelectAll','-','Find'),
array('Wikilink','Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','Smiley','SpecialChar','googlemaps'),
array('FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
array('Source')
);
// Edit platform home page.
$config['ToolbarSets']['EditHomePage'] =
array(
array(
'NewPage', 'Templates', 'Save', 'Print', 'PageBreak', 'FitWindow', '-', 'PasteWord', '-', 'Undo', 'Redo', '-', 'SelectAll', '-', 'Find'
),
array(
'Link', 'Unlink', 'Anchor'
),
array(
'Image', 'flvPlayer', 'Flash', 'EmbedMovies', 'YouTube', 'MP3'
),
array(
'Table', 'Smiley', 'SpecialChar', 'googlemaps'
),
array(
'FontFormat', 'FontName', 'FontSize'
),
array(
'Bold', 'Italic', 'Underline'
),
array(
'JustifyLeft', 'JustifyCenter', 'JustifyRight', '-', 'OrderedList', 'UnorderedList', '-', 'Outdent', 'Indent', '-', 'TextColor', 'BGColor'
),
array(
'Source'
)
);
// These are temporary settings for experimental purposes.
$config['ToolbarCanCollapse']['EditHomePage'] = true; // true (default), false
$config['ToolbarStartExpanded']['EditHomePage'] = true; // true (default) , false
$config['ToolbarLocation']['EditHomePage'] = 'In'; // 'In' (default) , 'None' , 'Out:[TargetId]' , 'Out:[TargetWindow]([TargetId])'
$config['BlockCopyPaste']['EditHomePage'] = false; // true , false (default)
// Insert or Edit a page link in the platform home page.
$config['ToolbarSets']['LinksHomePage'] =
array(
array(
'NewPage', 'Templates', 'Save', 'Print', 'PageBreak', 'FitWindow', '-', 'PasteWord', '-', 'Undo', 'Redo', '-', 'SelectAll', '-', 'Find'
),
array(
'Link', 'Unlink', 'Anchor'
),
array(
'Image', 'flvPlayer', 'Flash', 'EmbedMovies', 'YouTube', 'MP3'
),
array(
'Table', 'Smiley', 'SpecialChar', 'googlemaps'
),
array(
'FontFormat', 'FontName', 'FontSize'
),
array(
'Bold', 'Italic', 'Underline'
),
array(
'JustifyLeft', 'JustifyCenter', 'JustifyRight', '-', 'OrderedList', 'UnorderedList', '-', 'Outdent', 'Indent', '-', 'TextColor', 'BGColor'
),
array(
'Source'
)
);
$config['ToolbarSets']['Wiki_Student'] = array(
array('NewPage','Save','PageBreak','Preview','FitWindow','-','PasteText','-','Undo','Redo','-','SelectAll','-','Find'),
array('Wikilink','Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','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')
);
// Gradebook
$config['ToolbarSets']['Gradebook'] = array(
array('Save','FitWindow','-','PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'),
array('Table','SpecialChar'),
array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
'/',
array('Style','FontFormat','FontName','FontSize'),
array('Bold','Italic','Underline'),
array('Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
array('Source')
);

Loading…
Cancel
Save