Эх сурвалжийг харах

[svn r10479] First update of the fckeditor style (clean useless buttons) in :
- forums
- platform announcements
- Courses agenda
- Course description

Eric Marguin 18 жил өмнө
parent
commit
72c0f8c72f

+ 6 - 1
main/admin/system_announcements.php

@@ -1,5 +1,5 @@
 <?php
-// $Id: system_announcements.php 10215 2006-11-27 13:57:17Z pcool $
+// $Id: system_announcements.php 10479 2006-12-13 12:42:20Z elixir_inter $
 /*
 ==============================================================================
 	Dokeos - elearning and course management software
@@ -176,6 +176,11 @@ if ($action_todo)
 	for($i=0; $i<count($language_list['name']) ; $i++) {
 		$language_list_with_keys[$language_list['folder'][$i]] = $language_list['name'][$i];
 	}
+	
+	$fck_attribute['Width'] = '600';
+	$fck_attribute['Height'] = '400';
+	$fck_attribute['ToolbarSet'] = 'Middle';
+	
 	$form->addElement('select', 'lang',get_lang('Language'),$language_list_with_keys);
 	$form->add_html_editor('content', get_lang('Content'));
 	$form->add_timewindow('start','end',get_lang('StartTimeWindow'),get_lang('EndTimeWindow'));

+ 16 - 2
main/calendar/agenda.inc.php

@@ -1,4 +1,4 @@
-<?php //$Id: agenda.inc.php 10195 2006-11-25 15:26:00Z pcool $
+<?php //$Id: agenda.inc.php 10479 2006-12-13 12:42:20Z elixir_inter $
 /*
 ==============================================================================
 	Dokeos - elearning and course management software
@@ -2132,7 +2132,21 @@ function show_add_form($id = '')
 
 	<tr>
 		<td colspan="7">
-			<?php api_disp_html_area('content',$content,'300px'); ?><br />
+		
+			<?php 
+			require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
+			
+			$oFCKeditor = new FCKeditor('content') ;
+			$oFCKeditor->BasePath	= api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
+			$oFCKeditor->Height		= '300';
+			$oFCKeditor->Width		= '600';
+			$oFCKeditor->Value		= $content;
+			$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
+			$oFCKeditor->ToolbarSet = "Middle";
+			$return =	$oFCKeditor->CreateHtml();
+			
+			echo "<div style='margin-left: 200px'>".$return."</div>";
+ ?><br />
 		</td>
 	</tr>
 	<?php /* ADDED BY UGENT, Patrick Cool, march 2004 */ ?>

+ 4 - 2
main/calendar/agenda.php

@@ -1,4 +1,4 @@
-<?php //$Id: agenda.php 10204 2006-11-26 20:46:53Z pcool $
+<?php //$Id: agenda.php 10479 2006-12-13 12:42:20Z elixir_inter $
 /*
 ==============================================================================
 	Dokeos - elearning and course management software
@@ -271,7 +271,9 @@ if ($_GET['origin']!='learnpath')
 	echo "<td width=\"20\" background=\"../img/verticalruler.gif\">&nbsp;</td>";
 }
 	
-
+$fck_attribute['Width'] = '600';
+$fck_attribute['Height'] = '400';
+$fck_attribute['ToolbarSet'] = 'Middle';
 
 
 // THE RIGHT PART

+ 8 - 1
main/course_description/index.php

@@ -1,4 +1,4 @@
-<?php // $Id: index.php 10204 2006-11-26 20:46:53Z pcool $
+<?php // $Id: index.php 10479 2006-12-13 12:42:20Z elixir_inter $
 /*
 ==============================================================================
 	Dokeos - elearning and course management software
@@ -132,6 +132,11 @@ if (api_is_allowed_to_edit() && !is_null($description_id))
 			$default_description_titles[$description_id] = $description['title'];
 			$description_content = $description['content'];
 		}
+		
+		$fck_attribute['Width'] = '600';
+		$fck_attribute['Height'] = '400';
+		$fck_attribute['ToolbarSet'] = 'Middle';
+		
 		// Build the form
 		$form = new FormValidator('course_description');
 		$form->addElement('hidden', 'description_id');
@@ -224,7 +229,9 @@ if ($show_description_list)
 		$group[] = $cat_form->createElement('select', 'description_id', get_lang('AddCat'), $categories);
 		$group[] = $cat_form->createElement('submit', null, get_lang('Ok'));
 		$cat_form->addGroup($group, 'cat', get_lang('AddCat'), null, false);
+		
 		$cat_form->display();
+		
 	}
 	if (count($descriptions) > 0)
 	{

+ 4 - 0
main/forum/index.php

@@ -78,6 +78,10 @@ $nameTools=get_lang('Forum');
 include('forumconfig.inc.php');
 include('forumfunction.inc.php');
 
+$fck_attribute['Width'] = '600';
+$fck_attribute['Height'] = '400';
+$fck_attribute['ToolbarSet'] = 'Middle';
+
 //error_reporting(E_ALL);
 /*
 ==============================================================================

+ 4 - 0
main/forum/newthread.php

@@ -59,6 +59,10 @@
 ==============================================================================
 */
 
+$fck_attribute['Width'] = '600';
+$fck_attribute['Height'] = '400';
+$fck_attribute['ToolbarSet'] = 'Middle';
+
 /*
 -----------------------------------------------------------
 	Language Initialisation

+ 5 - 0
main/forum/reply.php

@@ -59,6 +59,11 @@
 		INIT SECTION
 ==============================================================================
 */
+
+$fck_attribute['Width'] = '600';
+$fck_attribute['Height'] = '400';
+$fck_attribute['ToolbarSet'] = 'Middle';
+
 /*
 -----------------------------------------------------------
 	Language Initialisation

+ 6 - 0
main/inc/lib/fckeditor/myconfig.js

@@ -1,6 +1,7 @@
 //FCKConfig.SmileyWindowWidth		= 500 ;
 //FCKConfig.SmileyWindowHeight	= 500 ;
 //FCKConfig.ImageUpload = false ;
+
 FCKConfig.ToolbarSets["PluginTest"] = [
 	['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
 	['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
@@ -30,6 +31,11 @@ FCKConfig.ToolbarSets["Question"] = [
 	['Style','FontFormat','FontName','FontSize'],['Attachment']
 ] ;
 
+
+FCKConfig.ToolbarSets["Middle"] = [
+	['FontSize'],['Bold','Italic','TextColor'],['OrderedList','UnorderedList'],['Rule','Link','Table'],['Image','Flash']
+] ;
+
 var sOtherPluginPath = FCKConfig.BasePath.substr(0, FCKConfig.BasePath.length - 7) + 'editor/plugins/' ;
 FCKConfig.Plugins.Add("MP3", "en,it", sOtherPluginPath ) ;
 FCKConfig.Plugins.Add("Video", "en,it", sOtherPluginPath ) ;

+ 3 - 4
main/inc/lib/formvalidator/Element/html_editor.php

@@ -1,5 +1,5 @@
 <?php
-// $Id: html_editor.php 10141 2006-11-23 05:12:52Z gmludo $
+// $Id: html_editor.php 10479 2006-12-13 12:42:20Z elixir_inter $
 /*
 ==============================================================================
 	Dokeos - elearning and course management software
@@ -109,9 +109,8 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea
 		$fck_editor = new FCKeditor($name);
 		$fck_editor->BasePath = api_get_path(WEB_PATH).'main/inc/lib/fckeditor/';
 
-		$fck_editor->Width = '990';
- 		//$fck_editor->Width = $fck_attribute['Width'] ? $fck_attribute['Width'] : '100%';
-		//$fck_editor->Height = $this->fullPage ? '500' : '400';
+		//$fck_editor->Width = '990';
+		$fck_editor->Width = $fck_attribute['Width'] ? $fck_attribute['Width'] : '990';
 		$fck_editor->Height = $fck_attribute['Height'] ? $fck_attribute['Height'] : '400';
 		$fck_editor->Value = $this->getValue();