Browse Source

adding svg mimetypes to advanced html editor and preview for pdf and svg files

Juan Carlos Raña 14 years ago
parent
commit
ade921d1c1

+ 3 - 2
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.manager.php

@@ -50,8 +50,9 @@ class manager
 			array(array("pdf"), "fileAcrobat", SEARCH_TYPE_PDF, 0),
 			array(array("xls", "csv"), "fileExcel", SEARCH_TYPE_EXCEL, 0),
 			array(array("txt"), "fileText", SEARCH_TYPE_TEXT, 1),
-			array(array("xml", "xsl", "dtd"), "fileXml", SEARCH_TYPE_XML, 1)
-	);
+			array(array("xml", "xsl", "dtd"), "fileXml", SEARCH_TYPE_XML, 1),
+			array(array("svg","svgz"), "fileSVG", SEARCH_TYPE_SVG, 1)
+	);// Added svg and svgz types to Chamilo
 	
 	/**
 		 * constructor

+ 4 - 4
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.base.php

@@ -159,14 +159,14 @@
 	define('CONFIG_EDITABLE_VALID_EXTS', 'txt,htm,html'); //make you include all these extension in CONFIG_UPLOAD_VALID_EXTS if you want all valid. For Chamilo exclude original xml, js and css
 
 	define('CONFIG_OVERWRITTEN', false); //overwirte when processing paste
-	define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,jpeg,png,bmp,tif,psd,zip,sit,rar,gz,tar,htm,html,mov,mpg,avi,asf,mpeg,wmv,aif,aiff,wav,mp3,swf, flv, mp4, aac, ppt,rtf,doc, pdf,xls,txt,flv,odt,ods,odp,odg,odc,odf,odb,odi,pps,docx,pptx,xlsx,accdb,xml, mid');//For Chamilo updated
-	define("CONFIG_VIEWABLE_VALID_EXTS", 'gif,bmp,txt,jpg,jpeg,png,tif,html,htm,mp3,wav,wmv,wma,rm,rmvb,mov,swf,flv,mp4,aac,avi,mpg,mpeg,asf,mid');//For Chamilo updated
+	define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,jpeg,png,bmp,tif,psd,zip,sit,rar,gz,tar,htm,html,mov,mpg,avi,asf,mpeg,wmv,aif,aiff,wav,mp3,swf, flv, mp4, aac, ppt,rtf,doc, pdf,xls,txt,flv,odt,ods,odp,odg,odc,odf,odb,odi,pps,docx,pptx,xlsx,accdb,xml,mid,svg');//For Chamilo updated
+	define("CONFIG_VIEWABLE_VALID_EXTS", 'gif,bmp,txt,jpg,jpeg,png,tif,html,htm,mp3,wav,wmv,wma,rm,rmvb,mov,swf,flv,mp4,aac,avi,mpg,mpeg,asf,mid,svg,pdf');//For Chamilo updated
 	define('CONFIG_UPLOAD_INVALID_EXTS', 'php,php3,php4,php5,php6,phps,phtml,asp,aspx,jsp,cfm,cfc,pl,jar,sh,cgi,js,exe,com,bat,pif,scr,msi,ws,wsc,wsf,vb,vbe,vbs,reg,dll'); //For Chamilo added.
 	//Preview
 	define('CONFIG_IMG_THUMBNAIL_MAX_X', 100);
 	define('CONFIG_IMG_THUMBNAIL_MAX_Y', 100);
-	define('CONFIG_THICKBOX_MAX_WIDTH', 500);
-	define('CONFIG_THICKBOX_MAX_HEIGHT', 430);
+	define('CONFIG_THICKBOX_MAX_WIDTH', 400); //only for html, pdf, svg
+	define('CONFIG_THICKBOX_MAX_HEIGHT', 330);//only for html, pdf, svg
 
 
 		/**

+ 6 - 3
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/theme/default/css/fckeditor.css

@@ -275,7 +275,8 @@ span.filePPT, span.fileExcel, span.filePhp,
 span.fileMusic, span.fileExe, span.fileAcrobat,
 span.fileRTF, span.fileXml, span.fileCode,
 span.fileZip, span.addMore, span.deleteFile,
-span.cancel,span.uploadProcessing, span.folderShared, span.unknownUser{
+span.cancel,span.uploadProcessing,
+span.folderShared, span.unknownUser, span.fileSVG{
 padding:2px 0 2px 16px;
 background-repeat:no-repeat;
 background-position:0 50%;
@@ -305,6 +306,7 @@ span.fileZip{background-image:url(../images/small_icon/fileZip.png);}
 
 span.folderShared{background-image:url(../images/small_icon/folderShared.png);}
 span.unknownUser{background-image:url(../images/small_icon/smallunknownUser.png);}
+span.fileSVG{background-image:url(../images/small_icon/fileSVG.png);}
 
 /* big icon */
 dt.folderEmpty, dt.folder, dt.folderParent,
@@ -313,7 +315,8 @@ dt.fileFlash, dt.fileVideo,
 dt.filePPT, dt.fileExcel, dt.filePhp,
 dt.fileMusic, dt.fileExe, dt.fileAcrobat,
 dt.fileRTF, dt.fileXml, dt.fileCode,
-dt.fileZip,dt.folderShared, dt.unknownUser{
+dt.fileZip,
+dt.folderShared, dt.unknownUser,dt.fileSVG{
 margin: 0px;
 padding:0px;
 border:solid #ccc 1px;
@@ -348,7 +351,7 @@ dt.fileZip{background-image:url(../images/big_icon/fileZip.png);}
 
 dt.folderShared{background-image:url(../images/big_icon/bigfolderShared.png);}
 dt.unknownUser{background-image:url(../images/big_icon/biguserUnknown.png);}
-
+dt.fileSVG{background-image:url(../images/big_icon/fileSVG.png);}
 
 table.tableSummary{
 border-collapse:collapse;

+ 6 - 3
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/theme/default/css/stand_alone.css

@@ -267,7 +267,8 @@ span.filePPT, span.fileExcel, span.filePhp,
 span.fileMusic, span.fileExe, span.fileAcrobat,
 span.fileRTF, span.fileXml, span.fileCode,
 span.fileZip, span.addMore, span.deleteFile,
-span.cancel,span.uploadProcessing, span.folderShared, span.unknownUser{
+span.cancel,span.uploadProcessing,
+span.folderShared, span.unknownUser, span.fileSVG{
 padding:2px 0 2px 16px;
 background-repeat:no-repeat;
 background-position:0 50%;
@@ -297,6 +298,7 @@ span.fileZip{background-image:url(../images/small_icon/fileZip.png);}
 
 span.folderShared{background-image:url(../images/small_icon/folderShared.png);}
 span.unknownUser{background-image:url(../images/small_icon/smallunknownUser.png);}
+span.fileSVG{background-image:url(../images/small_icon/fileSVG.png);}
 
 /* big icon */
 dt.folderEmpty, dt.folder, dt.folderParent,
@@ -305,7 +307,8 @@ dt.fileFlash, dt.fileVideo,
 dt.filePPT, dt.fileExcel, dt.filePhp,
 dt.fileMusic, dt.fileExe, dt.fileAcrobat,
 dt.fileRTF, dt.fileXml, dt.fileCode,
-dt.fileZip,dt.folderShared, dt.unknownUser{
+dt.fileZip,
+dt.folderShared, dt.unknownUser, dt.fileSVG{
 margin: 0px;
 padding:0px;
 border:solid #ccc 1px;
@@ -340,7 +343,7 @@ dt.fileZip{background-image:url(../images/big_icon/fileZip.png);}
 
 dt.folderShared{background-image:url(../images/big_icon/bigfolderShared.png);}
 dt.unknownUser{background-image:url(../images/big_icon/biguserUnknown.png);}
-
+dt.fileSVG{background-image:url(../images/big_icon/fileSVG.png);}
 
 table.tableSummary{
 border-collapse:collapse;