From 23ab0d1f60e9783a7fc6ef62b0ad645a96a82566 Mon Sep 17 00:00:00 2001 From: Cristian Fasanando Date: Tue, 24 Mar 2009 01:47:15 +0100 Subject: [PATCH] [svn r19224] Style changes - Re-distributed buttons, configured values by default when you create a table, directed to Image Gallery when you click to image icon - see FS#3799 --- main/exercice/unique_answer.class.php | 8 +- main/forum/index.php | 2 +- main/gradebook/index.php | 6 +- .../fckeditor/editor/dialog/fck_table.html | 12 +- .../editor/plugins/ImageManager/images.php | 2 +- .../editor/plugins/ImageManager/manager.php | 13 +- main/inc/lib/fckeditor/myconfig.js | 147 +++++++++++------- main/newscorm/document.php | 2 +- main/newscorm/lp_controller.php | 2 +- 9 files changed, 116 insertions(+), 78 deletions(-) diff --git a/main/exercice/unique_answer.class.php b/main/exercice/unique_answer.class.php index 29ec0947c4..ef0e6616c3 100644 --- a/main/exercice/unique_answer.class.php +++ b/main/exercice/unique_answer.class.php @@ -65,7 +65,7 @@ class UniqueAnswer extends Question { global $fck_attribute; $fck_attribute = array(); - $fck_attribute['Width'] = '100%'; + $fck_attribute['Width'] = '60%'; $fck_attribute['Height'] = '125px'; $fck_attribute['ToolbarSet'] = 'Answer'; @@ -92,8 +92,8 @@ class UniqueAnswer extends Question { } elseif ($obj_ex->selectFeedbackType()==1) { $fck_attribute['Width'] = '250px'; $fck_attribute['Height'] = '110px'; - $comment_title = ''.get_lang('Comment').''; - $feedback_title = ''.get_lang('Scenario').''; + $comment_title = ''.get_lang('Comment').''; + $feedback_title = ''.get_lang('Scenario').''; } $html=' @@ -104,7 +104,7 @@ class UniqueAnswer extends Question {
- @@ -349,7 +349,7 @@ function Ok() @@ -373,7 +373,7 @@ function Ok() @@ -405,7 +405,7 @@ function Ok() diff --git a/main/inc/lib/fckeditor/editor/plugins/ImageManager/images.php b/main/inc/lib/fckeditor/editor/plugins/ImageManager/images.php index b4d4643720..82fdd7b607 100644 --- a/main/inc/lib/fckeditor/editor/plugins/ImageManager/images.php +++ b/main/inc/lib/fckeditor/editor/plugins/ImageManager/images.php @@ -10,7 +10,7 @@ require_once('config.inc.php'); require_once('Classes/ImageManager.php'); //default path is / -$relative = '/'; +$relative = '/images/gallery/'; $manager = new ImageManager($IMConfig); //process any file uploads diff --git a/main/inc/lib/fckeditor/editor/plugins/ImageManager/manager.php b/main/inc/lib/fckeditor/editor/plugins/ImageManager/manager.php index 9153d1bd89..a7f87ce8ca 100644 --- a/main/inc/lib/fckeditor/editor/plugins/ImageManager/manager.php +++ b/main/inc/lib/fckeditor/editor/plugins/ImageManager/manager.php @@ -34,8 +34,8 @@ var thumbdir = ""; var base_url = "getBaseURL(); ?>"; - //var base_url_alt= ""; - var base_url_alt= ""; + //var base_url_alt= ""; + var base_url_alt= ""; var server_name = ""; @@ -82,8 +82,13 @@ Directory Up Directory Up diff --git a/main/inc/lib/fckeditor/myconfig.js b/main/inc/lib/fckeditor/myconfig.js index 51b57306e6..11905647c8 100644 --- a/main/inc/lib/fckeditor/myconfig.js +++ b/main/inc/lib/fckeditor/myconfig.js @@ -138,10 +138,11 @@ FCKConfig.ToolbarSets["Introduction"] = [ ['Link','Unlink','Anchor'], ['Image','imgmapPopup','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], ['Table','CreateDiv','Rule','SpecialChar'], + ['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], '/', ['Style','FontFormat','FontName','FontSize'], ['Bold','Italic','Underline','StrikeThrough'], - ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], + ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['Source'] ] ; @@ -172,24 +173,28 @@ FCKConfig.ToolbarSets["Agenda_Student"] = [ //Announcements FCKConfig.ToolbarSets["Announcements"] = [ - ['NewPage','Preview','FitWindow','-','PasteText','-','Undo','Redo','-','SelectAll','RemoveFormat'], - ['Link','Unlink','Anchor'], - ['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], - ['Table','Rule','Smiley','SpecialChar'], - ['FontName','FontSize'], - ['Bold','Italic','Underline','StrikeThrough'], - ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','OrderedList','UnorderedList','-','TextColor','BGColor'], - ['Source'] + ['Save','Preview','FitWindow','-','PasteText','PasteWord','-','Undo','Redo','-','RemoveFormat'], + ['Link','Unlink','Anchor'], + ['Image','imgmapPopup','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], + ['Table','CreateDiv','Rule','SpecialChar'], + ['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], + '/', + ['Style','FontFormat','FontName','FontSize'], + ['Bold','Italic','Underline','StrikeThrough'], + ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], + ['Source'] ] ; FCKConfig.ToolbarSets["Announcements_Student"] = [ - ['NewPage','Preview','FitWindow','-','PasteText','-','Undo','Redo','-','SelectAll','RemoveFormat'], - ['Link','Unlink','Anchor'], - ['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], - ['Table','Rule','Smiley','SpecialChar'], - ['FontName','FontSize'], - ['Bold','Italic','Underline','StrikeThrough'], - ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','OrderedList','UnorderedList','-','TextColor','BGColor'], + ['Save','Preview','FitWindow','-','PasteText','PasteWord','-','Undo','Redo','-','RemoveFormat'], + ['Link','Unlink','Anchor'], + ['Image','imgmapPopup','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], + ['Table','CreateDiv','Rule','SpecialChar'], + ['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], + '/', + ['Style','FontFormat','FontName','FontSize'], + ['Bold','Italic','Underline','StrikeThrough'], + ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['ShowBlocks'] ] ; @@ -242,10 +247,11 @@ FCKConfig.ToolbarSets["CourseDescription"] = [ ['Link','Unlink','Anchor'], ['Image','imgmapPopup','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], ['Table','CreateDiv','Rule','SpecialChar'], + ['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], '/', ['Style','FontFormat','FontName','FontSize'], ['Bold','Italic','Underline','StrikeThrough'], - ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], + ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['Source'] ] ; @@ -255,10 +261,11 @@ FCKConfig.ToolbarSets["Documents"] = [ ['Link','Unlink','Anchor'], ['Image','imgmapPopup','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], ['Table','CreateDiv','Rule','SpecialChar'], + ['Outdent','Indent','-','TextColor','BGColor','-','OrderedList','UnorderedList'], '/', ['Style','FontFormat','FontName','FontSize'], ['Bold','Italic','Underline','StrikeThrough'], - ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], + ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['Source'] ] ; @@ -267,10 +274,11 @@ FCKConfig.ToolbarSets["Documents_Student"] = [ ['Link','Unlink','Anchor'], ['Image','imgmapPopup','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], ['Table','CreateDiv','Rule','SpecialChar'], + ['Outdent','Indent','-','TextColor','BGColor','-','OrderedList','UnorderedList'], '/', - ['FontFormat','FontName','FontSize'], + ['Style','FontFormat','FontName','FontSize'], ['Bold','Italic','Underline','StrikeThrough'], - ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], + ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['ShowBlocks'] ]; @@ -280,24 +288,28 @@ FCKConfig.ToolbarSets["ForumLight"] = [ ] ; FCKConfig.ToolbarSets["Forum"] = [ - ['NewPage','FitWindow','-','PasteWord','-','Undo','Redo','-','SelectAll','RemoveFormat','-','Find'], - ['Link','Unlink','Anchor'], - ['Image','imgmapPopup','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], - ['Table','Rule','Smiley','SpecialChar','googlemaps'], - ['FontName','FontSize'], - ['Bold','Italic','Underline','StrikeThrough'], - ['Subscript','Superscript','-','OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','-','TextColor','BGColor'], - ['Source'] -] ; + ['Save','Preview','FitWindow','-','PasteText','PasteWord','-','Undo','Redo','-','RemoveFormat'], + ['Link','Unlink','Anchor'], + ['Image','imgmapPopup','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], + ['Table','CreateDiv','Rule','SpecialChar'], + ['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], + '/', + ['Style','FontFormat','FontName','FontSize'], + ['Bold','Italic','Underline','StrikeThrough'], + ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], + ['Source'] +]; FCKConfig.ToolbarSets["Forum_Student"] = [ - ['NewPage','FitWindow','-','PasteWord','-','Undo','Redo','-','SelectAll','RemoveFormat','-','Find'], - ['Link','Unlink','Anchor'], - ['Image','imgmapPopup','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], - ['Table','Rule','Smiley','SpecialChar','googlemaps'], - ['FontName','FontSize'], - ['Bold','Italic','Underline','StrikeThrough'], - ['Subscript','Superscript','-','OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','-','TextColor','BGColor'], + ['Save','Preview','FitWindow','-','PasteText','PasteWord','-','Undo','Redo','-','RemoveFormat'], + ['Link','Unlink','Anchor'], + ['Image','imgmapPopup','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], + ['Table','CreateDiv','Rule','SpecialChar'], + ['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], + '/', + ['Style','FontFormat','FontName','FontSize'], + ['Bold','Italic','Underline','StrikeThrough'], + ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['ShowBlocks'] ] ; @@ -307,10 +319,11 @@ FCKConfig.ToolbarSets["Glossary"] = [ ['Link','Unlink','Anchor'], ['Image','imgmapPopup','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], ['Table','CreateDiv','Rule','SpecialChar'], + ['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], '/', ['Style','FontFormat','FontName','FontSize'], ['Bold','Italic','Underline','StrikeThrough'], - ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], + ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['Source'] ] ; @@ -320,10 +333,11 @@ FCKConfig.ToolbarSets["LearnPath"] = [ ['Link','Unlink','Anchor'], ['Image','imgmapPopup','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], ['Table','CreateDiv','Rule','SpecialChar'], + ['Outdent','Indent','-','TextColor','BGColor','-','OrderedList','UnorderedList'], '/', - ['FontFormat','FontName','FontSize'], + ['Style','FontFormat','FontName','FontSize'], ['Bold','Italic','Underline','StrikeThrough'], - ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], + ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['Source'] ] ;//save, FitWindow don't run well here @@ -333,24 +347,28 @@ FCKConfig.ToolbarSets["CommentLearningPath"] = [ //Notebook FCKConfig.ToolbarSets["Notebook"] = [ - ['NewPage','Save','FitWindow','-','PasteText','PasteWord','-','Undo','Redo','-','SelectAll','RemoveFormat','-','Find'], - ['Link','Unlink','Anchor'], - ['Image','imgmapPopup','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], - ['Table','Rule','SpecialChar','googlemaps'], - ['FontName','FontSize'], - ['Bold','Italic','Underline','StrikeThrough'], - ['Subscript','Superscript','-','JustifyLeft','JustifyFull','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], - ['Source'] + ['Save','Preview','FitWindow','-','PasteText','PasteWord','-','Undo','Redo','-','RemoveFormat'], + ['Link','Unlink','Anchor'], + ['Image','imgmapPopup','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], + ['Table','CreateDiv','Rule','SpecialChar'], + ['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], + '/', + ['Style','FontFormat','FontName','FontSize'], + ['Bold','Italic','Underline','StrikeThrough'], + ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], + ['Source'] ] ; FCKConfig.ToolbarSets["Notebook_Student"] = [ - ['NewPage','Save','FitWindow','-','PasteText','PasteWord','-','Undo','Redo','-','SelectAll','RemoveFormat','-','Find'], - ['Link','Unlink','Anchor'], - ['Image','imgmapPopup','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], - ['Table','Rule','SpecialChar','googlemaps'], - ['FontName','FontSize'], - ['Bold','Italic','Underline','StrikeThrough'], - ['Subscript','Superscript','-','JustifyLeft','JustifyFull','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], + ['Save','Preview','FitWindow','-','PasteText','PasteWord','-','Undo','Redo','-','RemoveFormat'], + ['Link','Unlink','Anchor'], + ['Image','imgmapPopup','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], + ['Table','CreateDiv','Rule','SpecialChar'], + ['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], + '/', + ['Style','FontFormat','FontName','FontSize'], + ['Bold','Italic','Underline','StrikeThrough'], + ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['ShowBlocks'] ] ; @@ -372,10 +390,11 @@ FCKConfig.ToolbarSets["TestDescription"] = [ ['Link','Unlink','Anchor'], ['Image','imgmapPopup','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], ['Table','CreateDiv','Rule','SpecialChar'], + ['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], '/', ['Style','FontFormat','FontName','FontSize'], ['Bold','Italic','Underline','StrikeThrough'], - ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], + ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['Source'] ] ; @@ -384,15 +403,16 @@ FCKConfig.ToolbarSets["QuestionDescription"] = [ ['Link','Unlink','Anchor'], ['Image','imgmapPopup','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], ['Table','CreateDiv','Rule','SpecialChar'], + ['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], '/', ['Style','FontFormat','FontName','FontSize'], ['Bold','Italic','Underline','StrikeThrough'], - ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], + ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['Source'] ] ; FCKConfig.ToolbarSets["Answer"] = [ - ['FitWindow','Link','Unlink','Image','flvPlayer','Table','Bold','Italic','TextColor','Source'] + ['FitWindow','Bold','Image','Link','PasteWord','MP3','Table','Subscript','Superscript','Source'] ] ; FCKConfig.ToolbarSets["CommentAnswers"] = [ @@ -422,6 +442,19 @@ FCKConfig.ToolbarSets["Wiki_Student"] = [ ['ShowBlocks'] ] ; +//Gradebook +FCKConfig.ToolbarSets["Gradebook"] = [ + ['Save','Preview','FitWindow','-','PasteText','PasteWord','-','Undo','Redo','-','RemoveFormat'], + ['Link','Unlink','Anchor'], + ['Image','imgmapPopup','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], + ['Table','CreateDiv','Rule','SpecialChar'], + ['OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'], + '/', + ['Style','FontFormat','FontName','FontSize'], + ['Bold','Italic','Underline','StrikeThrough'], + ['Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], + ['Source'] +] ; /* * Toolbar drop-down lists customizations. diff --git a/main/newscorm/document.php b/main/newscorm/document.php index 3738867265..9c984268f6 100644 --- a/main/newscorm/document.php +++ b/main/newscorm/document.php @@ -195,7 +195,7 @@ api_display_tool_title($nameTools); //TODO: check see if we need, it seems not working here $fck_attribute['Width'] = '100%'; $fck_attribute['Height'] = '400'; -$fck_attribute['ToolbarSet'] = 'Full'; +$fck_attribute['ToolbarSet'] = 'LearnPath'; // TODO: These settings to be checked when it is possible. $fck_attribute['Config']['InDocument'] = false; diff --git a/main/newscorm/lp_controller.php b/main/newscorm/lp_controller.php index 2813a3f957..56b96247bc 100644 --- a/main/newscorm/lp_controller.php +++ b/main/newscorm/lp_controller.php @@ -160,7 +160,7 @@ $_SESSION['oLP']->message = ''; //should use ->clear_message() method but doesn' // Some common default settings for the online editor. Other settings are calculated in formvalidator module. // For editing document type lp-items specific settings are set/calculated, see learnpath.class.php //TODO: check, see if we need, it seems not working here -$fck_attribute['ToolbarSet'] = 'Full'; +$fck_attribute['ToolbarSet'] = 'LearnPath'; $fck_attribute['Width'] = '100%'; $fck_attribute['Height'] = '400';
+ '.get_lang('Number').' diff --git a/main/forum/index.php b/main/forum/index.php index ce32f05288..df9879388d 100644 --- a/main/forum/index.php +++ b/main/forum/index.php @@ -153,7 +153,7 @@ $get_actions=isset($_GET['action']) ? $_GET['action'] : ''; if (api_is_allowed_to_edit(false,true)) { $fck_attribute['Width'] = '98%'; $fck_attribute['Height'] = '200'; - $fck_attribute['ToolbarSet'] = 'ForumLight'; + $fck_attribute['ToolbarSet'] = 'Forum'; handle_forum_and_forumcategories(); } diff --git a/main/gradebook/index.php b/main/gradebook/index.php index ae98be958a..ea6e125383 100755 --- a/main/gradebook/index.php +++ b/main/gradebook/index.php @@ -75,7 +75,7 @@ if ( (isset($_GET['selectcat']) && $_GET['selectcat']>0) && (isset($_SESSION['st //Introduction tool: student view $fck_attribute['Width'] = '100%'; $fck_attribute['Height'] = '300'; - $fck_attribute['ToolbarSet'] = 'Introduction'; + $fck_attribute['ToolbarSet'] = 'Gradebook'; Display::display_introduction_section(TOOL_GRADEBOOK); $fck_attribute = null; // Clearing this global variable immediatelly after it has been used. // @@ -98,7 +98,7 @@ if ( (isset($_GET['selectcat']) && $_GET['selectcat']>0) && (isset($_SESSION['st //Introduction tool: student view $fck_attribute['Width'] = '100%'; $fck_attribute['Height'] = '300'; - $fck_attribute['ToolbarSet'] = 'Introduction'; + $fck_attribute['ToolbarSet'] = 'Gradebook'; Display::display_introduction_section(TOOL_GRADEBOOK); $fck_attribute = null; // Clearing this global variable immediatelly after it has been used. // @@ -747,7 +747,7 @@ if (api_is_platform_admin() || api_is_allowed_to_create_course() && api_is_cours $fck_attribute['Width'] = '100%'; $fck_attribute['Height'] = '300'; -$fck_attribute['ToolbarSet'] = 'Introduction'; +$fck_attribute['ToolbarSet'] = 'Gradebook'; Display::display_introduction_section(TOOL_GRADEBOOK); diff --git a/main/inc/lib/fckeditor/editor/dialog/fck_table.html b/main/inc/lib/fckeditor/editor/dialog/fck_table.html index 06b91a5483..053d0423b0 100644 --- a/main/inc/lib/fckeditor/editor/dialog/fck_table.html +++ b/main/inc/lib/fckeditor/editor/dialog/fck_table.html @@ -324,14 +324,14 @@ function Ok() Rows: -  
Columns: -  
Border size: -  
Width: -     Cell spacing: -     Cell padding: -