From 3233dae06eedc559430a20e0d9c549b4cd9eeb62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Ra=C3=B1a?= Date: Wed, 11 Feb 2009 19:39:40 +0100 Subject: [PATCH] [svn r18440] configure agenda buttons bar --- main/calendar/agenda.inc.php | 15 ++++++++++++--- main/calendar/agenda.php | 9 +++------ main/inc/lib/fckeditor/myconfig.js | 26 ++++++++++++++++++++++---- 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/main/calendar/agenda.inc.php b/main/calendar/agenda.inc.php index ae49c4575d..abbda1b265 100644 --- a/main/calendar/agenda.inc.php +++ b/main/calendar/agenda.inc.php @@ -1,4 +1,4 @@ -ToolbarSet = 'Agenda'; $oFCKeditor->Width = '100%'; - $oFCKeditor->Height = '175'; + $oFCKeditor->Height = '200'; + + if(!api_is_allowed_to_edit()) + { + $oFCKeditor->ToolbarSet = 'Agenda_Student'; + } + else + { + $oFCKeditor->ToolbarSet = 'Agenda'; + } + $oFCKeditor->Value = $content; $return = $oFCKeditor->CreateHtml(); diff --git a/main/calendar/agenda.php b/main/calendar/agenda.php index a829e9eab9..fedf8a37f8 100644 --- a/main/calendar/agenda.php +++ b/main/calendar/agenda.php @@ -1,4 +1,4 @@ - '; } -$fck_attribute['Width'] = '600'; -$fck_attribute['Height'] = '400'; -$fck_attribute['ToolbarSet'] = 'Middle'; - +//TODO: meet this fckeditor code and agenda.inc.php fckeditor code $fck_attribute['Config']['CreateDocumentDir'] = api_get_path('WEB_COURSE_PATH').$_course['path'].'/document/'; $fck_attribute['Config']['CreateDocumentWebDir'] = api_get_path('WEB_COURSE_PATH').$_course['path'].'/document/'; @@ -312,7 +309,7 @@ if(isset($_SESSION['_course']) && $_SESSION['_course']['path']!='') } else { - $upload_path = api_get_path(REL_PATH).'main/default_course_document/'; + $upload_path = api_get_path(REL_PATH).'main/default_course_document/'; //TODO: check if this is correct or better main/upload/num_user/my_files } // THE RIGHT PART diff --git a/main/inc/lib/fckeditor/myconfig.js b/main/inc/lib/fckeditor/myconfig.js index d6d8140b0a..e4cb704f67 100644 --- a/main/inc/lib/fckeditor/myconfig.js +++ b/main/inc/lib/fckeditor/myconfig.js @@ -42,10 +42,6 @@ FCKConfig.ToolbarSets["Middle"] = [ ['FontSize','Bold','Italic','Underline','StrikeThrough','TextColor','-','OrderedList','UnorderedList','-','Rule','Link','Unlink','Table','-','Image','Flash','Source'] ] ; -FCKConfig.ToolbarSets["Agenda"] = [ - ['FontSize','Bold','Italic','Underline','StrikeThrough','TextColor','-','OrderedList','UnorderedList','-','Rule','Link','Unlink','Table','-','Image'] -] ; - FCKConfig.ToolbarSets["Small"] = [ ['Bold','Italic','Underline','StrikeThrough','Link','Unlink','Image','Flash','OrderedList','UnorderedList','Table'] ] ; @@ -105,6 +101,28 @@ FCKConfig.ToolbarSets["Introduction"] = [ ['Source'] ] ; +FCKConfig.ToolbarSets["Agenda"] = [ + ['FitWindow','-','PasteWord','-','Undo','Redo','RemoveFormat'], + ['Link','Unlink'], + ['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], + ['Table','Rule','SpecialChar','googlemaps'], + ['FontName','FontSize'], + ['Bold','Italic','Underline','StrikeThrough'], + ['OrderedList','UnorderedList','-','TextColor','BGColor'], + ['Source'] +] ; + +FCKConfig.ToolbarSets["Agenda_Student"] = [ + ['FitWindow','-','PasteWord','-','Undo','Redo','RemoveFormat'], + ['Link','Unlink'], + ['Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3'], + ['Table','Rule','SpecialChar','googlemaps'], + ['FontName','FontSize'], + ['Bold','Italic','Underline','StrikeThrough'], + ['OrderedList','UnorderedList','-','TextColor','BGColor'], + ['ShowBlocks'] +] ; + FCKConfig.ToolbarSets["CourseDescription"] = [ ['NewPage','Templates','Save','PageBreak','Preview','FitWindow','-','PasteText','PasteWord','-','Undo','Redo','-','SelectAll','RemoveFormat','-','Find'], ['Link','Unlink','Anchor'],