[svn r21833] FS#2867 - The FCKEditor, configuration data: Moving configuration data about blocking copy/paste to correspondent php toolbar definition files. For testing purposes moved items have been set to activate blocking copy/paste for learners. Cleaning the configuration file myconfig.js

skala
Ivan Tcholakov 17 years ago
parent a8591264e8
commit 5f07ec4e5b
  1. 480
      main/inc/lib/fckeditor/myconfig.js
  2. 1
      main/inc/lib/fckeditor/toolbars/blog_comment_student.php
  3. 1
      main/inc/lib/fckeditor/toolbars/blog_student.php
  4. 1
      main/inc/lib/fckeditor/toolbars/documents_student.php
  5. 1
      main/inc/lib/fckeditor/toolbars/forum_student.php
  6. 1
      main/inc/lib/fckeditor/toolbars/free_answer.php
  7. 1
      main/inc/lib/fckeditor/toolbars/wiki_student.php

@ -50,442 +50,6 @@ FCKConfig.SmileyWindowWidth = 450 ;
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']
] ;
FCKConfig.ToolbarSets["Middle"] = [
['FontSize','Bold','Italic','Underline','StrikeThrough','TextColor','-','OrderedList','UnorderedList','-','Rule','Link','Unlink','Table','-','Image','Flash','Source']
] ;
FCKConfig.ToolbarSets["Small"] = [
['Bold','Italic','Underline','StrikeThrough','Link','Unlink','Image','Flash','OrderedList','UnorderedList','Table']
] ;//used by test ? exercice/feedback.php
////
///// admin tools /////
//Edit platform home page
FCKConfig.ToolbarSets["EditHomePage"] = [
['NewPage','Templates','Save','Print','PageBreak','FitWindow','-','PasteWord','-','Undo','Redo','-','SelectAll','-','Find'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','Smiley','SpecialChar','googlemaps'],
['FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'],
['Source']
] ;
//Insert or Edit a page link in platform home page
FCKConfig.ToolbarSets["LinksHomePage"] = [
['NewPage','Templates','Save','Print','PageBreak','FitWindow','-','PasteWord','-','Undo','Redo','-','SelectAll','-','Find'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','Smiley','SpecialChar','googlemaps'],
['FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'],
['Source']
] ;
//System Announcements
FCKConfig.ToolbarSets["SystemAnnouncements"] = [
['Save','FitWindow','PasteWord','-','Undo','Redo'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','SpecialChar'],
['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'],
'/',
['Style','FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','JustifyRight']
] ;
//Global Agenda
FCKConfig.ToolbarSets["GlobalAgenda"] = [
['FitWindow','-','PasteWord','-','Undo','Redo'],
['Link','Unlink'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','SpecialChar','googlemaps'],
['FontName','FontSize'],
['Bold','Italic','Underline'],
['OrderedList','UnorderedList','-','TextColor','BGColor'],
['Source']
] ;
//Admin Templates
FCKConfig.ToolbarSets["AdminTemplates"] = [
['NewPage','Templates','Save','Print','PageBreak','FitWindow','-','PasteWord','-','Undo','Redo','-','SelectAll','-','Find'],
['Bold','Italic','Underline'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','Smiley','SpecialChar','googlemaps'],
['FontFormat','FontName','FontSize'],
['JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'],
['Source']
] ;
//FAQ
FCKConfig.ToolbarSets["FAQ"] = [
['Save','Preview','Source']
];
///// users tools /////
//My Profile (Optional fields)
FCKConfig.ToolbarSets["Profil"] = [
['FitWindow','-','PasteWord','-','Undo','Redo'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','Smiley'],
'/',
['FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList','-','TextColor','BGColor'],
['Source']
] ;
//Messages
FCKConfig.ToolbarSets["Messages"] = [
['FitWindow','Undo','Redo'],
['Link','Unlink'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','Smiley','googlemaps'],
['Bold','Italic','Underline'],
['OrderedList','UnorderedList','-','Blockquote','-','TextColor'],
['ShowBlocks']
] ;
///// course tools /////
//Course introduction
FCKConfig.ToolbarSets["Introduction"] = [
['NewPage','FitWindow','-','PasteWord','-','Undo','Redo','-','SelectAll'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','SpecialChar'],
['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'],
'/',
['Style','FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','JustifyRight']
] ;
//Agenda
FCKConfig.ToolbarSets["Agenda"] = [
['Save','FitWindow','PasteWord','-','Undo','Redo'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','SpecialChar'],
'/',
['Style','FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'],
['Source']
] ;
FCKConfig.ToolbarSets["Agenda_Student"] = [
['Save','FitWindow','PasteWord','-','Undo','Redo'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','SpecialChar'],
'/',
['FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'],
['ShowBlocks']
] ;
//Announcements
FCKConfig.ToolbarSets["Announcements"] = [
['Save','FitWindow','PasteWord','-','Undo','Redo'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','SpecialChar'],
['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'],
'/',
['Style','FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','JustifyRight']
] ;
FCKConfig.ToolbarSets["Announcements_Student"] = [
['Save','FitWindow','PasteWord','-','Undo','Redo'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','SpecialChar'],
['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'],
'/',
['Style','FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','JustifyRight'],
['ShowBlocks']
] ;
//Blog
FCKConfig.ToolbarSets["Blog"] = [
['FitWindow','-','PasteWord','-','Undo','Redo'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','googlemaps'],
['FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList','-','TextColor','BGColor'],
['Source']
] ;
FCKConfig.ToolbarSets["Blog_Student"] = [
['FitWindow','-','PasteWord','-','Undo','Redo'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','googlemaps'],
['FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList','-','TextColor','BGColor'],
['ShowBlocks']
] ;
FCKConfig.ToolbarSets["BlogComment"] = [
['FitWindow','-','PasteWord','-','Undo','Redo'],
['Link','Unlink'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','googlemaps'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList','-','TextColor','BGColor'],
['Source']
] ;
FCKConfig.ToolbarSets["BlogComment_Student"] = [
['FitWindow','-','PasteWord','-','Undo','Redo'],
['Link','Unlink'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','googlemaps'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList','-','TextColor','BGColor'],
['ShowBlocks']
] ;
//Course Description
FCKConfig.ToolbarSets["CourseDescription"] = [
['NewPage','Save','FitWindow','PasteWord','-','Undo','Redo'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','SpecialChar'],
['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','Source'],
'/',
['Style','FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','JustifyRight']
] ;
//Documents
FCKConfig.ToolbarSets["Documents"] = [
['Save','FitWindow','PasteWord','-','Undo','Redo'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','SpecialChar'],
['Outdent','Indent','-','TextColor','BGColor','-','OrderedList','UnorderedList','-','Source'],
'/',
['Style','FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','JustifyRight']
] ;
FCKConfig.ToolbarSets["Documents_Student"] = [
['Save','FitWindow','PasteWord','-','Undo','Redo'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','SpecialChar'],
['Outdent','Indent','-','TextColor','BGColor','-','OrderedList','UnorderedList'],
'/',
['Style','FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','JustifyRight'],
['ShowBlocks']
] ;
//Forum
FCKConfig.ToolbarSets["ForumLight"] = [
['Bold','Italic','Underline','StrikeThrough']
] ;
FCKConfig.ToolbarSets["Forum"] = [
['Save','FitWindow','PasteWord','-','Undo','Redo'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','SpecialChar'],
['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','Source'],
'/',
['Style','FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','JustifyRight']
] ;
FCKConfig.ToolbarSets["Forum_Student"] = [
['Save','FitWindow','PasteWord','-','Undo','Redo'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','SpecialChar'],
['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'],
'/',
['Style','FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','JustifyRight'],
['ShowBlocks']
] ;
//Glossary
FCKConfig.ToolbarSets["Glossary"] = [
['Save','FitWindow','PasteWord','-','Undo','Redo'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','SpecialChar'],
['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'],
'/',
['Style','FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','JustifyRight']
] ;
//Learning Path
FCKConfig.ToolbarSets["LearnPath"] = [
['PasteWord','-','Undo','Redo'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','Table','SpecialChar'],
['Outdent','Indent','TextColor','BGColor','-','OrderedList','UnorderedList','JustifyLeft','JustifyCenter','JustifyRight'],
'/',
['Style','FontFormat','FontName','FontSize'],
['Bold','Italic','Underline','-','Source'],
] ;//save, FitWindow don't run well here
FCKConfig.ToolbarSets["CommentLearningPath"] = [
['Link','Unlink','Bold','Italic','TextColor','BGColor','Source']
] ;
//Notebook
FCKConfig.ToolbarSets["Notebook"] = [
['Save','FitWindow','-','PasteWord','-','Undo','Redo'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','SpecialChar'],
['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'],
'/',
['Style','FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','JustifyRight']
] ;
FCKConfig.ToolbarSets["Notebook_Student"] = [
['Save','FitWindow','-','PasteWord','-','Undo','Redo'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','SpecialChar'],
['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'],
'/',
['Style','FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','JustifyRight'],
['ShowBlocks']
] ;
//Survey
FCKConfig.ToolbarSets["Survey"] = [
['FitWindow'],
['Link','Unlink'],
['Image'],
['Table'],
['FontSize'],
['Bold','Italic'],
['OrderedList','UnorderedList','-','TextColor'],
['Source']
] ;
//Test
FCKConfig.ToolbarSets["TestDescription"] = [
['FitWindow','-','PasteWord','-','Undo','Redo'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','SpecialChar'],
['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'],
'/',
['Style','FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','JustifyRight']
] ;
FCKConfig.ToolbarSets["QuestionDescription"] = [
['FitWindow','-','PasteWord','-','Undo','Redo'],
['Link','Unlink'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','SpecialChar'],
['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'],
'/',
['Style','FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['JustifyLeft','JustifyCenter','JustifyRight']
] ;
FCKConfig.ToolbarSets["Answer"] = [
['FitWindow','Bold','Image','Link','PasteWord','MP3','Table','Subscript','Superscript','Source']
] ;
FCKConfig.ToolbarSets["FreeAnswer"] = [
['FitWindow','Bold','Image','Link','PasteWord','MP3','Table','Subscript','Superscript','ShowBlocks']
] ;
FCKConfig.ToolbarSets["CommentAnswers"] = [
['Link','Unlink','Bold','Italic','TextColor','BGColor']
] ;
//Wiki
FCKConfig.ToolbarSets["Wiki"] = [
['NewPage','Templates','Save','PageBreak','Preview','FitWindow','-','PasteText','-','Undo','Redo','-','SelectAll','-','Find'],
['Wikilink','Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','Smiley','SpecialChar','googlemaps'],
['FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'],
['Source']
] ;
FCKConfig.ToolbarSets["Wiki_Student"] = [
['NewPage','Save','PageBreak','Preview','FitWindow','-','PasteText','-','Undo','Redo','-','SelectAll','-','Find'],
['Wikilink','Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','Smiley','SpecialChar','googlemaps'],
['FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'],
['ShowBlocks']
] ;
//Gradebook
FCKConfig.ToolbarSets["Gradebook"] = [
['Save','FitWindow','-','PasteWord','-','Undo','Redo'],
['Link','Unlink','Anchor'],
['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'],
['Table','SpecialChar'],
['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'],
'/',
['Style','FontFormat','FontName','FontSize'],
['Bold','Italic','Underline'],
['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Source']
] ;
*/
/*
* Toolbar drop-down lists customizations.
*/
@ -698,50 +262,6 @@ if (FCKConfig.PageConfig.AdvancedFileManager)
}
/*
* Blocking copy/pase - configuration.
*/
// Blocking is for learners only.
if ( !( FCKConfig.PageConfig.UserIsCourseAdmin || FCKConfig.PageConfig.UserIsPlatformAdmin ) )
{
// And blocking is for enumerated places only, which are identified through the name of the assigned toolbar set.
switch ( FCKURLParams['Toolbar'] )
{
// lock=true / unlock=false
// Add here these toolbar sets for blocking copy/paste:
// case 'Toolbar1' :
// case 'Toolbar2' :
// ...
case 'FreeAnswer' :
FCKConfig.BlockCopyPaste = false ;
break ;
case 'Documents_Student' :
FCKConfig.BlockCopyPaste = false ; //document group
break ;
case 'Blog_Student' :
FCKConfig.BlockCopyPaste = false ;
break ;
case 'BlogComment_Student' :
FCKConfig.BlockCopyPaste = false ;
break ;
case 'Forum_Student' :
FCKConfig.BlockCopyPaste = false ;
break ;
case 'Wiki_Student' :
FCKConfig.BlockCopyPaste = true ;
break ;
default :
FCKConfig.BlockCopyPaste = false ;
}
}
else
{
FCKConfig.BlockCopyPaste = false ;
}
/*
* Other settings.
*/

@ -10,3 +10,4 @@ $config['ToolbarSets']['BlogComment_Student'] = array(
array('JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList','-','TextColor','BGColor'),
array('ShowBlocks')
);
$config['BlockCopyPaste']['BlogComment_Student'] = true;

@ -11,3 +11,4 @@ $config['ToolbarSets']['Blog_Student'] = array(
array('JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList','-','TextColor','BGColor'),
array('ShowBlocks')
);
$config['BlockCopyPaste']['Blog_Student'] = true;

@ -13,3 +13,4 @@ $config['ToolbarSets']['Documents_Student'] = array(
array('JustifyLeft','JustifyCenter','JustifyRight'),
array('ShowBlocks')
);
$config['BlockCopyPaste']['Documents_Student'] = true;

@ -13,3 +13,4 @@ $config['ToolbarSets']['Forum_Student'] = array(
array('JustifyLeft','JustifyCenter','JustifyRight'),
array('ShowBlocks')
);
$config['BlockCopyPaste']['Forum_Student'] = true;

@ -4,3 +4,4 @@
$config['ToolbarSets']['FreeAnswer'] = array(
array('FitWindow','Bold','Image','Link','PasteWord','MP3','Table','Subscript','Superscript','ShowBlocks')
);
$config['BlockCopyPaste']['FreeAnswer'] = true;

@ -11,3 +11,4 @@ $config['ToolbarSets']['Wiki_Student'] = array(
array('Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
array('ShowBlocks')
);
$config['Wiki_Student']['FreeAnswer'] = true;

Loading…
Cancel
Save