Browse Source

[svn r10693] update of FCKeditor (fix bug and add video plugin)
update add_course.lib.inc.php (add video folder in document)

Julian Prud'homme 18 years ago
parent
commit
6e0f05f2ca

+ 5 - 0
main/inc/lib/add_course.lib.inc.php

@@ -216,6 +216,7 @@ function prepare_course_repository($courseRepository, $courseId)
 	mkdir(api_get_path(SYS_COURSE_PATH).$courseRepository . "/document/images", 0777);
 	mkdir(api_get_path(SYS_COURSE_PATH).$courseRepository . "/document/audio", 0777);
 	mkdir(api_get_path(SYS_COURSE_PATH).$courseRepository . "/document/flash", 0777);
+	mkdir(api_get_path(SYS_COURSE_PATH).$courseRepository . "/document/video", 0777);
 	mkdir(api_get_path(SYS_COURSE_PATH).$courseRepository . "/dropbox", 0777);
 	mkdir(api_get_path(SYS_COURSE_PATH).$courseRepository . "/group", 0777);
 	mkdir(api_get_path(SYS_COURSE_PATH).$courseRepository . "/page", 0777);
@@ -1476,6 +1477,10 @@ function fill_Db_course($courseDbName, $courseRepository, $language)
 		api_sql_query("INSERT INTO `".$TABLETOOLDOCUMENT . "`(path,title,filetype,size) VALUES ('/flash','".get_lang('Flash')."','folder','0')");
 		$example_doc_id = Database :: get_last_insert_id();
 		api_sql_query("INSERT INTO `".$TABLEITEMPROPERTY . "` (tool,insert_user_id,insert_date,lastedit_date,ref,lastedit_type,lastedit_user_id,to_group_id,to_user_id,visibility) VALUES ('document',1,NOW(),NOW(),$example_doc_id,'DocumentAdded',1,0,NULL,0)");
+		
+		api_sql_query("INSERT INTO `".$TABLETOOLDOCUMENT . "`(path,title,filetype,size) VALUES ('/video','".get_lang('Video')."','folder','0')");
+		$example_doc_id = Database :: get_last_insert_id();
+		api_sql_query("INSERT INTO `".$TABLEITEMPROPERTY . "` (tool,insert_user_id,insert_date,lastedit_date,ref,lastedit_type,lastedit_user_id,to_group_id,to_user_id,visibility) VALUES ('document',1,NOW(),NOW(),$example_doc_id,'DocumentAdded',1,0,NULL,0)");
 
 		/*
 		-----------------------------------------------------------

+ 1 - 1
main/inc/lib/fckeditor/editor/dialog/fck_flash.php

@@ -1,6 +1,6 @@
 <?php
 // name of the language file that needs to be included 
-$language_file = array('resourcelinker');
+$language_file = array('resourcelinker','document');
 include('../../../../../inc/global.inc.php');
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

+ 2 - 2
main/inc/lib/fckeditor/editor/dialog/fck_link/fck_link.js

@@ -1,4 +1,4 @@
-/*
+/*
  * FCKeditor - The text editor for internet
  * Copyright (C) 2003-2005 Frederico Caldeira Knabben
  * 
@@ -41,7 +41,7 @@ function OnDialogTabChange( tabCode )
 {
 	ShowE('divInfo'		, ( tabCode == 'Info' ) ) ;
 	ShowE('divTarget'	, ( tabCode == 'Target' ) ) ;
-	ShowE('divUpload'	, ( tabCode == 'Upload' ) ) ;
+	//ShowE('divUpload'	, ( tabCode == 'Upload' ) ) ;
 	ShowE('divAttribs'	, ( tabCode == 'Advanced' ) ) ;
 }
 

+ 2 - 2
main/inc/lib/fckeditor/editor/fckdialog.html

@@ -96,9 +96,9 @@ function RefreshSize()
 		if ( iDiff > 0 )
 		{
 			if ( document.all )
-				window.dialogHeight = ( parseInt( window.dialogHeight ) + iDiff ) + 'px' ;
+				window.dialogHeight = ( parseInt( window.dialogHeight ) + iDiff ) + 20 + 'px' ;
 			else
-				window.resizeBy( 0, iDiff ) ;
+				window.resizeBy( 0, iDiff+20 ) ;
 		}
 	}
 }

+ 4 - 0
main/inc/lib/fckeditor/editor/filemanager/upload/php/upload.php

@@ -87,6 +87,10 @@ if(isset($_SESSION["_course"]["sysCode"])){
 			$sServerDir = $currentCourseRepositorySys.'document/flash/';
 			$sserverWebath=$currentCourseRepositoryWeb.'document/flash/';
 		}
+		elseif($sType=="video"){
+			$sServerDir = $currentCourseRepositorySys.'document/video/';
+			$sserverWebath=$currentCourseRepositoryWeb.'document/video/';
+		}
 		else{
 			$sServerDir = $currentCourseRepositorySys.'document/';
 			$sserverWebath=$currentCourseRepositoryWeb.'document/';

+ 4 - 4
main/inc/lib/fckeditor/editor/lang/en.js

@@ -112,7 +112,7 @@ TableDelete			: "Delete Table",
 CellProperties		: "Cell Properties",
 TableProperties		: "Table Properties",
 ImageProperties		: "Add Image",
-FlashProperties		: "Add Flash",
+FlashProperties		: "Import Flash animation",
 
 AnchorProp			: "Anchor Properties",
 ButtonProp			: "Button Properties",
@@ -147,7 +147,7 @@ DlgBtnClose			: "Close",
 DlgBtnBrowseServer	: "Browse Server",
 DlgAdvancedTag		: "Advanced",
 DlgOpOther			: "&lt;Other&gt;",
-DlgInfoTab			: "From the course",
+DlgInfoTab			: "From course",
 DlgAlertUrl			: "Please insert the URL",
 
 // General Dialogs Labels
@@ -196,7 +196,7 @@ DlgImgAlertUrl		: "Please type the image URL",
 DlgImgLinkTab		: "Link",
 
 // Flash Dialog
-DlgFlashTitle		: "Add Flash",
+DlgFlashTitle		: "Import Flash animation",
 DlgFlashChkPlay		: "Auto Play",
 DlgFlashChkLoop		: "Loop",
 DlgFlashChkMenu		: "Enable Flash Menu",
@@ -224,7 +224,7 @@ DlgLnkNoAnchors		: "&lt;No anchors available in the document&gt;",
 DlgLnkEMail			: "E-Mail Address",
 DlgLnkEMailSubject	: "Message Subject",
 DlgLnkEMailBody		: "Message Body",
-DlgLnkUpload		: "From my computer",
+DlgLnkUpload		: "From my PC",
 DlgLnkBtnUpload		: "Add",
 
 DlgLnkTarget		: "Target",

+ 4 - 4
main/inc/lib/fckeditor/editor/lang/fr.js

@@ -112,7 +112,7 @@ TableDelete			: "Delete Table",	//MISSING
 CellProperties		: "Propriétés de Cellule",
 TableProperties		: "Propriétés de Tableau",
 ImageProperties		: "Propriétés d'Image",
-FlashProperties		: "Propriétés d'Animation Flash",
+FlashProperties		: "Importer une animation Flash",
 
 AnchorProp			: "Propriétés d'Ancre",
 ButtonProp			: "Propriétés de Bouton",
@@ -147,7 +147,7 @@ DlgBtnClose			: "Fermer",
 DlgBtnBrowseServer	: "Parcourir le Serveur",
 DlgAdvancedTag		: "Avancé",
 DlgOpOther			: "&lt;Autre&gt;",
-DlgInfoTab			: "Info",
+DlgInfoTab			: "Depuis le cours",
 DlgAlertUrl			: "Veuillez saisir l'URL",
 
 // General Dialogs Labels
@@ -196,7 +196,7 @@ DlgImgAlertUrl		: "Veuillez saisir l'URL de l'image",
 DlgImgLinkTab		: "Lien",
 
 // Flash Dialog
-DlgFlashTitle		: "Propriétés d'animation Flash",
+DlgFlashTitle		: "Importer une animation Flash",
 DlgFlashChkPlay		: "Lecture automatique",
 DlgFlashChkLoop		: "Boucle",
 DlgFlashChkMenu		: "Activer menu Flash",
@@ -224,7 +224,7 @@ DlgLnkNoAnchors		: "&lt;Pas d'ancre disponible dans le document&gt;",
 DlgLnkEMail			: "Adresse E-Mail",
 DlgLnkEMailSubject	: "Sujet du Message",
 DlgLnkEMailBody		: "Corps du Message",
-DlgLnkUpload		: "Upload",
+DlgLnkUpload		: "Depuis mon PC",
 DlgLnkBtnUpload		: "Envoyer au Serveur",
 
 DlgLnkTarget		: "Destination",

+ 1 - 1
main/inc/lib/fckeditor/editor/plugins/ImageManager/config.inc.php

@@ -26,7 +26,7 @@
  for this directory (i.e. disable PHP, Perl, CGI). We only want to store assets
  in this directory and its subdirectories.
 */
-
+$language_file = array('document');
 include ('../../../../../../inc/global.inc.php');
 
 //The user is in a course

BIN
main/inc/lib/fckeditor/editor/plugins/MP3/button.flash.gif


+ 3 - 3
main/inc/lib/fckeditor/editor/plugins/MP3/lang/en.js

@@ -1,5 +1,5 @@
 // Flash Dialog
-FCKLang["DlgMP3Title"] = "MP3 Dialog";
+FCKLang["DlgMP3Title"] = "Import MP3";
 FCKLang["DlgMP3URL"] = "URL" ;
 FCKLang["DlgMP3BtnBrowse"]    = "Browse Server" ;
 FCKLang["DlgMP3Width"]                        = "Width" ;
@@ -28,5 +28,5 @@ FCKLang["DlgMP3ScaleShowAll"] = "Show all" ;
 FCKLang["DlgMP3ScaleNoBorder"]        = "No border" ;
 FCKLang["DlgMP3ScaleExactFit"]        = "Exact fit" ;
 FCKLang["DlgMP3BgColor"]      = "Bg Color";
-FCKLang["DlgMP3Upload"]      = "From my computer";
-FCKLang["DlgMP3Tab"]      = "From the course";
+FCKLang["DlgMP3Upload"]      = "From my PC";
+FCKLang["DlgMP3Tab"]      = "From course";

+ 3 - 2
main/inc/lib/fckeditor/fckconfig.js

@@ -184,7 +184,7 @@ FCKConfig.VideoBrowserWindowWidth  = FCKConfig.ScreenWidth * 0.7 ;	//70% ;
 FCKConfig.VideoBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ;	//70% ;
 
 
-FCKConfig.LinkUpload = true ;
+FCKConfig.LinkUpload = false ;
 FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/upload/' + FCKConfig.QuickUploadLanguage + '/upload.' + _QuickUploadLanguage ;
 FCKConfig.LinkUploadAllowedExtensions	= "" ;			// empty for all
 FCKConfig.LinkUploadDeniedExtensions	= ".(php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi)$" ;	// empty for no one
@@ -206,7 +206,8 @@ FCKConfig.MP3UploadDeniedExtensions	= "" ;					// empty for no one
 
 FCKConfig.VideoUpload = true ;
 FCKConfig.VideoUploadURL = FCKConfig.BasePath + 'filemanager/upload/' + FCKConfig.QuickUploadLanguage + '/upload.' + _QuickUploadLanguage + '?Type=Video' ;
-FCKConfig.VideoUploadAllowedExtensions	= ".(avi|mpg|mpeg|mov|wmv|rm)$" ;		// empty for all
+//FCKConfig.VideoUploadAllowedExtensions	= ".(avi|mpg|mpeg|mov|wmv|rm)$" ;		// empty for all
+FCKConfig.VideoUploadAllowedExtensions	= ".(mov|wmv|rm)$" ;
 FCKConfig.VideoUploadDeniedExtensions	= "" ;					// empty for no one
 
 FCKConfig.SmileyPath	= FCKConfig.BasePath + 'images/smiley/msn/' ;

+ 1 - 1
main/inc/lib/fckeditor/myconfig.js

@@ -33,7 +33,7 @@ FCKConfig.ToolbarSets["Announcements"] = [
 ] ;
 
 FCKConfig.ToolbarSets["Full"] = [
-	['Templates','PasteWord','Link','-','ImageManager','Flash','MP3','Table','Rule','-','Subscript', 'Superscript','-','OrderedList','UnorderedList','Outdent','Indent','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],'/',['FontName','FontSize','Bold','Italic','Underline','StrikeThrough','TextColor', 'BGColor','-','Source']
+	['Templates','PasteWord','Link','-','ImageManager','Flash','MP3','Video','Table','Rule','-','Subscript', 'Superscript','-','OrderedList','UnorderedList','Outdent','Indent','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],'/',['FontName','FontSize','Bold','Italic','Underline','StrikeThrough','TextColor', 'BGColor','-','Source']
 ] ;
 
 FCKConfig.ToolbarSets["Comment"] = [