You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(34) |
Sep
(302) |
Oct
(13) |
Nov
(35) |
Dec
(15) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(56) |
Feb
(12) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Thyamad c. <th...@us...> - 2005-09-29 19:50:21
|
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/_testcases In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/_testcases Modified Files: 001.html 002.html 003.html 004.html 005.html 006.html 007.html sampleposteddata.asp testcases.css Added Files: 008.html Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi Index: 005.html =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/_testcases/005.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 005.html 1 Sep 2005 18:15:39 -0000 1.1 --- 005.html 29 Sep 2005 19:49:17 -0000 1.2 *************** *** 1,6 **** <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,6 ---- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 13,22 **** * Test page. * - * Version: 2.0 RC3 - * Modified: 2005-03-02 12:04:53 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <html> <head> --- 13,19 ---- * Test page. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <html> <head> Index: 007.html =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/_testcases/007.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 007.html 1 Sep 2005 18:15:39 -0000 1.1 --- 007.html 29 Sep 2005 19:49:17 -0000 1.2 *************** *** 1,6 **** <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,6 ---- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 13,22 **** * Test Page. * - * Version: 2.0 RC3 - * Modified: 2005-02-23 23:27:23 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <html> <head> --- 13,19 ---- * Test Page. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <html> <head> Index: testcases.css =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/_testcases/testcases.css,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** testcases.css 1 Sep 2005 18:15:39 -0000 1.1 --- testcases.css 29 Sep 2005 19:49:17 -0000 1.2 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * Styles used in the samples pages. * - * Version: 2.0 RC3 - * Modified: 2004-05-31 23:07:47 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ body, td, input, select, textarea --- 12,18 ---- * Styles used in the samples pages. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ body, td, input, select, textarea Index: 001.html =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/_testcases/001.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 001.html 1 Sep 2005 18:15:39 -0000 1.1 --- 001.html 29 Sep 2005 19:49:16 -0000 1.2 *************** *** 1,6 **** <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,6 ---- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 13,22 **** * Test page. * - * Version: 2.0 RC3 - * Modified: 2005-02-23 23:24:17 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <html> <head> --- 13,19 ---- * Test page. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <html> <head> *************** *** 24,29 **** <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> ! <link href="testcases.css" rel="stylesheet" type="text/css"> ! <script type="text/javascript" src="../fckeditor.js"></script> </head> <body> --- 21,34 ---- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> ! <link href="testcases.css" rel="stylesheet" type="text/css" /> ! <script type="text/javascript" src="../fckeditor.js"></script> ! <script> ! ! function SubmitForm() ! { ! document.forms[0].submit() ; ! } ! ! </script> </head> <body> *************** *** 58,62 **** </script> <br> ! <input type="submit" value="Submit"> </form> </body> --- 63,67 ---- </script> <br> ! <input type="submit" value="Submit"> <input type="button" value="Submit by Code" onclick="SubmitForm();"> </form> </body> --- NEW FILE: 008.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: 008.html * Test page. * * File Authors: * Frederico Caldeira Knabben (fr...@fc...) --> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="testcases.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="../fckeditor.js"></script> <script> function Validate() { // Get the editor instance that we want to interact with. var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ; // Get the editor contents in XHTML. if ( oEditor.GetXHTML( false ).length == 0 ) { alert( 'The "Save" command must not submit if the editor is empty' ) ; return false ; } } </script> </head> <body> <h1>FCKeditor - Test 008</h1> <P> <STRONG>Expected results</STRONG>: The editor content must be loaded and the submit button must post the editors html.<BR> <STRONG>Configurations</STRONG>: Default<BR> <STRONG>Steps to Reproduce</STRONG>: </P> <OL> <LI> Wait the editor to load. <LI> Remove all the content with the mouse and delete it. <LI> Hit the "Save" button - an alert should popup. <LI> Insert some text. <LI> Hit the "Save" button and check the posted data. <LI> Close the data window. <LI> Press the "New Page" button. <LI> Hit the "Save" button - an alert should popup.</LI></OL> <P> <hr> <P></P> <form action="sampleposteddata.asp" method="post" target="_blank" onsubmit="return Validate();"> <script type="text/javascript"> <!-- // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ; var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ; oFCKeditor.Create() ; //--> </script> </form> </body> </html> Index: 004.html =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/_testcases/004.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 004.html 1 Sep 2005 18:15:39 -0000 1.1 --- 004.html 29 Sep 2005 19:49:17 -0000 1.2 *************** *** 1,6 **** <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,6 ---- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 13,22 **** * Test page. * - * Version: 2.0 RC3 - * Modified: 2005-02-25 22:01:23 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <html> <head> --- 13,19 ---- * Test page. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <html> <head> Index: 006.html =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/_testcases/006.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 006.html 1 Sep 2005 18:15:39 -0000 1.1 --- 006.html 29 Sep 2005 19:49:17 -0000 1.2 *************** *** 1,6 **** <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,6 ---- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 13,22 **** * Test page. * - * Version: 2.0 RC3 - * Modified: 2005-03-02 12:05:34 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <html> <head> --- 13,19 ---- * Test page. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <html> <head> Index: 002.html =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/_testcases/002.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 002.html 1 Sep 2005 18:15:39 -0000 1.1 --- 002.html 29 Sep 2005 19:49:16 -0000 1.2 *************** *** 1,6 **** <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,6 ---- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 13,22 **** * Test page. * - * Version: 2.0 RC3 - * Modified: 2005-02-23 23:24:13 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <html> <head> --- 13,19 ---- * Test page. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <html> <head> Index: 003.html =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/_testcases/003.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 003.html 1 Sep 2005 18:15:39 -0000 1.1 --- 003.html 29 Sep 2005 19:49:17 -0000 1.2 *************** *** 1,6 **** <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,6 ---- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 13,22 **** * Test page. * - * Version: 2.0 RC3 - * Modified: 2005-03-02 11:59:25 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <html> <head> --- 13,19 ---- * Test page. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <html> <head> Index: sampleposteddata.asp =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/_testcases/sampleposteddata.asp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sampleposteddata.asp 1 Sep 2005 18:15:39 -0000 1.1 --- sampleposteddata.asp 29 Sep 2005 19:49:17 -0000 1.2 *************** *** 1,5 **** ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * This page lists the data posted by a form. * - * Version: 2.0 RC3 - * Modified: 2005-01-04 18:58:20 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> --- 12,18 ---- * This page lists the data posted by a form. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> |
From: Thyamad c. <th...@us...> - 2005-09-29 19:50:21
|
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/filemanager/browser/default/connectors/cfm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/filemanager/browser/default/connectors/cfm Modified Files: connector.cfm Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi Index: connector.cfm =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/filemanager/browser/default/connectors/cfm/connector.cfm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** connector.cfm 1 Sep 2005 18:15:43 -0000 1.4 --- connector.cfm 29 Sep 2005 19:49:18 -0000 1.5 *************** *** 1,36 **** <cfsetting enablecfoutputonly="true" showdebugoutput="false"> ! <!--- ! * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben ! * ! * Licensed under the terms of the GNU Lesser General Public License: ! * http://www.opensource.org/licenses/lgpl-license.php ! * ! * For further information visit: ! * http://www.fckeditor.net/ ! * ! * File Name: connector.cfm ! * This is the File Browser Connector for ColdFusion. ! * ! * Notice: ! * FCKEditor needs an UTF-8 encoded XML packet. ! * Only CFMX can encode in UTF-8. If this browser doesn't work in CF 4.0/4.5/5, ! * please send me a notice. We then can use an more object oriented approach (CFC) ! * to clean up this code :) ! * ! * Please declare the base path (e.g. /UserFiles/) as an Application or Server variable ! * Directory structure (with optional subdirectories built by the user). ! * The "Type" subdirectory is automatically submitted by FCKEditor: ! * /UserFiles/Image/ ! * /UserFiles/Flash/ ! * /UserFiles/File/ ! * /UserFiles/Media/ ! * ! * Version: 2.0 RC3 ! * Modified: 2004-12-07 12:01:46 ! * ! * File Authors: ! * Hendrik Kramer (hk...@lw...) ! ---> <cfparam name="URL.Command" type="string"> <cfparam name="URL.Type" type="string"> --- 1,24 ---- <cfsetting enablecfoutputonly="true" showdebugoutput="false"> ! <!--- @Packager.Header ! <FileDescription> ! This is the File Browser Connector for ColdFusion. ! ! Notice: ! FCKeditor needs an UTF-8 encoded XML packet. ! Only CFMX can encode in UTF-8. If this browser doesn't work in CF 4.0/4.5/5, ! please send me a notice. We then can use an more object oriented approach (CFC) ! to clean up this code :) ! ! Please declare the base path (e.g. /UserFiles/) as an Application or Server variable ! Directory structure (with optional subdirectories built by the user). ! The "Type" subdirectory is automatically submitted by FCKeditor: ! /UserFiles/Image/ ! /UserFiles/Flash/ ! /UserFiles/File/ ! /UserFiles/Media/ ! ! </FileDescription> ! <Author name="Hendrik Kramer" email="hk...@lw..." /> ! ---> <cfparam name="URL.Command" type="string"> <cfparam name="URL.Type" type="string"> *************** *** 175,179 **** <cfoutput> <script type="text/javascript"> ! window.parent.frames['frmUpload'].OnUploadCompleted(#sErrorNumber#,'#replace( sFileName & "." & sFileExt, "'", "\'", "ALL")#'); </script> </cfoutput> --- 163,167 ---- <cfoutput> <script type="text/javascript"> ! window.parent.frames['frmUpload'].OnUploadCompleted(#sErrorNumber#,'#replace( sFileName & "." & sFileExt, "'", "\'", "ALL")#'); </script> </cfoutput> |
From: Thyamad c. <th...@us...> - 2005-09-29 19:50:21
|
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/_samples/_plugins/findreplace/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/_samples/_plugins/findreplace/lang Modified Files: en.js it.js Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi Index: en.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/_samples/_plugins/findreplace/lang/en.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** en.js 1 Sep 2005 19:05:04 -0000 1.1 --- en.js 29 Sep 2005 19:49:16 -0000 1.2 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * English language file for the sample plugin. * - * Version: 2.0 RC3 - * Modified: 2004-11-22 11:20:42 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ FCKLang['DlgMyReplaceTitle'] = 'Plugin - Replace' ; --- 12,18 ---- * English language file for the sample plugin. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ FCKLang['DlgMyReplaceTitle'] = 'Plugin - Replace' ; Index: it.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/_samples/_plugins/findreplace/lang/it.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** it.js 1 Sep 2005 19:05:04 -0000 1.1 --- it.js 29 Sep 2005 19:49:16 -0000 1.2 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * Italian language file for the sample plugin. * - * Version: 2.0 RC3 - * Modified: 2004-11-22 11:20:36 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ FCKLang['DlgMyReplaceTitle'] = 'Plugin - Sostituisci' ; --- 12,18 ---- * Italian language file for the sample plugin. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ FCKLang['DlgMyReplaceTitle'] = 'Plugin - Sostituisci' ; |
From: Thyamad c. <th...@us...> - 2005-09-29 19:50:20
|
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/_samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/_samples Modified Files: default.html sample.css sampleslist.html Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi Index: default.html =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/_samples/default.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** default.html 1 Sep 2005 18:15:39 -0000 1.4 --- default.html 29 Sep 2005 19:49:16 -0000 1.5 *************** *** 1,5 **** ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * Samples Frameset page. * - * Version: 2.0 RC3 - * Modified: 2004-05-31 23:07:46 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <html> --- 12,18 ---- * Samples Frameset page. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <html> Index: sample.css =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/_samples/sample.css,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sample.css 1 Sep 2005 18:15:39 -0000 1.4 --- sample.css 29 Sep 2005 19:49:16 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * Styles used in the samples pages. * - * Version: 2.0 RC3 - * Modified: 2004-05-31 23:07:47 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ body, td, input, select, textarea --- 12,18 ---- * Styles used in the samples pages. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ body, td, input, select, textarea Index: sampleslist.html =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/_samples/sampleslist.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sampleslist.html 1 Sep 2005 18:15:39 -0000 1.4 --- sampleslist.html 29 Sep 2005 19:49:16 -0000 1.5 *************** *** 1,5 **** ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * Page used to select the sample to view. * - * Version: 2.0 RC3 - * Modified: 2005-03-02 10:19:36 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> --- 12,18 ---- * Page used to select the sample to view. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> *************** *** 55,58 **** --- 52,56 ---- <option value="html/sample07.html">Javascript : Sample 07 : Full Page editing</option> <option value="html/sample08.html">Javascript : Sample 08 : Editor API usage</option> + <option value="html/sample09.html">Javascript : Sample 09 : Complex form (multiple editors)</option> <option value=""> </option> <option value="cfm/sample01.cfm">ColdFusion : Sample 01 : Editor with all features</option> *************** *** 64,71 **** <option value="asp/sample04.asp">ASP : Sample 04 : Skins support</option> <option value=""> </option> ! <option value="perl/sample01.php">Perl : Sample 01 : Editor with all features</option> ! <option value="perl/sample02.php">Perl : Sample 02 : Multi-language support</option> ! <option value="perl/sample03.php">Perl : Sample 03 : Toolbar selection</option> ! <option value="perl/sample04.php">Perl : Sample 04 : Skins support</option> <option value=""> </option> <option value="php/sample01.php">PHP : Sample 01 : Editor with all features</option> --- 62,69 ---- <option value="asp/sample04.asp">ASP : Sample 04 : Skins support</option> <option value=""> </option> ! <option value="perl/sample01.cgi">Perl : Sample 01 : Editor with all features</option> ! <option value="perl/sample02.cgi">Perl : Sample 02 : Multi-language support</option> ! <option value="perl/sample03.cgi">Perl : Sample 03 : Toolbar selection</option> ! <option value="perl/sample04.cgi">Perl : Sample 04 : Skins support</option> <option value=""> </option> <option value="php/sample01.php">PHP : Sample 01 : Editor with all features</option> |
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/dialog/fck_spellerpages/spellerpages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/dialog/fck_spellerpages/spellerpages Modified Files: controlWindow.js controls.html spellChecker.js spellchecker.html spellerStyle.css wordWindow.js Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi Index: spellChecker.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** spellChecker.js 1 Sep 2005 19:05:04 -0000 1.1 --- spellChecker.js 29 Sep 2005 19:49:18 -0000 1.2 *************** *** 1,458 **** ! //////////////////////////////////////////////////// ! // spellChecker.js ! // ! // spellChecker object ! // ! // This file is sourced on web pages that have a textarea object to evaluate ! // for spelling. It includes the implementation for the spellCheckObject. ! // ! //////////////////////////////////////////////////// ! ! ! // constructor ! function spellChecker( textObject ) { ! ! // public properties - configurable ! // this.popUpUrl = '/speller/spellchecker.html'; // by FredCK ! this.popUpUrl = 'fck_spellerpages/spellerpages/spellchecker.html'; // by FredCK ! this.popUpName = 'spellchecker'; ! // this.popUpProps = "menu=no,width=440,height=350,top=70,left=120,resizable=yes,status=yes"; // by FredCK ! this.popUpProps = null ; // by FredCK ! // this.spellCheckScript = '/speller/server-scripts/spellchecker.php'; // by FredCK ! this.spellCheckScript = 'server-scripts/spellchecker.php'; // by FredCK ! //this.spellCheckScript = '/cgi-bin/spellchecker.pl'; ! ! // values used to keep track of what happened to a word ! this.replWordFlag = "R"; // single replace ! this.ignrWordFlag = "I"; // single ignore ! this.replAllFlag = "RA"; // replace all occurances ! this.ignrAllFlag = "IA"; // ignore all occurances ! this.fromReplAll = "~RA"; // an occurance of a "replace all" word ! this.fromIgnrAll = "~IA"; // an occurance of a "ignore all" word ! // properties set at run time ! this.wordFlags = new Array(); ! this.currentTextIndex = 0; ! this.currentWordIndex = 0; ! this.spellCheckerWin = null; ! this.controlWin = null; ! this.wordWin = null; ! this.textArea = textObject; // deprecated ! this.textInputs = arguments; ! ! // private methods ! this._spellcheck = _spellcheck; ! this._getSuggestions = _getSuggestions; ! this._setAsIgnored = _setAsIgnored; ! this._getTotalReplaced = _getTotalReplaced; ! this._setWordText = _setWordText; ! this._getFormInputs = _getFormInputs; ! ! // public methods ! this.openChecker = openChecker; ! this.startCheck = startCheck; ! this.checkTextBoxes = checkTextBoxes; ! this.checkTextAreas = checkTextAreas; ! this.spellCheckAll = spellCheckAll; ! this.ignoreWord = ignoreWord; ! this.ignoreAll = ignoreAll; ! this.replaceWord = replaceWord; ! this.replaceAll = replaceAll; ! this.terminateSpell = terminateSpell; ! this.undo = undo; ! ! // set the current window's "speller" property to the instance of this class. ! // this object can now be referenced by child windows/frames. ! window.speller = this; ! } ! ! // call this method to check all text boxes (and only text boxes) in the HTML document ! function checkTextBoxes() { ! this.textInputs = this._getFormInputs( "^text$" ); ! this.openChecker(); ! } ! ! // call this method to check all textareas (and only textareas ) in the HTML document ! function checkTextAreas() { ! this.textInputs = this._getFormInputs( "^textarea$" ); ! this.openChecker(); ! } ! ! // call this method to check all text boxes and textareas in the HTML document ! function spellCheckAll() { ! this.textInputs = this._getFormInputs( "^text(area)?$" ); ! this.openChecker(); ! } ! ! // call this method to check text boxe(s) and/or textarea(s) that were passed in to the ! // object's constructor or to the textInputs property ! function openChecker() { ! this.spellCheckerWin = window.open( this.popUpUrl, this.popUpName, this.popUpProps ); ! if( !this.spellCheckerWin.opener ) { ! this.spellCheckerWin.opener = window; ! } ! } ! ! function startCheck( wordWindowObj, controlWindowObj ) { ! ! // set properties from args ! this.wordWin = wordWindowObj; ! this.controlWin = controlWindowObj; ! ! // reset properties ! this.wordWin.resetForm(); ! this.controlWin.resetForm(); ! this.currentTextIndex = 0; ! this.currentWordIndex = 0; ! // initialize the flags to an array - one element for each text input ! this.wordFlags = new Array( this.wordWin.textInputs.length ); ! // each element will be an array that keeps track of each word in the text ! for( var i=0; i<this.wordFlags.length; i++ ) { ! this.wordFlags[i] = []; ! } ! ! // start ! this._spellcheck(); ! ! return true; ! } ! ! function ignoreWord() { ! var wi = this.currentWordIndex; ! var ti = this.currentTextIndex; ! if( !this.wordWin ) { ! alert( 'Error: Word frame not available.' ); ! return false; ! } ! if( !this.wordWin.getTextVal( ti, wi )) { ! alert( 'Error: "Not in dictionary" text is missing.' ); ! return false; ! } ! // set as ignored ! if( this._setAsIgnored( ti, wi, this.ignrWordFlag )) { ! this.currentWordIndex++; ! this._spellcheck(); ! } ! } ! ! function ignoreAll() { ! var wi = this.currentWordIndex; ! var ti = this.currentTextIndex; ! if( !this.wordWin ) { ! alert( 'Error: Word frame not available.' ); ! return false; ! } ! // get the word that is currently being evaluated. ! var s_word_to_repl = this.wordWin.getTextVal( ti, wi ); ! if( !s_word_to_repl ) { ! alert( 'Error: "Not in dictionary" text is missing' ); ! return false; ! } ! ! // set this word as an "ignore all" word. ! this._setAsIgnored( ti, wi, this.ignrAllFlag ); ! ! // loop through all the words after this word ! for( var i = ti; i < this.wordWin.textInputs.length; i++ ) { ! for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) { ! if(( i == ti && j > wi ) || i > ti ) { ! // future word: set as "from ignore all" if ! // 1) do not already have a flag and ! // 2) have the same value as current word ! if(( this.wordWin.getTextVal( i, j ) == s_word_to_repl ) ! && ( !this.wordFlags[i][j] )) { ! this._setAsIgnored( i, j, this.fromIgnrAll ); ! } ! } ! } ! } ! ! // finally, move on ! this.currentWordIndex++; ! this._spellcheck(); ! } ! ! function replaceWord() { ! var wi = this.currentWordIndex; ! var ti = this.currentTextIndex; ! if( !this.wordWin ) { ! alert( 'Error: Word frame not available.' ); ! return false; ! } ! if( !this.wordWin.getTextVal( ti, wi )) { ! alert( 'Error: "Not in dictionary" text is missing' ); ! return false; ! } ! if( !this.controlWin.replacementText ) { ! return; ! } ! var txt = this.controlWin.replacementText; ! if( txt.value ) { ! var newspell = new String( txt.value ); ! if( this._setWordText( ti, wi, newspell, this.replWordFlag )) { ! this.currentWordIndex++; ! this._spellcheck(); ! } ! } ! } ! ! function replaceAll() { ! var ti = this.currentTextIndex; ! var wi = this.currentWordIndex; ! if( !this.wordWin ) { ! alert( 'Error: Word frame not available.' ); ! return false; ! } ! var s_word_to_repl = this.wordWin.getTextVal( ti, wi ); ! if( !s_word_to_repl ) { ! alert( 'Error: "Not in dictionary" text is missing' ); ! return false; ! } ! var txt = this.controlWin.replacementText; ! if( !txt.value ) return; ! var newspell = new String( txt.value ); ! ! // set this word as a "replace all" word. ! this._setWordText( ti, wi, newspell, this.replAllFlag ); ! ! // loop through all the words after this word ! for( var i = ti; i < this.wordWin.textInputs.length; i++ ) { ! for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) { ! if(( i == ti && j > wi ) || i > ti ) { ! // future word: set word text to s_word_to_repl if ! // 1) do not already have a flag and ! // 2) have the same value as s_word_to_repl ! if(( this.wordWin.getTextVal( i, j ) == s_word_to_repl ) ! && ( !this.wordFlags[i][j] )) { ! this._setWordText( i, j, newspell, this.fromReplAll ); ! } ! } ! } ! } ! ! // finally, move on ! this.currentWordIndex++; ! this._spellcheck(); ! } ! ! function terminateSpell() { ! // called when we have reached the end of the spell checking. ! var msg = ""; // by FredCK ! var numrepl = this._getTotalReplaced(); ! if( numrepl == 0 ) { ! // see if there were no misspellings to begin with ! if( !this.wordWin ) { ! msg = ""; ! } else { ! if( this.wordWin.totalMisspellings() ) { ! // msg += "No words changed."; // by FredCK ! msg += FCKLang.DlgSpellNoChanges ; // by FredCK ! } else { ! // msg += "No misspellings found."; // by FredCK ! msg += FCKLang.DlgSpellNoMispell ; // by FredCK ! } ! } ! } else if( numrepl == 1 ) { ! // msg += "One word changed."; // by FredCK ! msg += FCKLang.DlgSpellOneChange ; // by FredCK ! } else { ! // msg += numrepl + " words changed."; // by FredCK ! msg += FCKLang.DlgSpellManyChanges.replace( /%1/g, numrepl ) ; ! } ! if( msg ) { ! // msg += "\n"; // by FredCK ! alert( msg ); ! } ! ! if( numrepl > 0 ) { ! // update the text field(s) on the opener window ! for( var i = 0; i < this.textInputs.length; i++ ) { ! // this.textArea.value = this.wordWin.text; ! if( this.wordWin ) { ! if( this.wordWin.textInputs[i] ) { ! this.textInputs[i].value = this.wordWin.textInputs[i]; ! } ! } ! } ! } ! ! // return back to the calling window ! // this.spellCheckerWin.close(); // by FredCK ! if ( typeof( this.OnFinished ) == 'function' ) // by FredCK ! this.OnFinished(numrepl) ; // by FredCK ! ! return true; ! } ! ! function undo() { ! // skip if this is the first word! ! var ti = this.currentTextIndex; ! var wi = this.currentWordIndex ! ! if( this.wordWin.totalPreviousWords( ti, wi ) > 0 ) { ! this.wordWin.removeFocus( ti, wi ); ! ! // go back to the last word index that was acted upon ! do { ! // if the current word index is zero then reset the seed ! if( this.currentWordIndex == 0 && this.currentTextIndex > 0 ) { ! this.currentTextIndex--; ! this.currentWordIndex = this.wordWin.totalWords( this.currentTextIndex )-1; ! if( this.currentWordIndex < 0 ) this.currentWordIndex = 0; ! } else { ! if( this.currentWordIndex > 0 ) { ! this.currentWordIndex--; ! } ! } ! } while ( ! this.wordWin.totalWords( this.currentTextIndex ) == 0 ! || this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromIgnrAll ! || this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromReplAll ! ); ! ! var text_idx = this.currentTextIndex; ! var idx = this.currentWordIndex; ! var preReplSpell = this.wordWin.originalSpellings[text_idx][idx]; ! ! // if we got back to the first word then set the Undo button back to disabled ! if( this.wordWin.totalPreviousWords( text_idx, idx ) == 0 ) { ! this.controlWin.disableUndo(); ! } ! ! // examine what happened to this current word. ! switch( this.wordFlags[text_idx][idx] ) { ! // replace all: go through this and all the future occurances of the word ! // and revert them all to the original spelling and clear their flags ! case this.replAllFlag : ! for( var i = text_idx; i < this.wordWin.textInputs.length; i++ ) { ! for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) { ! if(( i == text_idx && j >= idx ) || i > text_idx ) { ! var origSpell = this.wordWin.originalSpellings[i][j]; ! if( origSpell == preReplSpell ) { ! this._setWordText ( i, j, origSpell, undefined ); ! } ! } ! } ! } ! break; ! ! // ignore all: go through all the future occurances of the word ! // and clear their flags ! case this.ignrAllFlag : ! for( var i = text_idx; i < this.wordWin.textInputs.length; i++ ) { ! for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) { ! if(( i == text_idx && j >= idx ) || i > text_idx ) { ! var origSpell = this.wordWin.originalSpellings[i][j]; ! if( origSpell == preReplSpell ) { ! this.wordFlags[i][j] = undefined; ! } ! } ! } ! } ! break; ! ! // replace: revert the word to its original spelling ! case this.replWordFlag : ! this._setWordText ( text_idx, idx, preReplSpell, undefined ); ! break; ! } ! ! // For all four cases, clear the wordFlag of this word. re-start the process ! this.wordFlags[text_idx][idx] = undefined; ! this._spellcheck(); ! } ! } ! ! function _spellcheck() { ! var ww = this.wordWin; ! ! // check if this is the last word in the current text element ! if( this.currentWordIndex == ww.totalWords( this.currentTextIndex) ) { ! this.currentTextIndex++; ! this.currentWordIndex = 0; ! // keep going if we're not yet past the last text element ! if( this.currentTextIndex < this.wordWin.textInputs.length ) { ! this._spellcheck(); ! return; ! } else { ! this.terminateSpell(); ! return; ! } ! } ! ! // if this is after the first one make sure the Undo button is enabled ! if( this.currentWordIndex > 0 ) { ! this.controlWin.enableUndo(); ! } ! ! // skip the current word if it has already been worked on ! if( this.wordFlags[this.currentTextIndex][this.currentWordIndex] ) { ! // increment the global current word index and move on. ! this.currentWordIndex++; ! this._spellcheck(); ! } else { ! var evalText = ww.getTextVal( this.currentTextIndex, this.currentWordIndex ); ! if( evalText ) { ! this.controlWin.evaluatedText.value = evalText; ! ww.setFocus( this.currentTextIndex, this.currentWordIndex ); ! this._getSuggestions( this.currentTextIndex, this.currentWordIndex ); ! } ! } ! } ! ! function _getSuggestions( text_num, word_num ) { ! this.controlWin.clearSuggestions(); ! // add suggestion in list for each suggested word. ! // get the array of suggested words out of the ! // three-dimensional array containing all suggestions. ! var a_suggests = this.wordWin.suggestions[text_num][word_num]; ! if( a_suggests ) { ! // got an array of suggestions. ! for( var ii = 0; ii < a_suggests.length; ii++ ) { ! this.controlWin.addSuggestion( a_suggests[ii] ); ! } ! } ! this.controlWin.selectDefaultSuggestion(); ! } ! ! function _setAsIgnored( text_num, word_num, flag ) { ! // set the UI ! this.wordWin.removeFocus( text_num, word_num ); ! // do the bookkeeping ! this.wordFlags[text_num][word_num] = flag; ! return true; ! } ! ! function _getTotalReplaced() { ! var i_replaced = 0; ! for( var i = 0; i < this.wordFlags.length; i++ ) { ! for( var j = 0; j < this.wordFlags[i].length; j++ ) { ! if(( this.wordFlags[i][j] == this.replWordFlag ) ! || ( this.wordFlags[i][j] == this.replAllFlag ) ! || ( this.wordFlags[i][j] == this.fromReplAll )) { ! i_replaced++; ! } ! } ! } ! return i_replaced; ! } ! ! function _setWordText( text_num, word_num, newText, flag ) { ! // set the UI and form inputs ! this.wordWin.setText( text_num, word_num, newText ); ! // keep track of what happened to this word: ! this.wordFlags[text_num][word_num] = flag; ! return true; ! } ! ! function _getFormInputs( inputPattern ) { ! var inputs = new Array(); ! for( var i = 0; i < document.forms.length; i++ ) { ! for( var j = 0; j < document.forms[i].elements.length; j++ ) { ! if( document.forms[i].elements[j].type.match( inputPattern )) { ! inputs[inputs.length] = document.forms[i].elements[j]; ! } ! } ! } ! return inputs; ! } ! --- 1,458 ---- ! //////////////////////////////////////////////////// ! // spellChecker.js ! // ! // spellChecker object ! // ! // This file is sourced on web pages that have a textarea object to evaluate ! // for spelling. It includes the implementation for the spellCheckObject. ! // ! //////////////////////////////////////////////////// ! ! ! // constructor ! function spellChecker( textObject ) { ! ! // public properties - configurable ! // this.popUpUrl = '/speller/spellchecker.html'; // by FredCK ! this.popUpUrl = 'fck_spellerpages/spellerpages/spellchecker.html'; // by FredCK ! this.popUpName = 'spellchecker'; ! // this.popUpProps = "menu=no,width=440,height=350,top=70,left=120,resizable=yes,status=yes"; // by FredCK ! this.popUpProps = null ; // by FredCK ! // this.spellCheckScript = '/speller/server-scripts/spellchecker.php'; // by FredCK ! this.spellCheckScript = 'server-scripts/spellchecker.php'; // by FredCK ! //this.spellCheckScript = '/cgi-bin/spellchecker.pl'; ! ! // values used to keep track of what happened to a word ! this.replWordFlag = "R"; // single replace ! this.ignrWordFlag = "I"; // single ignore ! this.replAllFlag = "RA"; // replace all occurances ! this.ignrAllFlag = "IA"; // ignore all occurances ! this.fromReplAll = "~RA"; // an occurance of a "replace all" word ! this.fromIgnrAll = "~IA"; // an occurance of a "ignore all" word ! // properties set at run time ! this.wordFlags = new Array(); ! this.currentTextIndex = 0; ! this.currentWordIndex = 0; ! this.spellCheckerWin = null; ! this.controlWin = null; ! this.wordWin = null; ! this.textArea = textObject; // deprecated ! this.textInputs = arguments; ! ! // private methods ! this._spellcheck = _spellcheck; ! this._getSuggestions = _getSuggestions; ! this._setAsIgnored = _setAsIgnored; ! this._getTotalReplaced = _getTotalReplaced; ! this._setWordText = _setWordText; ! this._getFormInputs = _getFormInputs; ! ! // public methods ! this.openChecker = openChecker; ! this.startCheck = startCheck; ! this.checkTextBoxes = checkTextBoxes; ! this.checkTextAreas = checkTextAreas; ! this.spellCheckAll = spellCheckAll; ! this.ignoreWord = ignoreWord; ! this.ignoreAll = ignoreAll; ! this.replaceWord = replaceWord; ! this.replaceAll = replaceAll; ! this.terminateSpell = terminateSpell; ! this.undo = undo; ! ! // set the current window's "speller" property to the instance of this class. ! // this object can now be referenced by child windows/frames. ! window.speller = this; ! } ! ! // call this method to check all text boxes (and only text boxes) in the HTML document ! function checkTextBoxes() { ! this.textInputs = this._getFormInputs( "^text$" ); ! this.openChecker(); ! } ! ! // call this method to check all textareas (and only textareas ) in the HTML document ! function checkTextAreas() { ! this.textInputs = this._getFormInputs( "^textarea$" ); ! this.openChecker(); ! } ! ! // call this method to check all text boxes and textareas in the HTML document ! function spellCheckAll() { ! this.textInputs = this._getFormInputs( "^text(area)?$" ); ! this.openChecker(); ! } ! ! // call this method to check text boxe(s) and/or textarea(s) that were passed in to the ! // object's constructor or to the textInputs property ! function openChecker() { ! this.spellCheckerWin = window.open( this.popUpUrl, this.popUpName, this.popUpProps ); ! if( !this.spellCheckerWin.opener ) { ! this.spellCheckerWin.opener = window; ! } ! } ! ! function startCheck( wordWindowObj, controlWindowObj ) { ! ! // set properties from args ! this.wordWin = wordWindowObj; ! this.controlWin = controlWindowObj; ! ! // reset properties ! this.wordWin.resetForm(); ! this.controlWin.resetForm(); ! this.currentTextIndex = 0; ! this.currentWordIndex = 0; ! // initialize the flags to an array - one element for each text input ! this.wordFlags = new Array( this.wordWin.textInputs.length ); ! // each element will be an array that keeps track of each word in the text ! for( var i=0; i<this.wordFlags.length; i++ ) { ! this.wordFlags[i] = []; ! } ! ! // start ! this._spellcheck(); ! ! return true; ! } ! ! function ignoreWord() { ! var wi = this.currentWordIndex; ! var ti = this.currentTextIndex; ! if( !this.wordWin ) { ! alert( 'Error: Word frame not available.' ); ! return false; ! } ! if( !this.wordWin.getTextVal( ti, wi )) { ! alert( 'Error: "Not in dictionary" text is missing.' ); ! return false; ! } ! // set as ignored ! if( this._setAsIgnored( ti, wi, this.ignrWordFlag )) { ! this.currentWordIndex++; ! this._spellcheck(); ! } ! } ! ! function ignoreAll() { ! var wi = this.currentWordIndex; ! var ti = this.currentTextIndex; ! if( !this.wordWin ) { ! alert( 'Error: Word frame not available.' ); ! return false; ! } ! // get the word that is currently being evaluated. ! var s_word_to_repl = this.wordWin.getTextVal( ti, wi ); ! if( !s_word_to_repl ) { ! alert( 'Error: "Not in dictionary" text is missing' ); ! return false; ! } ! ! // set this word as an "ignore all" word. ! this._setAsIgnored( ti, wi, this.ignrAllFlag ); ! ! // loop through all the words after this word ! for( var i = ti; i < this.wordWin.textInputs.length; i++ ) { ! for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) { ! if(( i == ti && j > wi ) || i > ti ) { ! // future word: set as "from ignore all" if ! // 1) do not already have a flag and ! // 2) have the same value as current word ! if(( this.wordWin.getTextVal( i, j ) == s_word_to_repl ) ! && ( !this.wordFlags[i][j] )) { ! this._setAsIgnored( i, j, this.fromIgnrAll ); ! } ! } ! } ! } ! ! // finally, move on ! this.currentWordIndex++; ! this._spellcheck(); ! } ! ! function replaceWord() { ! var wi = this.currentWordIndex; ! var ti = this.currentTextIndex; ! if( !this.wordWin ) { ! alert( 'Error: Word frame not available.' ); ! return false; ! } ! if( !this.wordWin.getTextVal( ti, wi )) { ! alert( 'Error: "Not in dictionary" text is missing' ); ! return false; ! } ! if( !this.controlWin.replacementText ) { ! return; ! } ! var txt = this.controlWin.replacementText; ! if( txt.value ) { ! var newspell = new String( txt.value ); ! if( this._setWordText( ti, wi, newspell, this.replWordFlag )) { ! this.currentWordIndex++; ! this._spellcheck(); ! } ! } ! } ! ! function replaceAll() { ! var ti = this.currentTextIndex; ! var wi = this.currentWordIndex; ! if( !this.wordWin ) { ! alert( 'Error: Word frame not available.' ); ! return false; ! } ! var s_word_to_repl = this.wordWin.getTextVal( ti, wi ); ! if( !s_word_to_repl ) { ! alert( 'Error: "Not in dictionary" text is missing' ); ! return false; ! } ! var txt = this.controlWin.replacementText; ! if( !txt.value ) return; ! var newspell = new String( txt.value ); ! ! // set this word as a "replace all" word. ! this._setWordText( ti, wi, newspell, this.replAllFlag ); ! ! // loop through all the words after this word ! for( var i = ti; i < this.wordWin.textInputs.length; i++ ) { ! for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) { ! if(( i == ti && j > wi ) || i > ti ) { ! // future word: set word text to s_word_to_repl if ! // 1) do not already have a flag and ! // 2) have the same value as s_word_to_repl ! if(( this.wordWin.getTextVal( i, j ) == s_word_to_repl ) ! && ( !this.wordFlags[i][j] )) { ! this._setWordText( i, j, newspell, this.fromReplAll ); ! } ! } ! } ! } ! ! // finally, move on ! this.currentWordIndex++; ! this._spellcheck(); ! } ! ! function terminateSpell() { ! // called when we have reached the end of the spell checking. ! var msg = ""; // by FredCK ! var numrepl = this._getTotalReplaced(); ! if( numrepl == 0 ) { ! // see if there were no misspellings to begin with ! if( !this.wordWin ) { ! msg = ""; ! } else { ! if( this.wordWin.totalMisspellings() ) { ! // msg += "No words changed."; // by FredCK ! msg += FCKLang.DlgSpellNoChanges ; // by FredCK ! } else { ! // msg += "No misspellings found."; // by FredCK ! msg += FCKLang.DlgSpellNoMispell ; // by FredCK ! } ! } ! } else if( numrepl == 1 ) { ! // msg += "One word changed."; // by FredCK ! msg += FCKLang.DlgSpellOneChange ; // by FredCK ! } else { ! // msg += numrepl + " words changed."; // by FredCK ! msg += FCKLang.DlgSpellManyChanges.replace( /%1/g, numrepl ) ; ! } ! if( msg ) { ! // msg += "\n"; // by FredCK ! alert( msg ); ! } ! ! if( numrepl > 0 ) { ! // update the text field(s) on the opener window ! for( var i = 0; i < this.textInputs.length; i++ ) { ! // this.textArea.value = this.wordWin.text; ! if( this.wordWin ) { ! if( this.wordWin.textInputs[i] ) { ! this.textInputs[i].value = this.wordWin.textInputs[i]; ! } ! } ! } ! } ! ! // return back to the calling window ! // this.spellCheckerWin.close(); // by FredCK ! if ( typeof( this.OnFinished ) == 'function' ) // by FredCK ! this.OnFinished(numrepl) ; // by FredCK ! ! return true; ! } ! ! function undo() { ! // skip if this is the first word! ! var ti = this.currentTextIndex; ! var wi = this.currentWordIndex ! ! if( this.wordWin.totalPreviousWords( ti, wi ) > 0 ) { ! this.wordWin.removeFocus( ti, wi ); ! ! // go back to the last word index that was acted upon ! do { ! // if the current word index is zero then reset the seed ! if( this.currentWordIndex == 0 && this.currentTextIndex > 0 ) { ! this.currentTextIndex--; ! this.currentWordIndex = this.wordWin.totalWords( this.currentTextIndex )-1; ! if( this.currentWordIndex < 0 ) this.currentWordIndex = 0; ! } else { ! if( this.currentWordIndex > 0 ) { ! this.currentWordIndex--; ! } ! } ! } while ( ! this.wordWin.totalWords( this.currentTextIndex ) == 0 ! || this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromIgnrAll ! || this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromReplAll ! ); ! ! var text_idx = this.currentTextIndex; ! var idx = this.currentWordIndex; ! var preReplSpell = this.wordWin.originalSpellings[text_idx][idx]; ! ! // if we got back to the first word then set the Undo button back to disabled ! if( this.wordWin.totalPreviousWords( text_idx, idx ) == 0 ) { ! this.controlWin.disableUndo(); ! } ! ! // examine what happened to this current word. ! switch( this.wordFlags[text_idx][idx] ) { ! // replace all: go through this and all the future occurances of the word ! // and revert them all to the original spelling and clear their flags ! case this.replAllFlag : ! for( var i = text_idx; i < this.wordWin.textInputs.length; i++ ) { ! for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) { ! if(( i == text_idx && j >= idx ) || i > text_idx ) { ! var origSpell = this.wordWin.originalSpellings[i][j]; ! if( origSpell == preReplSpell ) { ! this._setWordText ( i, j, origSpell, undefined ); ! } ! } ! } ! } ! break; ! ! // ignore all: go through all the future occurances of the word ! // and clear their flags ! case this.ignrAllFlag : ! for( var i = text_idx; i < this.wordWin.textInputs.length; i++ ) { ! for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) { ! if(( i == text_idx && j >= idx ) || i > text_idx ) { ! var origSpell = this.wordWin.originalSpellings[i][j]; ! if( origSpell == preReplSpell ) { ! this.wordFlags[i][j] = undefined; ! } ! } ! } ! } ! break; ! ! // replace: revert the word to its original spelling ! case this.replWordFlag : ! this._setWordText ( text_idx, idx, preReplSpell, undefined ); ! break; ! } ! ! // For all four cases, clear the wordFlag of this word. re-start the process ! this.wordFlags[text_idx][idx] = undefined; ! this._spellcheck(); ! } ! } ! ! function _spellcheck() { ! var ww = this.wordWin; ! ! // check if this is the last word in the current text element ! if( this.currentWordIndex == ww.totalWords( this.currentTextIndex) ) { ! this.currentTextIndex++; ! this.currentWordIndex = 0; ! // keep going if we're not yet past the last text element ! if( this.currentTextIndex < this.wordWin.textInputs.length ) { ! this._spellcheck(); ! return; ! } else { ! this.terminateSpell(); ! return; ! } ! } ! ! // if this is after the first one make sure the Undo button is enabled ! if( this.currentWordIndex > 0 ) { ! this.controlWin.enableUndo(); ! } ! ! // skip the current word if it has already been worked on ! if( this.wordFlags[this.currentTextIndex][this.currentWordIndex] ) { ! // increment the global current word index and move on. ! this.currentWordIndex++; ! this._spellcheck(); ! } else { ! var evalText = ww.getTextVal( this.currentTextIndex, this.currentWordIndex ); ! if( evalText ) { ! this.controlWin.evaluatedText.value = evalText; ! ww.setFocus( this.currentTextIndex, this.currentWordIndex ); ! this._getSuggestions( this.currentTextIndex, this.currentWordIndex ); ! } ! } ! } ! ! function _getSuggestions( text_num, word_num ) { ! this.controlWin.clearSuggestions(); ! // add suggestion in list for each suggested word. ! // get the array of suggested words out of the ! // three-dimensional array containing all suggestions. ! var a_suggests = this.wordWin.suggestions[text_num][word_num]; ! if( a_suggests ) { ! // got an array of suggestions. ! for( var ii = 0; ii < a_suggests.length; ii++ ) { ! this.controlWin.addSuggestion( a_suggests[ii] ); ! } ! } ! this.controlWin.selectDefaultSuggestion(); ! } ! ! function _setAsIgnored( text_num, word_num, flag ) { ! // set the UI ! this.wordWin.removeFocus( text_num, word_num ); ! // do the bookkeeping ! this.wordFlags[text_num][word_num] = flag; ! return true; ! } ! ! function _getTotalReplaced() { ! var i_replaced = 0; ! for( var i = 0; i < this.wordFlags.length; i++ ) { ! for( var j = 0; j < this.wordFlags[i].length; j++ ) { ! if(( this.wordFlags[i][j] == this.replWordFlag ) ! || ( this.wordFlags[i][j] == this.replAllFlag ) ! || ( this.wordFlags[i][j] == this.fromReplAll )) { ! i_replaced++; ! } ! } ! } ! return i_replaced; ! } ! ! function _setWordText( text_num, word_num, newText, flag ) { ! // set the UI and form inputs ! this.wordWin.setText( text_num, word_num, newText ); ! // keep track of what happened to this word: ! this.wordFlags[text_num][word_num] = flag; ! return true; ! } ! ! function _getFormInputs( inputPattern ) { ! var inputs = new Array(); ! for( var i = 0; i < document.forms.length; i++ ) { ! for( var j = 0; j < document.forms[i].elements.length; j++ ) { ! if( document.forms[i].elements[j].type.match( inputPattern )) { ! inputs[inputs.length] = document.forms[i].elements[j]; ! } ! } ! } ! return inputs; ! } ! Index: controls.html =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controls.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** controls.html 1 Sep 2005 19:05:04 -0000 1.1 --- controls.html 29 Sep 2005 19:49:18 -0000 1.2 *************** *** 3,75 **** <link rel="stylesheet" type="text/css" href="spellerStyle.css" /> <script src="controlWindow.js"></script> ! <script> ! var spellerObject; ! var controlWindowObj; ! ! if( parent.opener ) { ! spellerObject = parent.opener.speller; ! } ! ! function ignore_word() { ! if( spellerObject ) { ! spellerObject.ignoreWord(); ! } ! } ! ! function ignore_all() { ! if( spellerObject ) { ! spellerObject.ignoreAll(); ! } ! } ! ! function replace_word() { ! if( spellerObject ) { ! spellerObject.replaceWord(); ! } ! } ! ! function replace_all() { ! if( spellerObject ) { ! spellerObject.replaceAll(); ! } ! } ! ! function end_spell() { ! if( spellerObject ) { ! spellerObject.terminateSpell(); ! } ! } ! ! function undo() { ! if( spellerObject ) { ! spellerObject.undo(); ! } ! } ! ! function suggText() { ! if( controlWindowObj ) { ! controlWindowObj.setSuggestedText(); ! } ! } ! ! var FCKLang = window.parent.parent.FCKLang ; // by FredCK ! ! function init_spell() { ! // By FredCK (fckLang attributes have been added to the HTML source of this page) ! window.parent.parent.OnSpellerControlsLoad( this ) ; ! ! var controlForm = document.spellcheck; ! ! // create a new controlWindow object ! controlWindowObj = new controlWindow( controlForm ); ! ! // call the init_spell() function in the parent frameset ! if( parent.frames.length ) { ! parent.init_spell( controlWindowObj ); ! } else { ! alert( 'This page was loaded outside of a frameset. It might not display properly' ); ! } ! } ! </script> </head> --- 3,75 ---- <link rel="stylesheet" type="text/css" href="spellerStyle.css" /> <script src="controlWindow.js"></script> ! <script> ! var spellerObject; ! var controlWindowObj; ! ! if( parent.opener ) { ! spellerObject = parent.opener.speller; ! } ! ! function ignore_word() { ! if( spellerObject ) { ! spellerObject.ignoreWord(); ! } ! } ! ! function ignore_all() { ! if( spellerObject ) { ! spellerObject.ignoreAll(); ! } ! } ! ! function replace_word() { ! if( spellerObject ) { ! spellerObject.replaceWord(); ! } ! } ! ! function replace_all() { ! if( spellerObject ) { ! spellerObject.replaceAll(); ! } ! } ! ! function end_spell() { ! if( spellerObject ) { ! spellerObject.terminateSpell(); ! } ! } ! ! function undo() { ! if( spellerObject ) { ! spellerObject.undo(); ! } ! } ! ! function suggText() { ! if( controlWindowObj ) { ! controlWindowObj.setSuggestedText(); ! } ! } ! ! var FCKLang = window.parent.parent.FCKLang ; // by FredCK ! ! function init_spell() { ! // By FredCK (fckLang attributes have been added to the HTML source of this page) ! window.parent.parent.OnSpellerControlsLoad( this ) ; ! ! var controlForm = document.spellcheck; ! ! // create a new controlWindow object ! controlWindowObj = new controlWindow( controlForm ); ! ! // call the init_spell() function in the parent frameset ! if( parent.frames.length ) { ! parent.init_spell( controlWindowObj ); ! } else { ! alert( 'This page was loaded outside of a frameset. It might not display properly' ); ! } ! } ! </script> </head> *************** *** 139,145 **** </td> <td> </td> ! <td> ! <!-- by FredCK ! <input class="buttonDefault" type="button" value="Close" onClick="end_spell();"> --> </td> --- 139,145 ---- </td> <td> </td> ! <td> ! <!-- by FredCK ! <input class="buttonDefault" type="button" value="Close" onClick="end_spell();"> --> </td> Index: wordWindow.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/dialog/fck_spellerpages/spellerpages/wordWindow.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wordWindow.js 1 Sep 2005 19:05:04 -0000 1.1 --- wordWindow.js 29 Sep 2005 19:49:18 -0000 1.2 *************** *** 1,271 **** ! //////////////////////////////////////////////////// ! // wordWindow object ! //////////////////////////////////////////////////// ! function wordWindow() { ! // private properties ! this._forms = []; ! ! // private methods ! this._getWordObject = _getWordObject; ! //this._getSpellerObject = _getSpellerObject; ! this._wordInputStr = _wordInputStr; ! this._adjustIndexes = _adjustIndexes; ! this._isWordChar = _isWordChar; ! this._lastPos = _lastPos; ! ! // public properties ! this.wordChar = /[a-zA-Z]/; ! this.windowType = "wordWindow"; ! this.originalSpellings = new Array(); ! this.suggestions = new Array(); ! this.checkWordBgColor = "pink"; ! this.normWordBgColor = "white"; ! this.text = ""; ! this.textInputs = new Array(); ! this.indexes = new Array(); ! //this.speller = this._getSpellerObject(); ! ! // public methods ! this.resetForm = resetForm; ! this.totalMisspellings = totalMisspellings; ! this.totalWords = totalWords; ! this.totalPreviousWords = totalPreviousWords; ! //this.getTextObjectArray = getTextObjectArray; ! this.getTextVal = getTextVal; ! this.setFocus = setFocus; ! this.removeFocus = removeFocus; ! this.setText = setText; ! //this.getTotalWords = getTotalWords; ! this.writeBody = writeBody; ! this.printForHtml = printForHtml; ! } ! ! function resetForm() { ! if( this._forms ) { ! for( var i = 0; i < this._forms.length; i++ ) { ! this._forms[i].reset(); ! } ! } ! return true; ! } ! ! function totalMisspellings() { ! var total_words = 0; ! for( var i = 0; i < this.textInputs.length; i++ ) { ! total_words += this.totalWords( i ); ! } ! return total_words; ! } ! ! function totalWords( textIndex ) { ! return this.originalSpellings[textIndex].length; ! } ! ! function totalPreviousWords( textIndex, wordIndex ) { ! var total_words = 0; ! for( var i = 0; i <= textIndex; i++ ) { ! for( var j = 0; j < this.totalWords( i ); j++ ) { ! if( i == textIndex && j == wordIndex ) { ! break; ! } else { ! total_words++; ! } ! } ! } ! return total_words; ! } ! ! //function getTextObjectArray() { ! // return this._form.elements; ! //} ! ! function getTextVal( textIndex, wordIndex ) { ! var word = this._getWordObject( textIndex, wordIndex ); ! if( word ) { ! return word.value; ! } ! } ! ! function setFocus( textIndex, wordIndex ) { ! var word = this._getWordObject( textIndex, wordIndex ); ! if( word ) { ! if( word.type == "text" ) { ! word.focus(); ! word.style.backgroundColor = this.checkWordBgColor; ! } ! } ! } ! ! function removeFocus( textIndex, wordIndex ) { ! var word = this._getWordObject( textIndex, wordIndex ); ! if( word ) { ! if( word.type == "text" ) { ! word.blur(); ! word.style.backgroundColor = this.normWordBgColor; ! } ! } ! } ! ! function setText( textIndex, wordIndex, newText ) { ! var word = this._getWordObject( textIndex, wordIndex ); ! var beginStr; ! var endStr; ! if( word ) { ! var pos = this.indexes[textIndex][wordIndex]; ! var oldText = word.value; ! // update the text given the index of the string ! beginStr = this.textInputs[textIndex].substring( 0, pos ); ! endStr = this.textInputs[textIndex].substring( ! pos + oldText.length, ! this.textInputs[textIndex].length ! ); ! this.textInputs[textIndex] = beginStr + newText + endStr; ! ! // adjust the indexes on the stack given the differences in ! // length between the new word and old word. ! var lengthDiff = newText.length - oldText.length; ! this._adjustIndexes( textIndex, wordIndex, lengthDiff ); ! ! word.size = newText.length; ! word.value = newText; ! this.removeFocus( textIndex, wordIndex ); ! } ! } ! ! ! function writeBody() { ! var d = window.document; ! var is_html = false; ! ! d.open(); ! ! // iterate through each text input. ! for( var txtid = 0; txtid < this.textInputs.length; txtid++ ) { ! var end_idx = 0; ! var begin_idx = 0; ! d.writeln( '<form name="textInput'+txtid+'">' ); ! var wordtxt = this.textInputs[txtid]; ! this.indexes[txtid] = []; ! ! if( wordtxt ) { ! var orig = this.originalSpellings[txtid]; ! if( !orig ) break; ! ! //!!! plain text, or HTML mode? ! d.writeln( '<div class="plainText">' ); ! // iterate through each occurrence of a misspelled word. ! for( var i = 0; i < orig.length; i++ ) { ! // find the position of the current misspelled word, ! // starting at the last misspelled word. ! // and keep looking if it's a substring of another word ! do { ! begin_idx = wordtxt.indexOf( orig[i], end_idx ); ! end_idx = begin_idx + orig[i].length; ! // word not found? messed up! ! if( begin_idx == -1 ) break; ! // look at the characters immediately before and after ! // the word. If they are word characters we'll keep looking. ! var before_char = wordtxt.charAt( begin_idx - 1 ); ! var after_char = wordtxt.charAt( end_idx ); ! } while ( ! this._isWordChar( before_char ) ! || this._isWordChar( after_char ) ! ); ! ! // keep track of its position in the original text. ! this.indexes[txtid][i] = begin_idx; ! ! // write out the characters before the current misspelled word ! for( var j = this._lastPos( txtid, i ); j < begin_idx; j++ ) { ! // !!! html mode? make it html compatible ! d.write( this.printForHtml( wordtxt.charAt( j ))); ! } ! ! // write out the misspelled word. ! d.write( this._wordInputStr( orig[i] )); ! ! // if it's the last word, write out the rest of the text ! if( i == orig.length-1 ){ ! d.write( printForHtml( wordtxt.substr( end_idx ))); ! } ! } ! ! d.writeln( '</div>' ); ! ! } ! d.writeln( '</form>' ); ! } ! //for ( var j = 0; j < d.forms.length; j++ ) { ! // alert( d.forms[j].name ); ! // for( var k = 0; k < d.forms[j].elements.length; k++ ) { ! // alert( d.forms[j].elements[k].name + ": " + d.forms[j].elements[k].value ); ! // } ! //} ! ! // set the _forms property ! this._forms = d.forms; ! d.close(); ! } ! ! // return the character index in the full text after the last word we evaluated ! function _lastPos( txtid, idx ) { ! if( idx > 0 ) ! return this.indexes[txtid][idx-1] + this.originalSpellings[txtid][idx-1].length; ! else ! return 0; ! } ! ! function printForHtml( n ) { ! return n ; // by FredCK ! ! var htmlstr = n; ! if( htmlstr.length == 1 ) { ! // do simple case statement if it's just one character ! switch ( n ) { ! case "\n": ! htmlstr = '<br/>'; ! break; ! case "<": ! htmlstr = '<'; ! break; ! case ">": ! htmlstr = '>'; ! break; ! } ! return htmlstr; ! } else { ! htmlstr = htmlstr.replace( /</g, '<' ); ! htmlstr = htmlstr.replace( />/g, '>' ); ! htmlstr = htmlstr.replace( /\n/g, '<br/>' ); ! return htmlstr; ! } ! } ! ! function _isWordChar( letter ) { ! if( letter.search( this.wordChar ) == -1 ) { ! return false; ! } else { ! return true; ! } ! } ! ! function _getWordObject( textIndex, wordIndex ) { ! if( this._forms[textIndex] ) { ! if( this._forms[textIndex].elements[wordIndex] ) { ! return this._forms[textIndex].elements[wordIndex]; ! } ! } ! return null; ! } ! ! function _wordInputStr( word ) { ! var str = '<input readonly '; ! str += 'class="blend" type="text" value="' + word + '" size="' + word.length + '">'; ! return str; ! } ! ! function _adjustIndexes( textIndex, wordIndex, lengthDiff ) { ! for( var i = wordIndex + 1; i < this.originalSpellings[textIndex].length; i++ ) { ! this.indexes[textIndex][i] = this.indexes[textIndex][i] + lengthDiff; ! } ! } --- 1,271 ---- ! //////////////////////////////////////////////////// ! // wordWindow object ! //////////////////////////////////////////////////// ! function wordWindow() { ! // private properties ! this._forms = []; ! ! // private methods ! this._getWordObject = _getWordObject; ! //this._getSpellerObject = _getSpellerObject; ! this._wordInputStr = _wordInputStr; ! this._adjustIndexes = _adjustIndexes; ! this._isWordChar = _isWordChar; ! this._lastPos = _lastPos; ! ! // public properties ! this.wordChar = /[a-zA-Z]/; ! this.windowType = "wordWindow"; ! this.originalSpellings = new Array(); ! this.suggestions = new Array(); ! this.checkWordBgColor = "pink"; ! this.normWordBgColor = "white"; ! this.text = ""; ! this.textInputs = new Array(); ! this.indexes = new Array(); ! //this.speller = this._getSpellerObject(); ! ! // public methods ! this.resetForm = resetForm; ! this.totalMisspellings = totalMisspellings; ! this.totalWords = totalWords; ! this.totalPreviousWords = totalPreviousWords; ! //this.getTextObjectArray = getTextObjectArray; ! this.getTextVal = getTextVal; ! this.setFocus = setFocus; ! this.removeFocus = removeFocus; ! this.setText = setText; ! //this.getTotalWords = getTotalWords; ! this.writeBody = writeBody; ! this.printForHtml = printForHtml; ! } ! ! function resetForm() { ! if( this._forms ) { ! for( var i = 0; i < this._forms.length; i++ ) { ! this._forms[i].reset(); ! } ! } ! return true; ! } ! ! function totalMisspellings() { ! var total_words = 0; ! for( var i = 0; i < this.textInputs.length; i++ ) { ! total_words += this.totalWords( i ); ! } ! return total_words; ! } ! ! function totalWords( textIndex ) { ! return this.originalSpellings[textIndex].length; ! } ! ! function totalPreviousWords( textIndex, wordIndex ) { ! var total_words = 0; ! for( var i = 0; i <= textIndex; i++ ) { ! for( var j = 0; j < this.totalWords( i ); j++ ) { ! if( i == textIndex && j == wordIndex ) { ! break; ! } else { ! total_words++; ! } ! } ! } ! return total_words; ! } ! ! //function getTextObjectArray() { ! // return this._form.elements; ! //} ! ! function getTextVal( textIndex, wordIndex ) { ! var word = this._getWordObject( textIndex, wordIndex ); ! if( word ) { ! return word.value; ! } ! } ! ! function setFocus( textIndex, wordIndex ) { ! var word = this._getWordObject( textIndex, wordIndex ); ! if( word ) { ! if( word.type == "text" ) { ! word.focus(); ! word.style.backgroundColor = this.checkWordBgColor; ! } ! } ! } ! ! function removeFocus( textIndex, wordIndex ) { ! var word = this._getWordObject( textIndex, wordIndex ); ! if( word ) { ! if( word.type == "text" ) { ! word.blur(); ! word.style.backgroundColor = this.normWordBgColor; ! } ! } ! } ! ! function setText( textIndex, wordIndex, newText ) { ! var word = this._getWordObject( textIndex, wordIndex ); ! var beginStr; ! var endStr; ! if( word ) { ! var pos = this.indexes[textIndex][wordIndex]; ! var oldText = word.value; ! // update the text given the index of the string ! beginStr = this.textInputs[textIndex].substring( 0, pos ); ! endStr = this.textInputs[textIndex].substring( ! pos + oldText.length, ! this.textInputs[textIndex].length ! ); ! this.textInputs[textIndex] = beginStr + newText + endStr; ! ! // adjust the indexes on the stack given the differences in ! // length between the new word and old word. ! var lengthDiff = newText.length - oldText.length; ! this._adjustIndexes( textIndex, wordIndex, lengthDiff ); ! ! word.size = newText.length; ! word.value = newText; ! this.removeFocus( textIndex, wordIndex ); ! } ! } ! ! ! function writeBody() { ! var d = window.document; ! var is_html = false; ! ! d.open(); ! ! // iterate through each text input. ! for( var txtid = 0; txtid < this.textInputs.length; txtid++ ) { ! var end_idx = 0; ! var begin_idx = 0; ! d.writeln( '<form name="textInput'+txtid+'">' ); ! var wordtxt = this.textInputs[txtid]; ! this.indexes[txtid] = []; ! ! if( wordtxt ) { ! var orig = this.originalSpellings[txtid]; ! if( !orig ) break; ! ! //!!! plain text, or HTML mode? ! d.writeln( '<div class="plainText">' ); ! // iterate through each occurrence of a misspelled word. ! for( var i = 0; i < orig.length; i++ ) { ! // find the position of the current misspelled word, ! // starting at the last misspelled word. ! // and keep looking if it's a substring of another word ! do { ! begin_idx = wordtxt.indexOf( orig[i], end_idx ); ! end_idx = begin_idx + orig[i].length; ! // word not found? messed up! ! if( begin_idx == -1 ) break; ! // look at the characters immediately before and after ! // the word. If they are word characters we'll keep looking. ! var before_char = wordtxt.charAt( begin_idx - 1 ); ! var after_char = wordtxt.charAt( end_idx ); ! } while ( ! this._isWordChar( before_char ) ! || this._isWordChar( after_char ) ! ); ! ! // keep track of its position in the original text. ! this.indexes[txtid][i] = begin_idx; ! ! // write out the characters before the current misspelled word ! for( var j = this._lastPos( txtid, i ); j < begin_idx; j++ ) { ! // !!! html mode? make it html compatible ! d.write( this.printForHtml( wordtxt.charAt( j ))); ! } ! ! // write out the misspelled word. ! d.write( this._wordInputStr( orig[i] )); ! ! // if it's the last word, write out the rest of the text ! if( i == orig.length-1 ){ ! d.write( printForHtml( wordtxt.substr( end_idx ))); ! } ! } ! ! d.writeln( '</div>' ); ! ! } ! d.writeln( '</form>' ); ! } ! //for ( var j = 0; j < d.forms.length; j++ ) { ! // alert( d.forms[j].name ); ! // for( var k = 0; k < d.forms[j].elements.length; k++ ) { ! // alert( d.forms[j].elements[k].name + ": " + d.forms[j].elements[k].value ); ! // } ! //} ! ! // set the _forms property ! this._forms = d.forms; ! d.close(); ! } ! ! // return the character index in the full text after the last word we evaluated ! function _lastPos( txtid, idx ) { ! if( idx > 0 ) ! return this.indexes[txtid][idx-1] + this.originalSpellings[txtid][idx-1].length; ! else ! return 0; ! } ! ! function printForHtml( n ) { ! return n ; // by FredCK ! ! var htmlstr = n; ! if( htmlstr.length == 1 ) { ! // do simple case statement if it's just one character ! switch ( n ) { ! case "\n": ! htmlstr = '<br/>'; ! break; ! case "<": ! htmlstr = '<'; ! break; ! case ">": ! htmlstr = '>'; ! break; ! } ! return htmlstr; ! } else { ! htmlstr = htmlstr.replace( /</g, '<' ); ! htmlstr = htmlstr.replace( />/g, '>' ); ! htmlstr = htmlstr.replace( /\n/g, '<br/>' ); ! return htmlstr; ! } ! } ! ! function _isWordChar( letter ) { ! if( letter.search( this.wordChar ) == -1 ) { ! return false; ! } else { ! return true; ! } ! } ! ! function _getWordObject( textIndex, wordIndex ) { ! if( this._forms[textIndex] ) { ! if( this._forms[textIndex].elements[wordIndex] ) { ! return this._forms[textIndex].elements[wordIndex]; ! } ! } ! return null; ! } ! ! function _wordInputStr( word ) { ! var str = '<input readonly '; ! str += 'class="blend" type="text" value="' + word + '" size="' + word.length + '">'; ! return str; ! } ! ! function _adjustIndexes( textIndex, wordIndex, lengthDiff ) { ! for( var i = wordIndex + 1; i < this.originalSpellings[textIndex].length; i++ ) { ! this.indexes[textIndex][i] = this.indexes[textIndex][i] + lengthDiff; ! } ! } Index: spellerStyle.css =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** spellerStyle.css 1 Sep 2005 19:05:04 -0000 1.1 --- spellerStyle.css 29 Sep 2005 19:49:18 -0000 1.2 *************** *** 1,49 **** ! .blend { ! font-family: courier new; ! font-size: 10pt; ! border: 0; ! margin-bottom:-1; ! } ! .normalLabel { ! font-size:8pt; ! } ! .normalText { ! font-family:arial, helvetica, sans-serif; ! font-size:10pt; ! color:000000; ! background-color:FFFFFF; ! } ! .plainText { ! font-family: courier new, courier, monospace; ! font-size: 10pt; ! color:000000; ! background-color:FFFFFF; ! } ! .controlWindowBody { ! font-family:arial, helvetica, sans-serif; ! font-size:8pt; ! padding: 7px ; /* by FredCK */ ! margin: 0px ; /* by FredCK */ ! /* color:000000; by FredCK */ ! /* background-color:DADADA; by FredCK */ ! } ! .readonlyInput { ! background-color:DADADA; ! color:000000; ! font-size:8pt; ! width:392px; ! } ! .textDefault { ! font-size:8pt; ! width: 200px; ! } ! .buttonDefault { ! width:90px; ! height:22px; ! font-size:8pt; ! } ! .suggSlct { ! width:200px; ! margin-top:2; ! font-size:8pt; } \ No newline at end of file --- 1,49 ---- ! .blend { ! font-family: courier new; ! font-size: 10pt; ! border: 0; ! margin-bottom:-1; ! } ! .normalLabel { ! font-size:8pt; ! } ! .normalText { ! font-family:arial, helvetica, sans-serif; ! font-size:10pt; ! color:000000; ! background-color:FFFFFF; ! } ! .plainText { ! font-family: courier new, courier, monospace; ! font-size: 10pt; ! color:000000; ! background-color:FFFFFF; ! } ! .controlWindowBody { ! font-family:arial, helvetica, sans-serif; ! font-size:8pt; ! padding: 7px ; /* by FredCK */ ! margin: 0px ; /* by FredCK */ ! /* color:000000; by FredCK */ ! /* background-color:DADADA; by FredCK */ ! } ! .readonlyInput { ! background-color:DADADA; ! color:000000; ! font-size:8pt; ! width:392px; ! } ! .textDefault { ! font-size:8pt; ! width: 200px; ! } ! .buttonDefault { ! width:90px; ! height:22px; ! font-size:8pt; ! } ! .suggSlct { ! width:200px; ! margin-top:2; ! font-size:8pt; } \ No newline at end of file Index: spellchecker.html =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** spellchecker.html 1 Sep 2005 19:05:04 -0000 1.1 --- spellchecker.html 29 Sep 2005 19:49:18 -0000 1.2 *************** *** 1,71 **** ! ! <script> ! ! var wordWindow = null; ! var controlWindow = null; ! ! function init_spell( spellerWindow ) { ! ! if( spellerWindow ) { ! if( spellerWindow.windowType == "wordWindow" ) { ! wordWindow = spellerWindow; ! } else if ( spellerWindow.windowType == "controlWindow" ) { ! controlWindow = spellerWindow; ! } ! } ! ! if( controlWindow && wordWindow ) { ! // populate the speller object and start it off! ! var speller = opener.speller; ! wordWindow.speller = speller; ! speller.startCheck( wordWindow, controlWindow ); ! } ! } ! ! // encodeForPost ! function encodeForPost( str ) { ! var s = new String( str ); ! s = encodeURIComponent( s ); ! // additionally encode single quotes to evade any PHP ! // magic_quotes_gpc setting (it inserts escape characters and ! // therefore skews the btye positions of misspelled words) ! return s.replace( /\'/g, '%27' ); ! } ! ! // post the text area data to the script that populates the speller ! function postWords() { ! var bodyDoc = window.frames[0].document; ! bodyDoc.open(); ! bodyDoc.write('<html>'); ! bodyDoc.write('<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'); ! bodyDoc.write('<link rel="stylesheet" type="text/css" href="spellerStyle.css"/>'); ! if (opener) { ! var speller = opener.speller; ! bodyDoc.write('<body class="normalText" onLoad="document.forms[0].submit();">'); ! bodyDoc.write('<p>' + window.parent.FCKLang.DlgSpellProgress + '</p>'); // by FredCK ! bodyDoc.write('<form action="'+speller.spellCheckScript+'" method="post">'); ! for( var i = 0; i < speller.textInputs.length; i++ ) { ! bodyDoc.write('<input type="hidden" name="textinputs[]" value="'+encodeForPost(speller.textInputs[i].value)+'">'); ! } ! bodyDoc.write('</form>'); ! bodyDoc.write('</body>'); ! } else { ! bodyDoc.write('<body class="normalText">'); ! bodyDoc.write('<p><b>This page cannot be displayed</b></p><p>The window was not opened from another window.</p>'); ! bodyDoc.write('</body>'); ! } ! bodyDoc.write('</html>'); ! bodyDoc.close(); ! } ! </script> ! ! <html> ! <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> ! <head> ! <title>Speller Pages</title> ! </head> ! <frameset rows="*,201" onLoad="postWords();"> ! <frame src="blank.html"> ! <frame src="controls.html"> ! </frameset> ! </html> --- 1,71 ---- ! ! <script> ! ! var wordWindow = null; ! var controlWindow = null; ! ! function init_spell( spellerWindow ) { ! ! if( spellerWindow ) { ! if( spellerWindow.windowType == "wordWindow" ) { ! wordWindow = spellerWindow; ! } else if ( spellerWindow.windowType == "controlWindow" ) { ! controlWindow = spellerWindow; ! } ! } ! ! if( controlWindow && wordWindow ) { ! // populate the speller object and start it off! ! var speller = opener.speller; ! wordWindow.speller = speller; ! speller.startCheck( wordWindow, controlWindow ); ! } ! } ! ! // encodeForPost ! function encodeForPost( str ) { ! var s = new String( str ); ! s = encodeURIComponent( s ); ! // additionally encode single quotes to evade any PHP ! // magic_quotes_gpc setting (it inserts escape characters and ! // therefore skews the btye positions of misspelled words) ! return s.replace( /\'/g, '%27' ); ! } ! ! // post the text area data to the script that populates the speller ! function postWords() { ! var bodyDoc = window.frames[0].document; ! bodyDoc.open(); ! bodyDoc.write('<html>'); ! bodyDoc.write('<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'); ! bodyDoc.write('<link rel="stylesheet" type="text/css" href="spellerStyle.css"/>'); ! if (opener) { ! var speller = opener.speller; ! bodyDoc.write('<body class="normalText" onLoad="document.forms[0].submit();">'); ! bodyDoc.write('<p>' + window.parent.FCKLang.DlgSpellProgress + '<\/p>'); // by FredCK ! bodyDoc.write('<form action="'+speller.spellCheckScript+'" method="post">'); ! for( var i = 0; i < speller.textInputs.length; i++ ) { ! bodyDoc.write('<input type="hidden" name="textinputs[]" value="'+encodeForPost(speller.textInputs[i].value)+'">'); ! } ! bodyDoc.write('<\/form>'); ! bodyDoc.write('<\/body>'); ! } else { ! bodyDoc.write('<body class="normalText">'); ! bodyDoc.write('<p><b>This page cannot be displayed<\/b><\/p><p>The window was not opened from another window.<\/p>'); ! bodyDoc.write('<\/body>'); ! } ! bodyDoc.write('<\/html>'); ! bodyDoc.close(); ! } ! </script> ! ! <html> ! <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> ! <head> ! <title>Speller Pages</title> ! </head> ! <frameset rows="*,201" onLoad="postWords();"> ! <frame src="blank.html"> ! <frame src="controls.html"> ! </frameset> ! </html> Index: controlWindow.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** controlWindow.js 1 Sep 2005 19:05:04 -0000 1.1 --- controlWindow.js 29 Sep 2005 19:49:18 -0000 1.2 *************** *** 1,87 **** ! //////////////////////////////////////////////////// ! // controlWindow object ! //////////////////////////////////////////////////// ! function controlWindow( controlForm ) { ! // private properties ! this._form = controlForm; ! ! // public properties ! this.windowType = "controlWindow"; ! // this.noSuggestionSelection = "- No suggestions -"; // by FredCK ! this.noSuggestionSelection = FCKLang.DlgSpellNoSuggestions ; ! // set up the properties for elements of the given control form ! this.suggestionList = this._form.sugg; ! this.evaluatedText = this._form.misword; ! this.replacementText = this._form.txtsugg; ! this.undoButton = this._form.btnUndo; ! ! // public methods ! this.addSuggestion = addSuggestion; ! this.clearSuggestions = clearSuggestions; ! this.selectDefaultSuggestion = selectDefaultSuggestion; ! this.resetForm = resetForm; ! this.setSuggestedText = setSuggestedText; ! this.enableUndo = enableUndo; ! this.disableUndo = disableUndo; ! } ! ! function resetForm() { ! if( this._form ) { ! this._form.reset(); ! } ! } ! ! function setSuggestedText() { ! var slct = this.suggestionList; ! var txt = this.replacementText; ! var str = ""; ! if( (slct.options[0].text) && slct.options[0].text != this.noSuggestionSelection ) { ! str = slct.options[slct.selectedIndex].text; ! } ! txt.value = str; ! } ! ! function selectDefaultSuggestion() { ! var slct = this.suggestionList; ! var txt = this.replacementText; ! if( slct.options.length == 0 ) { ! this.addSuggestion( this.noSuggestionSelection ); ! } else { ! slct.options[0].selected = true; ! } ! this.setSuggestedText(); ... [truncated message content] |
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/filemanager/browser/default/connectors/perl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/filemanager/browser/default/connectors/perl Modified Files: basexml.pl commands.pl connector.cgi io.pl upload_fck.pl util.pl Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi Index: commands.pl =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/filemanager/browser/default/connectors/perl/commands.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** commands.pl 1 Sep 2005 18:15:43 -0000 1.1 --- commands.pl 29 Sep 2005 19:49:18 -0000 1.2 *************** *** 1,5 **** ! ##### # FCKeditor - The text editor for internet ! # Copyright (C) 2003-2004 Frederico Caldeira Knabben # # Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! ##### # FCKeditor - The text editor for internet ! # Copyright (C) 2003-2005 Frederico Caldeira Knabben # # Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** # This is the File Manager Connector for Perl. # - # Version: 2.0 RC3 - # Modified: 2005-02-28 17:06:07 - # # File Authors: ! # Takashi Yamaguchi (ja...@om...) ! ##### sub GetFolders --- 12,18 ---- # This is the File Manager Connector for Perl. # # File Authors: ! # Takashi Yamaguchi (ja...@om...) ! ##### sub GetFolders Index: connector.cgi =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/filemanager/browser/default/connectors/perl/connector.cgi,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** connector.cgi 1 Sep 2005 18:15:43 -0000 1.1 --- connector.cgi 29 Sep 2005 19:49:18 -0000 1.2 *************** *** 1,92 **** ! #!/usr/bin/env perl ! ! #/* ! # * FCKeditor - The text editor for internet ! # * Copyright (C) 2003-2004 Frederico Caldeira Knabben ! # * ! # * Licensed under the terms of the GNU Lesser General Public License: ! # * http://www.opensource.org/licenses/lgpl-license.php ! # * ! # * For further information visit: ! # * http://www.fckeditor.net/ ! # * ! # * File Name: connector.cgi ! # * This is the File Manager Connector for Perl. ! # * ! # * Version: 2.0 RC2 ! # * Modified: 2005-01-7 13:20:00 ! # * ! # * File Authors: ! # * Frederico Caldeira Knabben (fr...@fc...) ! # * Takashi Yamaguchi (ja...@om...) ! # */ ! ! require 'util.pl'; ! require 'io.pl'; ! require 'basexml.pl'; ! require 'commands.pl'; ! require 'upload_fck.pl'; ! ! &read_input(); ! ! if($FORM{'ServerPath'} ne "") { ! $GLOBALS{'UserFilesPath'} = $FORM{'ServerPath'}; ! if(!($GLOBALS{'UserFilesPath'} =~ /\/$/)) { ! $GLOBALS{'UserFilesPath'} .= '/' ; ! } ! } else { ! $GLOBALS{'UserFilesPath'} = '/UserFiles/'; ! } ! ! # Map the "UserFiles" path to a local directory. ! $rootpath = &GetRootPath(); ! $GLOBALS{'UserFilesDirectory'} = $rootpath . $GLOBALS{'UserFilesPath'}; ! ! &DoResponse(); ! ! sub DoResponse ! { ! ! if($FORM{'Command'} eq "" || $FORM{'Type'} eq "" || $FORM{'CurrentFolder'} eq "") { ! return ; ! } ! # Get the main request informaiton. ! $sCommand = $FORM{'Command'}; ! $sResourceType = $FORM{'Type'}; ! $sCurrentFolder = $FORM{'CurrentFolder'}; ! ! # Check the current folder syntax (must begin and start with a slash). ! if(!($sCurrentFolder =~ /\/$/)) { ! $sCurrentFolder .= '/'; ! } ! if(!($sCurrentFolder =~ /^\//)) { ! $sCurrentFolder = '/' . $sCurrentFolder; ! } ! ! # File Upload doesn't have to Return XML, so it must be intercepted before anything. ! if($sCommand eq 'FileUpload') { ! FileUpload($sResourceType,$sCurrentFolder); ! return ; ! } ! ! print << "_HTML_HEAD_"; ! Content-Type:text/xml; charset=utf-8 ! Pragma: no-cache ! Cache-Control: no-cache ! Expires: Thu, 01 Dec 1994 16:00:00 GMT ! ! _HTML_HEAD_ ! ! &CreateXmlHeader($sCommand,$sResourceType,$sCurrentFolder); ! # Execute the required command. ! if($sCommand eq 'GetFolders') { ! &GetFolders($sResourceType,$sCurrentFolder); ! } elsif($sCommand eq 'GetFoldersAndFiles') { ! &GetFoldersAndFiles($sResourceType,$sCurrentFolder); ! } elsif($sCommand eq 'CreateFolder') { ! &CreateFolder($sResourceType,$sCurrentFolder); ! } ! &CreateXmlFooter(); ! exit ; ! } ! --- 1,132 ---- ! #!/usr/bin/env perl ! ! ##### ! # FCKeditor - The text editor for internet ! # Copyright (C) 2003-2005 Frederico Caldeira Knabben ! # ! # Licensed under the terms of the GNU Lesser General Public License: ! # http://www.opensource.org/licenses/lgpl-license.php ! # ! # For further information visit: ! # http://www.fckeditor.net/ ! # ! # File Name: connector.cgi ! # This is the File Manager Connector for Perl. ! # ! # File Authors: ! # Takashi Yamaguchi (ja...@om...) ! # Frederico Caldeira Knabben (fr...@fc...) ! ##### ! ! ## ! # ATTENTION: To enable this connector, look for the "SECURITY" comment in this file. ! ## ! ! ## START: Hack for Windows (Not important to understand the editor code... Perl specific). ! if(Windows_check()) { ! chdir(GetScriptPath($0)); ! } ! ! sub Windows_check ! { ! # IIS,PWS(NT/95) ! $www_server_os = $^O; ! # Win98 & NT(SP4) ! if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; } ! # AnHTTPd/Omni/IIS ! if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; } ! # Win Apache ! if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; } ! if($www_server_os=~ /win/i) { return(1); } ! return(0); ! } ! ! sub GetScriptPath { ! local($path) = @_; ! if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; } ! $path; ! } ! ## END: Hack for IIS ! ! require 'util.pl'; ! require 'io.pl'; ! require 'basexml.pl'; ! require 'commands.pl'; ! require 'upload_fck.pl'; ! ! ## ! # SECURITY: REMOVE/COMMENT THE FOLLOWING LINE TO ENABLE THIS CONNECTOR. ! ## ! &SendError( 1, 'This connector is disabled. Please check the "editor/filemanager/browser/default/connectors/perl/connector.cgi" file' ) ; ! ! &read_input(); ! ! if($FORM{'ServerPath'} ne "") { ! $GLOBALS{'UserFilesPath'} = $FORM{'ServerPath'}; ! if(!($GLOBALS{'UserFilesPath'} =~ /\/$/)) { ! $GLOBALS{'UserFilesPath'} .= '/' ; ! } ! } else { ! $GLOBALS{'UserFilesPath'} = '/UserFiles/'; ! } ! ! # Map the "UserFiles" path to a local directory. ! $rootpath = &GetRootPath(); ! $GLOBALS{'UserFilesDirectory'} = $rootpath . $GLOBALS{'UserFilesPath'}; ! ! &DoResponse(); ! ! sub DoResponse ! { ! ! if($FORM{'Command'} eq "" || $FORM{'Type'} eq "" || $FORM{'CurrentFolder'} eq "") { ! return ; ! } ! # Get the main request informaiton. ! $sCommand = $FORM{'Command'}; ! $sResourceType = $FORM{'Type'}; ! $sCurrentFolder = $FORM{'CurrentFolder'}; ! ! # Check the current folder syntax (must begin and start with a slash). ! if(!($sCurrentFolder =~ /\/$/)) { ! $sCurrentFolder .= '/'; ! } ! if(!($sCurrentFolder =~ /^\//)) { ! $sCurrentFolder = '/' . $sCurrentFolder; ! } ! ! # Check for invalid folder paths (..) ! if ( $sCurrentFolder =~ /\.\./ ) { ! SendError( 102, "" ) ; ! } ! ! # File Upload doesn't have to Return XML, so it must be intercepted before anything. ! if($sCommand eq 'FileUpload') { ! FileUpload($sResourceType,$sCurrentFolder); ! return ; ! } ! ! print << "_HTML_HEAD_"; ! Content-Type:text/xml; charset=utf-8 ! Pragma: no-cache ! Cache-Control: no-cache ! Expires: Thu, 01 Dec 1994 16:00:00 GMT ! ! _HTML_HEAD_ ! ! &CreateXmlHeader($sCommand,$sResourceType,$sCurrentFolder); ! ! # Execute the required command. ! if($sCommand eq 'GetFolders') { ! &GetFolders($sResourceType,$sCurrentFolder); ! } elsif($sCommand eq 'GetFoldersAndFiles') { ! &GetFoldersAndFiles($sResourceType,$sCurrentFolder); ! } elsif($sCommand eq 'CreateFolder') { ! &CreateFolder($sResourceType,$sCurrentFolder); ! } ! ! &CreateXmlFooter(); ! ! exit ; ! } ! Index: upload_fck.pl =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/filemanager/browser/default/connectors/perl/upload_fck.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** upload_fck.pl 1 Sep 2005 18:15:43 -0000 1.1 --- upload_fck.pl 29 Sep 2005 19:49:18 -0000 1.2 *************** *** 1,5 **** ! ##### # FCKeditor - The text editor for internet ! # Copyright (C) 2003-2004 Frederico Caldeira Knabben # # Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! ##### # FCKeditor - The text editor for internet ! # Copyright (C) 2003-2005 Frederico Caldeira Knabben # [...1286 lines suppressed...] ! # Image Temporary deletion ! # ! # Parameters ! # Returns ! # Memo ! ############################################################################## ! ! sub rm_tmp_uploaded_files ! { ! if($img_data_exists == 1){ ! sleep 1; ! foreach $fname_list(@NEWFNAMES) { ! if(-e "$img_dir/$fname_list") { ! unlink("$img_dir/$fname_list"); ! } ! } ! } ! ! } ! 1; Index: util.pl =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/filemanager/browser/default/connectors/perl/util.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** util.pl 1 Sep 2005 18:15:43 -0000 1.1 --- util.pl 29 Sep 2005 19:49:18 -0000 1.2 *************** *** 1,5 **** ! ##### # FCKeditor - The text editor for internet ! # Copyright (C) 2003-2004 Frederico Caldeira Knabben # # Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! ##### # FCKeditor - The text editor for internet ! # Copyright (C) 2003-2005 Frederico Caldeira Knabben # # Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** # This is the File Manager Connector for Perl. # - # Version: 2.0 RC3 - # Modified: 2005-02-28 17:06:13 - # # File Authors: ! # Takashi Yamaguchi (ja...@om...) ! ##### sub RemoveFromStart --- 12,18 ---- # This is the File Manager Connector for Perl. # # File Authors: ! # Takashi Yamaguchi (ja...@om...) ! ##### sub RemoveFromStart *************** *** 43,45 **** --- 40,54 ---- } + sub specialchar_cnv + { + local($ch) = @_; + + $ch =~ s/&/&/g; # & + $ch =~ s/\"/"/g; #" + $ch =~ s/\'/'/g; # ' + $ch =~ s/</</g; # < + $ch =~ s/>/>/g; # > + return($ch); + } + 1; Index: io.pl =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/filemanager/browser/default/connectors/perl/io.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** io.pl 1 Sep 2005 18:15:43 -0000 1.1 --- io.pl 29 Sep 2005 19:49:18 -0000 1.2 *************** *** 1,5 **** ! ##### # FCKeditor - The text editor for internet ! # Copyright (C) 2003-2004 Frederico Caldeira Knabben # # Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! ##### # FCKeditor - The text editor for internet ! # Copyright (C) 2003-2005 Frederico Caldeira Knabben # # Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** # This is the File Manager Connector for Perl. # - # Version: 2.0 RC3 - # Modified: 2005-02-28 17:06:00 - # # File Authors: ! # Takashi Yamaguchi (ja...@om...) ! ##### sub GetUrlFromPath --- 12,18 ---- # This is the File Manager Connector for Perl. # # File Authors: ! # Takashi Yamaguchi (ja...@om...) ! ##### sub GetUrlFromPath Index: basexml.pl =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/filemanager/browser/default/connectors/perl/basexml.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** basexml.pl 1 Sep 2005 18:15:43 -0000 1.1 --- basexml.pl 29 Sep 2005 19:49:18 -0000 1.2 *************** *** 1,5 **** ! ##### # FCKeditor - The text editor for internet ! # Copyright (C) 2003-2004 Frederico Caldeira Knabben # # Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! ##### # FCKeditor - The text editor for internet ! # Copyright (C) 2003-2005 Frederico Caldeira Knabben # # Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,25 **** # This is the File Manager Connector for Perl. # - # Version: 2.0 RC3 - # Modified: 2005-02-28 17:06:22 - # # File Authors: ! # Takashi Yamaguchi (ja...@om...) ! ##### sub CreateXmlHeader { - local($command,$resourceType,$currentFolder) = @_; --- 12,21 ---- # This is the File Manager Connector for Perl. # # File Authors: ! # Takashi Yamaguchi (ja...@om...) ! ##### sub CreateXmlHeader { local($command,$resourceType,$currentFolder) = @_; *************** *** 39,41 **** --- 35,57 ---- } + sub SendError + { + local( $number, $text ) = @_; + + print << "_HTML_HEAD_"; + Content-Type:text/xml; charset=utf-8 + Pragma: no-cache + Cache-Control: no-cache + Expires: Thu, 01 Dec 1994 16:00:00 GMT + + _HTML_HEAD_ + + # Create the XML document header + print '<?xml version="1.0" encoding="utf-8" ?>' ; + + print '<Connector><Error number="' . $number . '" text="' . &specialchar_cnv( $text ) . '" /></Connector>' ; + + exit ; + } + 1; |
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/_source/classes Modified Files: fckcontextmenugroup.js fckcontextmenuitem.js fckcontextmenuseparator.js fckevents.js fckpanel_gecko.js fckpanel_ie.js fckplugin.js fckspecialcombo.js fckstyledef.js fckstyledef_gecko.js fckstyledef_ie.js fckstylesloader.js fcktoolbar.js fcktoolbarbreak_gecko.js fcktoolbarbreak_ie.js fcktoolbarbutton.js fcktoolbarfontformatcombo.js fcktoolbarfontscombo.js fcktoolbarfontsizecombo.js fcktoolbarpanelbutton.js fcktoolbarspecialcombo.js fcktoolbarstylecombo.js fckxml_gecko.js fckxml_ie.js Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi Index: fckstyledef_ie.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fckstyledef_ie.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckstyledef_ie.js 1 Sep 2005 18:15:40 -0000 1.4 --- fckstyledef_ie.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * FCKStyleDef Class: represents a single stylke definition. (IE specific) * - * Version: 2.0 RC3 - * Modified: 2004-11-22 11:09:44 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ FCKStyleDef.prototype.ApplyToSelection = function() --- 12,18 ---- * FCKStyleDef Class: represents a single stylke definition. (IE specific) * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ FCKStyleDef.prototype.ApplyToSelection = function() Index: fcktoolbarpanelbutton.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fcktoolbarpanelbutton.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fcktoolbarpanelbutton.js 1 Sep 2005 18:15:40 -0000 1.4 --- fcktoolbarpanelbutton.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 13,22 **** * that shows a panel when pressed. * - * Version: 2.0 RC3 - * Modified: 2005-01-10 15:28:31 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKToolbarPanelButton = function( commandName, label, tooltip, style ) --- 13,19 ---- * that shows a panel when pressed. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKToolbarPanelButton = function( commandName, label, tooltip, style ) *************** *** 29,45 **** } FCKToolbarPanelButton.prototype.CreateInstance = function( parentToolbar ) { - /* - <td title="Bold" class="TB_Button_Off" unselectable="on" onmouseover="Button_OnMouseOver(this);" onmouseout="Button_OnMouseOut(this);"> - <table class="TB_ButtonType_Icon" cellspacing="0" cellpadding="0" border="0"> - <tr> - <td class="TB_Icon"><img src="icons/redo.gif" width="21" height="21" style="VISIBILITY: hidden" onload="this.style.visibility = '';"></td> - <td class="TB_Text" unselectable="on">Redo</td> - <td class="TB_ButtonArrow"><img src="skin/images/toolbar_buttonarrow.gif" width="5" height="3"></td> - </tr> - </table> - </td> - */ this.DOMDiv = document.createElement( 'div' ) ; this.DOMDiv.className = 'TB_Button_Off' ; --- 26,50 ---- } + FCKToolbarPanelButton.prototype.Click = function(e) + { + // For Mozilla we must stop the event propagation to avoid it hiding + // the panel because of a click outside of it. + if ( e ) + { + e.stopPropagation() ; + FCKPanelEventHandlers.OnDocumentClick( e ) ; + } + + if ( this.State != FCK_TRISTATE_DISABLED ) + { + this.Command.Execute(0, this.DOMDiv.offsetHeight, this.DOMDiv) ; + // this.FCKToolbarButton.HandleOnClick( this, e ) ; + } + + return false ; + } + FCKToolbarPanelButton.prototype.CreateInstance = function( parentToolbar ) { this.DOMDiv = document.createElement( 'div' ) ; this.DOMDiv.className = 'TB_Button_Off' ; *************** *** 47,109 **** this.DOMDiv.FCKToolbarButton = this ; ! this.DOMDiv.onmouseover = function() ! { ! if ( this.FCKToolbarButton.State != FCK_TRISTATE_DISABLED ) ! { ! this.className = 'TB_Button_On' ; ! } ! } ! ! this.DOMDiv.onmouseout = function() ! { ! if ( this.FCKToolbarButton.State != FCK_TRISTATE_DISABLED && this.FCKToolbarButton.State != FCK_TRISTATE_ON ) ! { ! this.className = 'TB_Button_Off' ; ! } ! } ! ! this.DOMDiv.onclick = function( e ) ! { ! // For Mozilla we must stop the event propagation to avoid it hiding ! // the panel because of a click outside of it. ! if ( e ) ! { ! e.stopPropagation() ; ! FCKPanelEventHandlers.OnDocumentClick( e ) ; ! } ! ! if ( this.FCKToolbarButton.State != FCK_TRISTATE_DISABLED ) ! { ! this.FCKToolbarButton.Command.Execute(0, this.FCKToolbarButton.DOMDiv.offsetHeight, this.FCKToolbarButton.DOMDiv) ; ! // this.FCKToolbarButton.HandleOnClick( this.FCKToolbarButton, e ) ; ! } ! return false ; ! } ! ! // Gets the correct CSS class to use for the specified style (param). ! var sClass ; ! switch ( this.Style ) ! { ! case FCK_TOOLBARITEM_ONLYICON : ! sClass = 'TB_ButtonType_Icon' ; ! break ; ! case FCK_TOOLBARITEM_ONLYTEXT : ! sClass = 'TB_ButtonType_Text' ; ! break ; ! case FCK_TOOLBARITEM_ICONTEXT : ! sClass = '' ; ! break ; ! } ! ! this.DOMDiv.innerHTML = ! '<table title="' + this.Tooltip + '" class="' + sClass + '" cellspacing="0" cellpadding="0" border="0" unselectable="on">' + ! '<tr>' + ! '<td class="TB_Icon" unselectable="on"><img src="' + FCKConfig.SkinPath + 'toolbar/' + this.Command.Name.toLowerCase() + '.gif" width="21" height="21" unselectable="on"></td>' + ! '<td class="TB_Text" unselectable="on">' + this.Label + '</td>' + '<td class="TB_ButtonArrow" unselectable="on"><img src="' + FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif" width="5" height="3"></td>' + '</tr>' + '</table>' ; var oCell = parentToolbar.DOMRow.insertCell(-1) ; --- 52,71 ---- this.DOMDiv.FCKToolbarButton = this ; ! var sHtml = ! '<table title="' + this.Tooltip + '" cellspacing="0" cellpadding="0" border="0" unselectable="on">' + ! '<tr>' ; ! if ( this.Style != FCK_TOOLBARITEM_ONLYTEXT ) ! sHtml += '<td class="TB_Icon" unselectable="on"><img src="' + FCKConfig.SkinPath + 'toolbar/' + this.Command.Name.toLowerCase() + '.gif" width="21" height="21" unselectable="on"></td>' ; ! ! if ( this.Style != FCK_TOOLBARITEM_ONLYICON ) ! sHtml += '<td class="TB_Text" unselectable="on" nowrap>' + this.Label + '</td>' ; ! ! sHtml += '<td class="TB_ButtonArrow" unselectable="on"><img src="' + FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif" width="5" height="3"></td>' + '</tr>' + '</table>' ; + this.DOMDiv.innerHTML = sHtml ; var oCell = parentToolbar.DOMRow.insertCell(-1) ; Index: fcktoolbarbutton.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fcktoolbarbutton.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fcktoolbarbutton.js 1 Sep 2005 18:15:40 -0000 1.4 --- fcktoolbarbutton.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * FCKToolbarButton Class: represents a button in the toolbar. * - * Version: 2.0 RC3 - * Modified: 2005-01-18 11:07:28 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKToolbarButton = function( commandName, label, tooltip, style, sourceView, contextSensitive ) --- 12,18 ---- * FCKToolbarButton Class: represents a button in the toolbar. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKToolbarButton = function( commandName, label, tooltip, style, sourceView, contextSensitive ) *************** *** 33,97 **** FCKToolbarButton.prototype.CreateInstance = function( parentToolbar ) { - /* - <td title="Bold" class="TB_Button_Off" unselectable="on" onmouseover="Button_OnMouseOver(this);" onmouseout="Button_OnMouseOut(this);"> - <table class="TB_ButtonType_Icon" cellspacing="0" cellpadding="0" border="0"> - <tr> - <td class="TB_Icon"><img src="icons/redo.gif" width="21" height="21"></td> - <td class="TB_Text" unselectable="on">Redo</td> - </tr> - </table> - </td> - */ this.DOMDiv = document.createElement( 'div' ) ; ! this.DOMDiv.className = 'TB_Button_Off' ; ! this.DOMDiv.FCKToolbarButton = this ; ! this.DOMDiv.onmouseover = function() ! { ! if ( this.FCKToolbarButton.State != FCK_TRISTATE_DISABLED ) ! { ! this.className = 'TB_Button_On' ; ! } ! } ! this.DOMDiv.onmouseout = function() ! { ! if ( this.FCKToolbarButton.State != FCK_TRISTATE_DISABLED && this.FCKToolbarButton.State != FCK_TRISTATE_ON ) ! { ! this.className = 'TB_Button_Off' ; ! } ! } ! this.DOMDiv.onclick = function() ! { ! if ( this.FCKToolbarButton.State != FCK_TRISTATE_DISABLED ) ! this.FCKToolbarButton.Command.Execute() ; ! return false ; ! } ! ! // Gets the correct CSS class to use for the specified style (param). ! var sClass ; ! switch ( this.Style ) ! { ! case FCK_TOOLBARITEM_ONLYICON : ! sClass = 'TB_ButtonType_Icon' ; ! break ; ! case FCK_TOOLBARITEM_ONLYTEXT : ! sClass = 'TB_ButtonType_Text' ; ! break ; ! case FCK_TOOLBARITEM_ICONTEXT : ! sClass = '' ; ! break ; ! } ! ! this.DOMDiv.innerHTML = ! '<table title="' + this.Tooltip + '" class="' + sClass + '" cellspacing="0" cellpadding="0" border="0" unselectable="on">' + ! '<tr>' + ! '<td class="TB_Icon" unselectable="on"><img src="' + this.IconPath + '" width="21" height="21" unselectable="on"></td>' + ! '<td class="TB_Text" unselectable="on">' + this.Label + '</td>' + '</tr>' + '</table>' ; var oCell = parentToolbar.DOMRow.insertCell(-1) ; --- 30,53 ---- FCKToolbarButton.prototype.CreateInstance = function( parentToolbar ) { this.DOMDiv = document.createElement( 'div' ) ; ! this.DOMDiv.className = 'TB_Button_Off' ; ! this.DOMDiv.FCKToolbarButton = this ; ! var sHtml = ! '<table title="' + this.Tooltip + '" cellspacing="0" cellpadding="0" border="0" unselectable="on">' + ! '<tr>' ; ! if ( this.Style != FCK_TOOLBARITEM_ONLYTEXT ) ! sHtml += '<td class="TB_Icon" unselectable="on"><img src="' + this.IconPath + '" width="21" height="21" unselectable="on"></td>' ; ! if ( this.Style != FCK_TOOLBARITEM_ONLYICON ) ! sHtml += '<td class="TB_Text" unselectable="on" nowrap>' + this.Label + '</td>' ; ! ! sHtml += '</tr>' + '</table>' ; + this.DOMDiv.innerHTML = sHtml ; var oCell = parentToolbar.DOMRow.insertCell(-1) ; *************** *** 125,138 **** case FCK_TRISTATE_ON : this.DOMDiv.className = 'TB_Button_On' ; break ; case FCK_TRISTATE_OFF : this.DOMDiv.className = 'TB_Button_Off' ; break ; default : ! this.DOMDiv.className = 'TB_Button_Disabled' ; break ; } } FCKToolbarButton.prototype.Enable = function() { --- 81,135 ---- case FCK_TRISTATE_ON : this.DOMDiv.className = 'TB_Button_On' ; + + this.DOMDiv.onmouseover = FCKToolbarButton_OnMouseOnOver ; + this.DOMDiv.onmouseout = FCKToolbarButton_OnMouseOnOut ; + this.DOMDiv.onclick = FCKToolbarButton_OnClick ; + break ; case FCK_TRISTATE_OFF : this.DOMDiv.className = 'TB_Button_Off' ; + + this.DOMDiv.onmouseover = FCKToolbarButton_OnMouseOffOver ; + this.DOMDiv.onmouseout = FCKToolbarButton_OnMouseOffOut ; + this.DOMDiv.onclick = FCKToolbarButton_OnClick ; + break ; default : ! this.Disable() ; break ; } } + function FCKToolbarButton_OnMouseOnOver() + { + this.className = 'TB_Button_On TB_Button_On_Over' ; + } + + function FCKToolbarButton_OnMouseOnOut() + { + this.className = 'TB_Button_On' ; + } + + function FCKToolbarButton_OnMouseOffOver() + { + this.className = 'TB_Button_On TB_Button_Off_Over' ; + } + + function FCKToolbarButton_OnMouseOffOut() + { + this.className = 'TB_Button_Off' ; + } + + function FCKToolbarButton_OnClick(e) + { + this.FCKToolbarButton.Click(e) ; + return false ; + } + + FCKToolbarButton.prototype.Click = function() + { + this.Command.Execute() ; + } + FCKToolbarButton.prototype.Enable = function() { *************** *** 144,146 **** --- 141,146 ---- this.State = FCK_TRISTATE_DISABLED ; this.DOMDiv.className = 'TB_Button_Disabled' ; + this.DOMDiv.onmouseover = null ; + this.DOMDiv.onmouseout = null ; + this.DOMDiv.onclick = null ; } \ No newline at end of file Index: fckstyledef_gecko.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fckstyledef_gecko.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckstyledef_gecko.js 1 Sep 2005 18:15:40 -0000 1.4 --- fckstyledef_gecko.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * FCKStyleDef Class: represents a single stylke definition. (Gecko specific) * - * Version: 2.0 RC3 - * Modified: 2004-11-22 11:09:45 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ FCKStyleDef.prototype.ApplyToSelection = function() --- 12,18 ---- * FCKStyleDef Class: represents a single stylke definition. (Gecko specific) * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ FCKStyleDef.prototype.ApplyToSelection = function() Index: fcktoolbarfontscombo.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fcktoolbarfontscombo.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fcktoolbarfontscombo.js 1 Sep 2005 18:15:40 -0000 1.4 --- fcktoolbarfontscombo.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * FCKToolbarPanelButton Class: Handles the Fonts combo selector. * - * Version: 2.0 RC3 - * Modified: 2004-11-19 07:50:38 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKToolbarFontsCombo = function() --- 12,18 ---- * FCKToolbarPanelButton Class: Handles the Fonts combo selector. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKToolbarFontsCombo = function() Index: fckspecialcombo.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fckspecialcombo.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckspecialcombo.js 1 Sep 2005 18:15:40 -0000 1.4 --- fckspecialcombo.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * FCKSpecialCombo Class: represents a special combo. * - * Version: 2.0 RC3 - * Modified: 2005-02-23 18:56:39 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKSpecialCombo = function( caption ) --- 12,18 ---- * FCKSpecialCombo Class: represents a special combo. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKSpecialCombo = function( caption ) *************** *** 41,44 **** --- 38,61 ---- } + function FCKSpecialCombo_ItemOnMouseOver() + { + this.className += ' SC_ItemOver' ; + } + + function FCKSpecialCombo_ItemOnMouseOut() + { + this.className = this.originalClass ; + } + + function FCKSpecialCombo_ItemOnClick() + { + this.FCKSpecialCombo._Panel.Hide() ; + + this.FCKSpecialCombo.SetLabel( this.FCKItemLabel ) ; + + if ( typeof( this.FCKSpecialCombo.OnSelect ) == 'function' ) + this.FCKSpecialCombo.OnSelect( this.FCKItemID, this ) ; + } + FCKSpecialCombo.prototype.AddItem = function( id, html, label ) { *************** *** 52,74 **** oDiv.Selected = false ; ! oDiv.onmouseover = function() ! { ! this.className += ' SC_ItemOver' ; ! } ! ! oDiv.onmouseout = function() ! { ! this.className = this.originalClass ; ! } ! ! oDiv.onclick = function() ! { ! this.FCKSpecialCombo._Panel.Hide() ; ! ! this.FCKSpecialCombo.SetLabel( this.FCKItemLabel ) ; ! ! if ( typeof( this.FCKSpecialCombo.OnSelect ) == 'function' ) ! this.FCKSpecialCombo.OnSelect( this.FCKItemID, this ) ; ! } this.Items[ id.toString().toLowerCase() ] = oDiv ; --- 69,75 ---- oDiv.Selected = false ; ! oDiv.onmouseover = FCKSpecialCombo_ItemOnMouseOver ; ! oDiv.onmouseout = FCKSpecialCombo_ItemOnMouseOut ; ! oDiv.onclick = FCKSpecialCombo_ItemOnClick ; this.Items[ id.toString().toLowerCase() ] = oDiv ; *************** *** 100,105 **** FCKSpecialCombo.prototype.SetLabelById = function( id ) { - FCKDebug.Output( this.Caption + ': ' + id, '#0000FF' ) ; - id = id ? id.toString().toLowerCase() : '' ; --- 101,104 ---- *************** *** 152,196 **** oField.SpecialCombo = this ; ! oField.onmouseover = function() ! { ! if ( this.SpecialCombo.Enabled ) ! this.className='SC_Field SC_FieldOver' ; ! } ! oField.onmouseout = function() ! { ! this.className='SC_Field' ; ! } ! oField.onclick = function( e ) { ! // For Mozilla we must stop the event propagation to avoid it hiding ! // the panel because of a click outside of it. ! if ( e ) ! { ! e.stopPropagation() ; ! FCKPanelEventHandlers.OnDocumentClick( e ) ; ! } ! if ( this.SpecialCombo.Enabled ) ! { ! if ( typeof( this.SpecialCombo.OnBeforeClick ) == 'function' ) ! this.SpecialCombo.OnBeforeClick( this.SpecialCombo ) ; ! if ( this.SpecialCombo._ItemsHolderEl.offsetHeight > this.SpecialCombo.PanelMaxHeight ) ! this.SpecialCombo._Panel.PanelDiv.style.height = this.SpecialCombo.PanelMaxHeight + 'px' ; ! else ! this.SpecialCombo._Panel.PanelDiv.style.height = this.SpecialCombo._ItemsHolderEl.offsetHeight + 'px' ; ! ! this.SpecialCombo._Panel.PanelDiv.style.width = this.SpecialCombo.PanelWidth + 'px' ; ! if ( FCKBrowserInfo.IsGecko ) ! this.SpecialCombo._Panel.PanelDiv.style.overflow = '-moz-scrollbars-vertical' ; ! ! this.SpecialCombo._Panel.Show( 0, this.offsetHeight, this, null, this.SpecialCombo.PanelMaxHeight, true ) ; ! } ! return false ; } } --- 151,199 ---- oField.SpecialCombo = this ; ! oField.onmouseover = FCKSpecialCombo_OnMouseOver ; ! oField.onmouseout = FCKSpecialCombo_OnMouseOut ; ! oField.onclick = FCKSpecialCombo_OnClick ; ! } ! ! function FCKSpecialCombo_OnMouseOver() ! { ! if ( this.SpecialCombo.Enabled ) ! this.className = 'SC_Field SC_FieldOver' ; ! } ! function FCKSpecialCombo_OnMouseOut() ! { ! this.className='SC_Field' ; ! } ! function FCKSpecialCombo_OnClick( e ) ! { ! // For Mozilla we must stop the event propagation to avoid it hiding ! // the panel because of a click outside of it. ! if ( e ) { ! e.stopPropagation() ; ! FCKPanelEventHandlers.OnDocumentClick( e ) ; ! } ! if ( this.SpecialCombo.Enabled ) ! { ! if ( typeof( this.SpecialCombo.OnBeforeClick ) == 'function' ) ! this.SpecialCombo.OnBeforeClick( this.SpecialCombo ) ; ! if ( this.SpecialCombo._ItemsHolderEl.offsetHeight > this.SpecialCombo.PanelMaxHeight ) ! this.SpecialCombo._Panel.PanelDiv.style.height = this.SpecialCombo.PanelMaxHeight + 'px' ; ! else ! this.SpecialCombo._Panel.PanelDiv.style.height = this.SpecialCombo._ItemsHolderEl.offsetHeight + 'px' ; ! this.SpecialCombo._Panel.PanelDiv.style.width = this.SpecialCombo.PanelWidth + 'px' ; ! ! if ( FCKBrowserInfo.IsGecko ) ! this.SpecialCombo._Panel.PanelDiv.style.overflow = '-moz-scrollbars-vertical' ; ! this.SpecialCombo._Panel.Show( 0, this.offsetHeight, this, null, this.SpecialCombo.PanelMaxHeight, true ) ; } + + return false ; } Index: fckpanel_ie.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fckpanel_ie.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckpanel_ie.js 1 Sep 2005 18:15:40 -0000 1.4 --- fckpanel_ie.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * FCKPanel Class: Creates and manages floating panels in IE Browsers. * - * Version: 2.0 RC3 - * Modified: 2004-11-10 13:20:42 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKPanel = function( parentWindow ) --- 12,18 ---- * FCKPanel Class: Creates and manages floating panels in IE Browsers. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKPanel = function( parentWindow ) *************** *** 24,27 **** --- 21,26 ---- } + function FCKPanel_OnContextMenu() { return false ; } + FCKPanel.prototype.Create = function() { *************** *** 31,35 **** this.Document = this._Popup.document ; ! this.Document.oncontextmenu = function() { return false ; } if ( this.StyleSheet ) --- 30,36 ---- this.Document = this._Popup.document ; ! aCleanupDocs[ aCleanupDocs.length ] = this.Document ; ! ! this.Document.oncontextmenu = FCKPanel_OnContextMenu ; if ( this.StyleSheet ) Index: fcktoolbarfontsizecombo.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fcktoolbarfontsizecombo.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fcktoolbarfontsizecombo.js 1 Sep 2005 18:15:40 -0000 1.4 --- fcktoolbarfontsizecombo.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * FCKToolbarPanelButton Class: Handles the Fonts combo selector. * - * Version: 2.0 RC3 - * Modified: 2004-11-19 07:50:29 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKToolbarFontSizeCombo = function() --- 12,18 ---- * FCKToolbarPanelButton Class: Handles the Fonts combo selector. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKToolbarFontSizeCombo = function() Index: fckcontextmenuitem.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fckcontextmenuitem.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckcontextmenuitem.js 1 Sep 2005 18:15:40 -0000 1.4 --- fckcontextmenuitem.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * FCKContextMenuItem Class: represents a item in the context menu. * - * Version: 2.0 RC3 - * Modified: 2005-02-23 23:44:49 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKContextMenuItem = function( contextMenu, commandName, label, hasIcon ) --- 12,18 ---- * FCKContextMenuItem Class: represents a item in the context menu. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKContextMenuItem = function( contextMenu, commandName, label, hasIcon ) *************** *** 27,30 **** --- 24,49 ---- } + function FCKContextMenuItem_OnMouseOver() + { + if ( this.className != 'CM_Disabled' ) + this.className = 'CM_Over' ; + } + + function FCKContextMenuItem_OnMouseOut() + { + if ( this.className != 'CM_Disabled' ) + this.className = 'CM_Option' ; + } + + function FCKContextMenuItem_OnClick() + { + if ( this.className != 'CM_Disabled' ) + { + this.FCKContextMenuItem.ContextMenu.Hide() ; + this.FCKContextMenuItem.Command.Execute() ; + } + return false ; + } + FCKContextMenuItem.prototype.CreateTableRow = function( targetTable ) { *************** *** 34,60 **** this._Row.FCKContextMenuItem = this ; ! // Sets the mouse over event. ! this._Row.onmouseover = function() ! { ! if ( this.className != 'CM_Disabled' ) ! this.className = 'CM_Over' ; ! } ! ! // Sets the mouse out event. ! this._Row.onmouseout = function() ! { ! if ( this.className != 'CM_Disabled' ) ! this.className = 'CM_Option' ; ! } ! ! this._Row.onclick = function() ! { ! if ( this.className != 'CM_Disabled' ) ! { ! this.FCKContextMenuItem.ContextMenu.Hide() ; ! this.FCKContextMenuItem.Command.Execute() ; ! } ! return false ; ! } var oCell = this._Row.insertCell(-1) ; --- 53,59 ---- this._Row.FCKContextMenuItem = this ; ! this._Row.onmouseover = FCKContextMenuItem_OnMouseOver ; ! this._Row.onmouseout = FCKContextMenuItem_OnMouseOut ; ! this._Row.onclick = FCKContextMenuItem_OnClick ; var oCell = this._Row.insertCell(-1) ; Index: fcktoolbar.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fcktoolbar.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fcktoolbar.js 1 Sep 2005 18:15:40 -0000 1.4 --- fcktoolbar.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 13,22 **** * toolbar set visible, but just a strip on it... a group of items. * - * Version: 2.0 RC3 - * Modified: 2004-05-31 23:07:47 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKToolbar = function() --- 13,19 ---- * toolbar set visible, but just a strip on it... a group of items. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKToolbar = function() *************** *** 64,66 **** oCell.innerHTML = '<img src="' + FCKConfig.SkinPath + 'images/toolbar.end.gif" width="12" height="21" style="VISIBILITY: hidden" onload="this.style.visibility = \'\';" unselectable="on">' ; } - --- 61,62 ---- Index: fcktoolbarfontformatcombo.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fcktoolbarfontformatcombo.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fcktoolbarfontformatcombo.js 1 Sep 2005 18:15:40 -0000 1.4 --- fcktoolbarfontformatcombo.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * FCKToolbarPanelButton Class: Handles the Fonts combo selector. * - * Version: 2.0 RC3 - * Modified: 2004-12-05 22:25:20 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKToolbarFontFormatCombo = function() --- 12,18 ---- * FCKToolbarPanelButton Class: Handles the Fonts combo selector. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKToolbarFontFormatCombo = function() Index: fckxml_gecko.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fckxml_gecko.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fckxml_gecko.js 1 Sep 2005 18:15:40 -0000 1.1 --- fckxml_gecko.js 29 Sep 2005 19:49:17 -0000 1.2 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,51 **** * FCKXml Class: class to load and manipulate XML files. * - * Version: 2.0 RC3 - * Modified: 2005-03-02 12:42:44 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ ! var FCKXml = function() ! {} ! FCKXml.prototype.LoadUrl = function( urlToCall, asyncFunctionPointer ) { ! var oFCKXml = this ; ! ! var bAsync = ( typeof(asyncFunctionPointer) == 'function' ) ; ! var oXmlHttp = FCKTools.CreateXmlObject( 'XmlHttp' ) ; ! oXmlHttp.open( "GET", urlToCall, bAsync ) ; ! ! if ( bAsync ) ! { ! oXmlHttp.onreadystatechange = function() ! { ! if ( oXmlHttp.readyState == 4 ) ! { ! oFCKXml.DOMDocument = oXmlHttp.responseXML ; ! asyncFunctionPointer( oFCKXml ) ; ! } ! } ! } ! ! oXmlHttp.send( null ) ; ! ! if ( ! bAsync ) ! { if ( oXmlHttp.status == 200 ) this.DOMDocument = oXmlHttp.responseXML ; --- 12,34 ---- * FCKXml Class: class to load and manipulate XML files. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ ! var FCKXml ; ! if ( !( FCKXml = NS.FCKXml ) ) { ! FCKXml = NS.FCKXml = function() ! {} ! FCKXml.prototype.LoadUrl = function( urlToCall ) ! { ! var oFCKXml = this ; ! var oXmlHttp = FCKTools.CreateXmlObject( 'XmlHttp' ) ; ! oXmlHttp.open( "GET", urlToCall, false ) ; ! oXmlHttp.send( null ) ; ! if ( oXmlHttp.status == 200 ) this.DOMDocument = oXmlHttp.responseXML ; *************** *** 55,86 **** alert( 'Error loading "' + urlToCall + '"' ) ; } - } ! FCKXml.prototype.SelectNodes = function( xpath, contextNode ) ! { ! var aNodeArray = new Array(); ! ! var xPathResult = this.DOMDocument.evaluate( xpath, contextNode ? contextNode : this.DOMDocument, ! this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), XPathResult.ORDERED_NODE_ITERATOR_TYPE, null) ; ! if ( xPathResult ) { ! var oNode = xPathResult.iterateNext() ; ! while( oNode ) ! { ! aNodeArray[aNodeArray.length] = oNode ; ! oNode = xPathResult.iterateNext(); ! } ! } ! return aNodeArray ; ! } ! FCKXml.prototype.SelectSingleNode = function( xpath, contextNode ) ! { ! var xPathResult = this.DOMDocument.evaluate( xpath, contextNode ? contextNode : this.DOMDocument, ! this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), 9, null); ! if ( xPathResult && xPathResult.singleNodeValue ) ! return xPathResult.singleNodeValue ; ! else ! return null ; ! } --- 38,69 ---- alert( 'Error loading "' + urlToCall + '"' ) ; } ! FCKXml.prototype.SelectNodes = function( xpath, contextNode ) { ! var aNodeArray = new Array(); ! var xPathResult = this.DOMDocument.evaluate( xpath, contextNode ? contextNode : this.DOMDocument, ! this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), XPathResult.ORDERED_NODE_ITERATOR_TYPE, null) ; ! if ( xPathResult ) ! { ! var oNode = xPathResult.iterateNext() ; ! while( oNode ) ! { ! aNodeArray[aNodeArray.length] = oNode ; ! oNode = xPathResult.iterateNext(); ! } ! } ! return aNodeArray ; ! } ! FCKXml.prototype.SelectSingleNode = function( xpath, contextNode ) ! { ! var xPathResult = this.DOMDocument.evaluate( xpath, contextNode ? contextNode : this.DOMDocument, ! this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), 9, null); ! ! if ( xPathResult && xPathResult.singleNodeValue ) ! return xPathResult.singleNodeValue ; ! else ! return null ; ! } ! } \ No newline at end of file Index: fckxml_ie.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fckxml_ie.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fckxml_ie.js 1 Sep 2005 18:15:40 -0000 1.1 --- fckxml_ie.js 29 Sep 2005 19:49:17 -0000 1.2 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 13,79 **** * (IE specific implementation) * - * Version: 2.0 RC3 - * Modified: 2005-02-27 22:15:31 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ ! var FCKXml = function() ! {} ! FCKXml.prototype.LoadUrl = function( urlToCall, asyncFunctionPointer ) { ! var oFCKXml = this ; ! ! var bAsync = ( typeof(asyncFunctionPointer) == 'function' ) ; ! var oXmlHttp = FCKTools.CreateXmlObject( 'XmlHttp' ) ; ! oXmlHttp.open( "GET", urlToCall, bAsync ) ; ! ! if ( bAsync ) ! { ! oXmlHttp.onreadystatechange = function() ! { ! if ( oXmlHttp.readyState == 4 ) ! { ! oFCKXml.DOMDocument = oXmlHttp.responseXML ; ! asyncFunctionPointer( oFCKXml ) ; ! } ! } ! } ! ! oXmlHttp.send( null ) ; ! ! if ( ! bAsync ) ! { if ( oXmlHttp.status == 200 ) this.DOMDocument = oXmlHttp.responseXML ; else if ( oXmlHttp.status == 0 && oXmlHttp.readyState == 4 ) { ! oFCKXml.DOMDocument = FCKTools.CreateXmlObject( 'DOMDocument' ) ; ! oFCKXml.DOMDocument.async = false ; ! oFCKXml.DOMDocument.resolveExternals = false ; ! oFCKXml.DOMDocument.loadXML( oXmlHttp.responseText ) ; } else alert( 'Error loading "' + urlToCall + '"' ) ; } - } ! FCKXml.prototype.SelectNodes = function( xpath, contextNode ) ! { ! if ( contextNode ) ! return contextNode.selectNodes( xpath ) ; ! else ! return this.DOMDocument.selectNodes( xpath ) ; ! } ! FCKXml.prototype.SelectSingleNode = function( xpath, contextNode ) ! { ! if ( contextNode ) ! return contextNode.selectSingleNode( xpath ) ; ! else ! return this.DOMDocument.selectSingleNode( xpath ) ; ! } --- 13,62 ---- * (IE specific implementation) * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ ! var FCKXml ; ! if ( !( FCKXml = NS.FCKXml ) ) { ! FCKXml = NS.FCKXml = function() ! {} ! FCKXml.prototype.LoadUrl = function( urlToCall ) ! { ! var oXmlHttp = FCKTools.CreateXmlObject( 'XmlHttp' ) ; ! oXmlHttp.open( "GET", urlToCall, false ) ; ! ! oXmlHttp.send( null ) ; ! if ( oXmlHttp.status == 200 ) this.DOMDocument = oXmlHttp.responseXML ; else if ( oXmlHttp.status == 0 && oXmlHttp.readyState == 4 ) { ! this.DOMDocument = FCKTools.CreateXmlObject( 'DOMDocument' ) ; ! this.DOMDocument.async = false ; ! this.DOMDocument.resolveExternals = false ; ! this.DOMDocument.loadXML( oXmlHttp.responseText ) ; } else alert( 'Error loading "' + urlToCall + '"' ) ; } ! FCKXml.prototype.SelectNodes = function( xpath, contextNode ) ! { ! if ( contextNode ) ! return contextNode.selectNodes( xpath ) ; ! else ! return this.DOMDocument.selectNodes( xpath ) ; ! } ! FCKXml.prototype.SelectSingleNode = function( xpath, contextNode ) ! { ! if ( contextNode ) ! return contextNode.selectSingleNode( xpath ) ; ! else ! return this.DOMDocument.selectSingleNode( xpath ) ; ! } ! } \ No newline at end of file Index: fcktoolbarbreak_ie.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fcktoolbarbreak_ie.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fcktoolbarbreak_ie.js 1 Sep 2005 18:15:40 -0000 1.1 --- fcktoolbarbreak_ie.js 29 Sep 2005 19:49:17 -0000 1.2 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 14,23 **** * This is the IE specific implementation. * - * Version: 2.0 RC3 - * Modified: 2005-02-09 18:07:44 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKToolbarBreak = function() --- 14,20 ---- * This is the IE specific implementation. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKToolbarBreak = function() Index: fckcontextmenugroup.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fckcontextmenugroup.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckcontextmenugroup.js 1 Sep 2005 18:15:40 -0000 1.4 --- fckcontextmenugroup.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 13,22 **** * menu. Generaly a group of items is directly dependent of the same rules. * - * Version: 2.0 RC3 - * Modified: 2005-02-09 19:35:56 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKContextMenuGroup = function( addSeparator, contextMenu, firstItemCommand, firstItemLabel, hasIcon ) --- 13,19 ---- * menu. Generaly a group of items is directly dependent of the same rules. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKContextMenuGroup = function( addSeparator, contextMenu, firstItemCommand, firstItemLabel, hasIcon ) Index: fckstylesloader.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fckstylesloader.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckstylesloader.js 1 Sep 2005 18:15:40 -0000 1.4 --- fckstylesloader.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 13,22 **** * for loading the styles defined in the XML file. * - * Version: 2.0 RC3 - * Modified: 2004-11-22 18:08:11 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKStylesLoader = function() --- 13,19 ---- * for loading the styles defined in the XML file. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKStylesLoader = function() Index: fckplugin.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fckplugin.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckplugin.js 1 Sep 2005 18:15:40 -0000 1.4 --- fckplugin.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * FCKPlugin Class: Represents a single plugin. * - * Version: 2.0 RC3 - * Modified: 2005-01-19 17:27:15 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ // Certifies that the "PluginsPath" configuration ends with a slash. --- 12,18 ---- * FCKPlugin Class: Represents a single plugin. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ // Certifies that the "PluginsPath" configuration ends with a slash. Index: fckevents.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fckevents.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckevents.js 1 Sep 2005 18:15:40 -0000 1.4 --- fckevents.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,46 **** * FCKEvents Class: used to handle events is a advanced way. * - * Version: 2.0 RC3 - * Modified: 2005-03-02 09:19:48 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ ! var FCKEvents = function( eventsOwner ) ! { ! this.Owner = eventsOwner ; ! this.RegisteredEvents = new Object() ; ! } ! FCKEvents.prototype.AttachEvent = function( eventName, functionPointer ) { ! if ( ! this.RegisteredEvents[ eventName ] ) this.RegisteredEvents[ eventName ] = new Array() ; ! ! this.RegisteredEvents[ eventName ][ this.RegisteredEvents[ eventName ].length ] = functionPointer ; ! } ! FCKEvents.prototype.FireEvent = function( eventName, params ) ! { ! var bReturnValue = true ; ! ! var oCalls = this.RegisteredEvents[ eventName ] ; ! if ( oCalls ) { ! for ( var i = 0 ; i < oCalls.length ; i++ ) ! bReturnValue = ( oCalls[ i ]( params ) && bReturnValue ) ; } - - return bReturnValue ; } \ No newline at end of file --- 12,48 ---- * FCKEvents Class: used to handle events is a advanced way. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ ! var FCKEvents ; ! if ( !( FCKEvents = NS.FCKEvents ) ) { ! FCKEvents = NS.FCKEvents = function( eventsOwner ) ! { ! this.Owner = eventsOwner ; ! this.RegisteredEvents = new Object() ; ! } ! FCKEvents.prototype.AttachEvent = function( eventName, functionPointer ) { ! if ( ! this.RegisteredEvents[ eventName ] ) this.RegisteredEvents[ eventName ] = new Array() ; ! ! this.RegisteredEvents[ eventName ][ this.RegisteredEvents[ eventName ].length ] = functionPointer ; ! } ! ! FCKEvents.prototype.FireEvent = function( eventName, params ) ! { ! var bReturnValue = true ; ! ! var oCalls = this.RegisteredEvents[ eventName ] ; ! if ( oCalls ) ! { ! for ( var i = 0 ; i < oCalls.length ; i++ ) ! bReturnValue = ( oCalls[ i ]( this.Owner, params ) && bReturnValue ) ; ! } ! ! return bReturnValue ; } } \ No newline at end of file Index: fcktoolbarspecialcombo.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fcktoolbarspecialcombo.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fcktoolbarspecialcombo.js 1 Sep 2005 18:15:40 -0000 1.4 --- fcktoolbarspecialcombo.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 19,28 **** * - CreateItems( targetSpecialCombo ) [ Add all items in the special combo ] * - * Version: 2.0 RC3 - * Modified: 2005-01-04 18:41:03 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKToolbarSpecialCombo = function() --- 19,25 ---- * - CreateItems( targetSpecialCombo ) [ Add all items in the special combo ] * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKToolbarSpecialCombo = function() *************** *** 32,35 **** --- 29,37 ---- } + function FCKToolbarSpecialCombo_OnSelect( itemId, item ) + { + this.Command.Execute( itemId, item ) ; + } + FCKToolbarSpecialCombo.prototype.CreateInstance = function( parentToolbar ) { *************** *** 45,52 **** this._Combo.Command = this.Command ; ! this._Combo.OnSelect = function( itemId, item ) ! { ! this.Command.Execute( itemId, item ) ; ! } } --- 47,58 ---- this._Combo.Command = this.Command ; ! this._Combo.OnSelect = FCKToolbarSpecialCombo_OnSelect ; ! } ! ! function FCKToolbarSpecialCombo_RefreshActiveItems( combo, value ) ! { ! combo.DeselectAll() ; ! combo.SelectItem( value ) ; ! combo.SetLabelById( value ) ; } *************** *** 66,79 **** eState = FCK_TRISTATE_ON ; ! if ( !this.RefreshActiveItems ) ! { ! this.RefreshActiveItems = function( combo, value ) ! { ! this._Combo.DeselectAll() ; ! this._Combo.SelectItem( value ) ; ! this._Combo.SetLabelById( value ) ; ! } ! } ! this.RefreshActiveItems( this._Combo, sValue ) ; } else --- 72,79 ---- eState = FCK_TRISTATE_ON ; ! if ( this.RefreshActiveItems ) ! this.RefreshActiveItems( this._Combo, sValue ) ; ! else ! FCKToolbarSpecialCombo_RefreshActiveItems( this._Combo, sValue ) ; } else Index: fcktoolbarbreak_gecko.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fcktoolbarbreak_gecko.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fcktoolbarbreak_gecko.js 1 Sep 2005 18:15:40 -0000 1.1 --- fcktoolbarbreak_gecko.js 29 Sep 2005 19:49:17 -0000 1.2 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 14,23 **** * This is the Gecko specific implementation. * - * Version: 2.0 RC3 - * Modified: 2005-02-09 18:04:04 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKToolbarBreak = function() --- 14,20 ---- * This is the Gecko specific implementation. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKToolbarBreak = function() Index: fckpanel_gecko.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fckpanel_gecko.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckpanel_gecko.js 1 Sep 2005 18:15:40 -0000 1.4 --- fckpanel_gecko.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * FCKPanel Class: Creates and manages floating panels in Gecko Browsers. * - * Version: 2.0 RC3 - * Modified: 2005-02-23 18:56:41 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKPanel = function( parentWindow ) --- 12,18 ---- * FCKPanel Class: Creates and manages floating panels in Gecko Browsers. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKPanel = function( parentWindow ) *************** *** 29,34 **** while ( this.Window != window.top ) { ! // Try/Catch must be used to avoit an error when using a frameset ! // on a different domain: // "Permission denied to get property HTMLDocument.Body". try --- 26,31 ---- while ( this.Window != window.top ) { ! // Try/Catch must be used to avoit an error when using a frameset ! // on a different domain: // "Permission denied to get property HTMLDocument.Body". try *************** *** 41,45 **** break ; } ! this.Window = this.Window.parent ; } --- 38,42 ---- break ; } ! this.Window = this.Window.parent ; } *************** *** 49,53 **** FCKPanel.prototype.Create = function() { ! this._IFrame = this.Window.document.body.appendChild( this.Window.document.createElement('IFRAME') ) ; this._IFrame.src = 'about:blank' ; this._IFrame.frameBorder = '0'; --- 46,50 ---- FCKPanel.prototype.Create = function() { ! this._IFrame = this.Window.document.body.appendChild( this.Window.document.createElement('iframe') ) ; this._IFrame.src = 'about:blank' ; this._IFrame.frameBorder = '0'; *************** *** 59,63 **** this._IFrame.style.position = 'absolute'; this._IFrame.style.visibility = 'hidden' ; ! this._IFrame.IsFCKPanel = true ; this._IFrame.Panel = this ; --- 56,60 ---- this._IFrame.style.position = 'absolute'; this._IFrame.style.visibility = 'hidden' ; ! this._IFrame.IsFCKPanel = true ; this._IFrame.Panel = this ; *************** *** 99,111 **** var oPos = this.GetElementPosition( relElement ) ; ! panelX += oPos.X ; panelY += oPos.Y ; ! if ( panelX + this.OuterDiv.offsetWidth > this.Window.innerWidth ) { // The following line aligns the panel to the other side of the refElement. // panelX = oPos.X - ( this.PanelDiv.offsetWidth - relElement.offsetWidth ) ; ! panelX -= panelX + this.OuterDiv.offsetWidth - this.Window.innerWidth ; } --- 96,108 ---- var oPos = this.GetElementPosition( relElement ) ; ! panelX += oPos.X ; panelY += oPos.Y ; ! if ( panelX + this.OuterDiv.offsetWidth > this.Window.innerWidth ) { // The following line aligns the panel to the other side of the refElement. // panelX = oPos.X - ( this.PanelDiv.offsetWidth - relElement.offsetWidth ) ; ! panelX -= panelX + this.OuterDiv.offsetWidth - this.Window.innerWidth ; } *************** *** 118,130 **** function SetOnClickListener( targetWindow, targetFunction ) { ! // Try/Catch must be used to avoit an error when using a frameset ! // on a different domain: // "Permission denied to get property Window.frameElement". ! try { if ( targetWindow == null || ( targetWindow.frameElement && targetWindow.frameElement.IsFCKPanel ) ) return ; ! targetWindow.document.addEventListener( 'click', targetFunction, false ) ; } catch (e) {} --- 115,127 ---- function SetOnClickListener( targetWindow, targetFunction ) { ! // Try/Catch must be used to avoit an error when using a frameset ! // on a different domain: // "Permission denied to get property Window.frameElement". ! try { if ( targetWindow == null || ( targetWindow.frameElement && targetWindow.frameElement.IsFCKPanel ) ) return ; ! targetWindow.document.addEventListener( 'click', targetFunction, false ) ; } catch (e) {} *************** *** 134,138 **** } SetOnClickListener( window.top, FCKPanelEventHandlers.OnDocumentClick ) ; ! this._IFrame.width = this.OuterDiv.offsetWidth ; this._IFrame.height = this.OuterDiv.offsetHeight ; --- 131,135 ---- } SetOnClickListener( window.top, FCKPanelEventHandlers.OnDocumentClick ) ; ! this._IFrame.width = this.OuterDiv.offsetWidth ; this._IFrame.height = this.OuterDiv.offsetHeight ; *************** *** 146,150 **** // Initializes the Coordinates object that will be returned by the function. var c = { X:0, Y:0 } ; ! // Loop throw the offset chain. while ( el ) --- 143,147 ---- // Initializes the Coordinates object that will be returned by the function. var c = { X:0, Y:0 } ; ! // Loop throw the offset chain. while ( el ) *************** *** 152,156 **** c.X += el.offsetLeft ; c.Y += el.offsetTop ; ! if ( el.offsetParent == null && el.ownerDocument.defaultView != this.Window ) el = el.ownerDocument.defaultView.frameElement ; --- 149,153 ---- c.X += el.offsetLeft ; c.Y += el.offsetTop ; ! if ( el.offsetParent == null && el.ownerDocument.defaultView != this.Window ) el = el.ownerDocument.defaultView.frameElement ; *************** *** 158,162 **** el = el.offsetParent ; } ! // Return the Coordinates object return c ; --- 155,159 ---- el = el.offsetParent ; } ! // Return the Coordinates object return c ; *************** *** 178,182 **** { var oWindow = e.target.ownerDocument.defaultView ; ! if ( ! oWindow.IsFCKPanel ) { --- 175,179 ---- { var oWindow = e.target.ownerDocument.defaultView ; ! if ( ! oWindow.IsFCKPanel ) { *************** *** 186,193 **** return ; ! // Try/Catch must be used to avoit an error when using a frameset ! // on a different domain: // "Permission denied to get property Window.frameElement". ! try { if ( targetWindow.frameElement && targetWindow.frameElement.IsFCKPanel ) --- 183,190 ---- return ; ! // Try/Catch must be used to avoit an error when using a frameset ! // on a different domain: // "Permission denied to get property Window.frameElement". ! try { if ( targetWindow.frameElement && targetWindow.frameElement.IsFCKPanel ) *************** *** 197,203 **** } catch (e) {} ! for ( var i = 0 ; i < targetWindow.frames.length ; i++ ) ! RemoveOnClickListener( targetWindow.frames[i] ) ; } RemoveOnClickListener( window.top ) ; --- 194,200 ---- } catch (e) {} ! for ( var i = 0 ; i < targetWindow.frames.length ; i++ ) ! RemoveOnClickListener( targetWindow.frames[i] ) ; } RemoveOnClickListener( window.top ) ; Index: fckstyledef.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/classes/fckstyledef.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckstyledef.js 1 Sep 2005 18:15:40 -0000 1.4 --- fckstyledef.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: ************... [truncated message content] |
From: Thyamad c. <th...@us...> - 2005-09-29 19:50:17
|
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/commandclasses In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/_source/commandclasses Modified Files: fck_othercommands.js fcknamedcommand.js fckpasteplaintextcommand.js fckpastewordcommand.js fckstylecommand.js fcktablecommand.js fcktextcolorcommand.js Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi Index: fcktablecommand.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/commandclasses/fcktablecommand.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fcktablecommand.js 1 Sep 2005 18:15:40 -0000 1.4 --- fcktablecommand.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 13,22 **** * "Paste as Plain Text" command. * - * Version: 2.0 RC3 - * Modified: 2004-11-22 15:41:58 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKTableCommand = function( command ) --- 13,19 ---- * "Paste as Plain Text" command. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKTableCommand = function( command ) *************** *** 27,30 **** --- 24,29 ---- FCKTableCommand.prototype.Execute = function() { + FCKUndo.SaveUndoStep() ; + switch ( this.Name ) { Index: fckpastewordcommand.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckpastewordcommand.js 1 Sep 2005 18:15:40 -0000 1.4 --- fckpastewordcommand.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * FCKPasteWordCommand Class: represents the "Paste from Word" command. * - * Version: 2.0 RC3 - * Modified: 2004-08-30 23:20:46 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKPasteWordCommand = function() --- 12,18 ---- * FCKPasteWordCommand Class: represents the "Paste from Word" command. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKPasteWordCommand = function() *************** *** 31,34 **** FCKPasteWordCommand.prototype.GetState = function() { ! return FCK.GetNamedCommandState( 'Paste' ) ; } --- 28,34 ---- FCKPasteWordCommand.prototype.GetState = function() { ! if ( FCKConfig.ForcePasteAsPlainText ) ! return FCK_TRISTATE_DISABLED ; ! else ! return FCK.GetNamedCommandState( 'Paste' ) ; } Index: fcknamedcommand.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/commandclasses/fcknamedcommand.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fcknamedcommand.js 1 Sep 2005 18:15:40 -0000 1.4 --- fcknamedcommand.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * FCKNamedCommand Class: represents an internal browser command. * - * Version: 2.0 RC3 - * Modified: 2004-08-17 15:05:35 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKNamedCommand = function( commandName ) --- 12,18 ---- * FCKNamedCommand Class: represents an internal browser command. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKNamedCommand = function( commandName ) *************** *** 33,35 **** return FCK.GetNamedCommandState( this.Name ) ; } - --- 30,31 ---- Index: fckstylecommand.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/commandclasses/fckstylecommand.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckstylecommand.js 1 Sep 2005 18:15:40 -0000 1.4 --- fckstylecommand.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** * FCKStyleCommand Class: represents the "Style" command. * - * Version: 2.0 RC3 - * Modified: 2004-11-22 11:07:24 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKStyleCommand = function() --- 12,18 ---- * FCKStyleCommand Class: represents the "Style" command. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKStyleCommand = function() Index: fckpasteplaintextcommand.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckpasteplaintextcommand.js 1 Sep 2005 18:15:40 -0000 1.4 --- fckpasteplaintextcommand.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 13,22 **** * "Paste as Plain Text" command. * - * Version: 2.0 RC3 - * Modified: 2004-08-20 23:08:23 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKPastePlainTextCommand = function() --- 13,19 ---- * "Paste as Plain Text" command. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ var FCKPastePlainTextCommand = function() Index: fck_othercommands.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/commandclasses/fck_othercommands.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fck_othercommands.js 1 Sep 2005 18:15:40 -0000 1.4 --- fck_othercommands.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 13,22 **** * browser (see FCKNamedCommand). * - * Version: 2.0 RC3 - * Modified: 2005-01-04 18:39:05 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ // ### General Dialog Box Commands. --- 13,19 ---- * browser (see FCKNamedCommand). * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ // ### General Dialog Box Commands. *************** *** 28,32 **** this.Width = width ; this.Height = height ; ! this.GetStateFunction = getStateFunction ; this.GetStateParam = getStateParam ; --- 25,29 ---- this.Width = width ; this.Height = height ; ! this.GetStateFunction = getStateFunction ; this.GetStateParam = getStateParam ; *************** *** 55,59 **** { alert( FCKLang.NotImplemented ) ; ! } FCKUndefinedCommand.prototype.GetState = function() --- 52,56 ---- { alert( FCKLang.NotImplemented ) ; ! } FCKUndefinedCommand.prototype.GetState = function() *************** *** 63,67 **** // ### FontName ! var FCKFontNameCommand = function() { this.Name = 'FontName' ; --- 60,64 ---- // ### FontName ! var FCKFontNameCommand = function() { this.Name = 'FontName' ; *************** *** 84,88 **** // ### FontSize ! var FCKFontSizeCommand = function() { this.Name = 'FontSize' ; --- 81,85 ---- // ### FontSize ! var FCKFontSizeCommand = function() { this.Name = 'FontSize' ; *************** *** 92,96 **** { if ( typeof( fontSize ) == 'string' ) fontSize = parseInt(fontSize) ; ! if ( fontSize == null || fontSize == '' ) { --- 89,93 ---- { if ( typeof( fontSize ) == 'string' ) fontSize = parseInt(fontSize) ; ! if ( fontSize == null || fontSize == '' ) { *************** *** 108,112 **** // ### FormatBlock ! var FCKFormatBlockCommand = function() { this.Name = 'FormatBlock' ; --- 105,109 ---- // ### FormatBlock ! var FCKFormatBlockCommand = function() { this.Name = 'FormatBlock' ; *************** *** 127,131 **** // ### Preview ! var FCKPreviewCommand = function() { this.Name = 'Preview' ; --- 124,128 ---- // ### Preview ! var FCKPreviewCommand = function() { this.Name = 'Preview' ; *************** *** 143,147 **** // ### Save ! var FCKSaveCommand = function() { this.Name = 'Save' ; --- 140,144 ---- // ### Save ! var FCKSaveCommand = function() { this.Name = 'Save' ; *************** *** 152,156 **** // Get the linked field form. var oForm = FCK.LinkedField.form ; ! // Submit the form. oForm.submit() ; --- 149,160 ---- // Get the linked field form. var oForm = FCK.LinkedField.form ; ! ! if ( typeof( oForm.onsubmit ) == 'function' ) ! { ! var bRet = oForm.onsubmit() ; ! if ( bRet != null && bRet === false ) ! return ; ! } ! // Submit the form. oForm.submit() ; *************** *** 163,167 **** // ### NewPage ! var FCKNewPageCommand = function() { this.Name = 'NewPage' ; --- 167,171 ---- // ### NewPage ! var FCKNewPageCommand = function() { this.Name = 'NewPage' ; *************** *** 170,174 **** FCKNewPageCommand.prototype.Execute = function() { ! FCK.SetHTML( FCKBrowserInfo.IsGecko ? ' ' : '' ) ; } --- 174,181 ---- FCKNewPageCommand.prototype.Execute = function() { ! FCKUndo.SaveUndoStep() ; ! FCK.SetHTML( '' ) ; ! // FCK.SetHTML( FCKBrowserInfo.IsGecko ? ' ' : '' ) ; ! // FCK.SetHTML( FCKBrowserInfo.IsGecko ? '<br _moz_editor_bogus_node="TRUE">' : '' ) ; } *************** *** 186,190 **** FCKSourceCommand.prototype.Execute = function() { ! FCK.SwitchEditMode() ; } --- 193,204 ---- FCKSourceCommand.prototype.Execute = function() { ! if ( FCKBrowserInfo.IsGecko ) ! { ! var iWidth = screen.width * 0.65 ; ! var iHeight = screen.height * 0.65 ; ! FCKDialog.OpenDialog( 'FCKDialog_Source', FCKLang.Source, 'dialog/fck_source.html', iWidth, iHeight, null, null, true ) ; ! } ! else ! FCK.SwitchEditMode() ; } *************** *** 192,194 **** --- 206,252 ---- { return ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ? FCK_TRISTATE_OFF : FCK_TRISTATE_ON ) ; + } + + // ### Undo + var FCKUndoCommand = function() + { + this.Name = 'Undo' ; + } + + FCKUndoCommand.prototype.Execute = function() + { + if ( FCKBrowserInfo.IsIE ) + FCKUndo.Undo() ; + else + FCK.ExecuteNamedCommand( 'Undo' ) ; + } + + FCKUndoCommand.prototype.GetState = function() + { + if ( FCKBrowserInfo.IsIE ) + return ( FCKUndo.Typing || FCKUndo.CurrentIndex > 0 ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ) ; + else + return FCK.GetNamedCommandState( 'Undo' ) ; + } + + // ### Redo + var FCKRedoCommand = function() + { + this.Name = 'Redo' ; + } + + FCKRedoCommand.prototype.Execute = function() + { + if ( FCKBrowserInfo.IsIE ) + FCKUndo.Redo() ; + else + FCK.ExecuteNamedCommand( 'Redo' ) ; + } + + FCKRedoCommand.prototype.GetState = function() + { + if ( FCKBrowserInfo.IsIE ) + return ( !FCKUndo.Typing && FCKUndo.CurrentIndex < ( FCKUndo.SavedData.length - 1 ) ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ) ; + else + return FCK.GetNamedCommandState( 'Redo' ) ; } \ No newline at end of file Index: fcktextcolorcommand.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fcktextcolorcommand.js 1 Sep 2005 18:15:40 -0000 1.4 --- fcktextcolorcommand.js 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 13,22 **** * color selection panel. * - * Version: 2.0 RC3 - * Modified: 2004-11-19 08:16:00 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ // FCKTextColorCommand Contructor --- 13,19 ---- * color selection panel. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ // FCKTextColorCommand Contructor *************** *** 86,89 **** --- 83,111 ---- } + function FCKTextColorCommand_OnMouseOver() { this.className='ColorSelected' ; } + + function FCKTextColorCommand_OnMouseOut() { this.className='ColorDeselected' ; } + + function FCKTextColorCommand_OnClick() + { + this.className = 'ColorDeselected' ; + this.Command.SetColor( '#' + this.Color ) ; + this.Command._Panel.Hide() ; + } + + function FCKTextColorCommand_AutoOnClick() + { + this.className = 'ColorDeselected' ; + this.Command.SetColor( '' ) ; + this.Command._Panel.Hide() ; + } + + function FCKTextColorCommand_MoreOnClick() + { + this.className = 'ColorDeselected' ; + this.Command._Panel.Hide() ; + FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, this.Command.SetColor ) ; + } + FCKTextColorCommand.prototype._CreatePanelBody = function( targetDocument, targetDiv ) { *************** *** 91,97 **** { var oDiv = targetDocument.createElement( "DIV" ) ; ! oDiv.className = 'ColorDeselected' ; ! oDiv.onmouseover = function() { this.className='ColorSelected' ; } ; ! oDiv.onmouseout = function() { this.className='ColorDeselected' ; } ; return oDiv ; --- 113,119 ---- { var oDiv = targetDocument.createElement( "DIV" ) ; ! oDiv.className = 'ColorDeselected' ; ! oDiv.onmouseover = FCKTextColorCommand_OnMouseOver ; ! oDiv.onmouseout = FCKTextColorCommand_OnMouseOut ; return oDiv ; *************** *** 120,132 **** oDiv.Command = this ; ! oDiv.onclick = function() ! { ! this.className = 'ColorDeselected' ; ! this.Command.SetColor( '' ) ; ! this.Command._Panel.Hide() ; ! } // Create an array of colors based on the configuration file. ! var aColors = FCKConfig.FontColors.split(',') ; // Create the colors table based on the array. --- 142,149 ---- oDiv.Command = this ; ! oDiv.onclick = FCKTextColorCommand_AutoOnClick ; // Create an array of colors based on the configuration file. ! var aColors = FCKConfig.FontColors.toString().split(',') ; // Create the colors table based on the array. *************** *** 143,152 **** oDiv.Command = this ; ! oDiv.onclick = function() ! { ! this.className = 'ColorDeselected' ; ! this.Command.SetColor( '#' + this.Color ) ; ! this.Command._Panel.Hide() ; ! } } } --- 160,164 ---- oDiv.Command = this ; ! oDiv.onclick = FCKTextColorCommand_OnClick ; } } *************** *** 160,168 **** oDiv.Command = this ; ! oDiv.onclick = function() ! { ! this.className = 'ColorDeselected' ; ! this.Command._Panel.Hide() ; ! FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, this.Command.SetColor ) ; ! } } \ No newline at end of file --- 172,175 ---- oDiv.Command = this ; ! oDiv.onclick = FCKTextColorCommand_MoreOnClick ; } \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2005-09-29 19:50:17
|
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/css In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/css Modified Files: fck_editorarea.css fck_internal.css Added Files: fck_showtableborders_gecko.css Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi --- NEW FILE: fck_showtableborders_gecko.css --- /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: fck_showtableborders_gecko.css * This CSS Style Sheet defines the rules to show table borders on Gecko. * * File Authors: * Frederico Caldeira Knabben (fr...@fc...) */ TABLE[border="0"], TABLE[border="0"] TD { border: #d3d3d3 1px solid } Index: fck_editorarea.css =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/css/fck_editorarea.css,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fck_editorarea.css 1 Sep 2005 18:15:41 -0000 1.4 --- fck_editorarea.css 29 Sep 2005 19:49:17 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 17,26 **** * file. * - * Version: 2.0 RC3 - * Modified: 2005-02-10 11:46:11 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ body --- 17,23 ---- * file. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ body *************** *** 34,37 **** --- 31,46 ---- } + /* + Just uncomment the following block if you want to avoid spaces between + paragraphs. Remember to apply the same style in your output front end page. + */ + /* + P, UL, LI + { + margin-top: 0px; + margin-bottom: 0px; + } + */ + .Bold { Index: fck_internal.css =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/css/fck_internal.css,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fck_internal.css 1 Sep 2005 18:15:41 -0000 1.1 --- fck_internal.css 29 Sep 2005 19:49:17 -0000 1.2 *************** *** 1,2 **** --- 1,19 ---- + /* + * FCKeditor - The text editor for internet + * Copyright (C) 2003-2005 Frederico Caldeira Knabben + * + * Licensed under the terms of the GNU Lesser General Public License: + * http://www.opensource.org/licenses/lgpl-license.php + * + * For further information visit: + * http://www.fckeditor.net/ + * + * File Name: fck_internal.css + * This CSS Style Sheet defines rules used by the editor for its internal use. + * + * File Authors: + * Frederico Caldeira Knabben (fr...@fc...) + */ + TABLE.FCK__ShowTableBorders, TABLE.FCK__ShowTableBorders TD { *************** *** 8,10 **** --- 25,46 ---- border: 1px dotted #FF0000; padding: 2px ; + } + + .FCK__Flash + { + border: darkgray 1px solid; + background-position: center center; + background-image: url(images/fck_flashlogo.gif); + background-repeat: no-repeat; + width: 80px ; + height: 80px ; + } + + .FCK__Anchor + { + background-position: center center; + background-image: url(images/fck_anchor.gif); + background-repeat: no-repeat; + width: 16px ; + height: 15px ; } \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2005-09-29 19:50:12
|
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/dialog/fck_universalkey In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/dialog/fck_universalkey Modified Files: data.js diacritic.js dialogue.js fck_universalkey.css multihexa.js Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi Index: fck_universalkey.css =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/dialog/fck_universalkey/fck_universalkey.css,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fck_universalkey.css 1 Sep 2005 18:15:42 -0000 1.1 --- fck_universalkey.css 29 Sep 2005 19:49:18 -0000 1.2 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,23 **** * CSS styles for the Universal Keyboard. * - * Version: 2.0 RC3 - * Modified: 2005-02-10 18:06:16 - * * File Authors: ! * Michel Staelens (mic...@wa...) ! * Bernadette Cierzniak ! * Abdul-Aziz Al-Oraij (to...@ho...) ! */ BODY, TEXTAREA, INPUT, TD, SELECT --- 12,20 ---- * CSS styles for the Universal Keyboard. * * File Authors: ! * Michel Staelens (mic...@wa...) ! * Bernadette Cierzniak ! * Abdul-Aziz Al-Oraij (to...@ho...) ! */ BODY, TEXTAREA, INPUT, TD, SELECT Index: multihexa.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/dialog/fck_universalkey/multihexa.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** multihexa.js 1 Sep 2005 18:15:42 -0000 1.1 --- multihexa.js 29 Sep 2005 19:49:18 -0000 1.2 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 13,24 **** * Definition des 104 caracteres en hexa unicode. * - * Version: 2.0 RC3 - * Modified: 2005-02-10 17:58:53 - * * File Authors: ! * Michel Staelens (mic...@wa...) ! * Bernadette Cierzniak ! * Abdul-Aziz Al-Oraij (to...@ho...) ! */ var caps=0, lock=0, hexchars="0123456789ABCDEF", accent="0000", keydeb=0 --- 13,21 ---- * Definition des 104 caracteres en hexa unicode. * * File Authors: ! * Michel Staelens (mic...@wa...) ! * Bernadette Cierzniak ! * Abdul-Aziz Al-Oraij (to...@ho...) ! */ var caps=0, lock=0, hexchars="0123456789ABCDEF", accent="0000", keydeb=0 *************** *** 230,263 **** function arkey(a) { if ((document.layers)|(navigator.userAgent.indexOf("MSIE 4")>-1)|(langue!="Arabic")) return true; ! key=event.keyCode; entry=true; cont=event.srcElement ; ! if (key>64 && key<91) { entry=false; ! source='? ??? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? '; ! shsource='? ??} ] ? [ ??? ÷ ? ? / ? à ? ? ? ? ?? { ? ? ? ~'; ! if (event.shiftKey) cont.value += shsource.substr((key-64)*2-2,2); else ! cont.value += source.substr((key-64)*2-2,2); if (cont.value.substr(cont.value.length-1,1)==' ') cont.value=cont.value.substr(0,cont.value.length-1); } if (event.shiftKey) { ! if (key==186) {cont.value += ':';entry=false;} ! if (key==188) {cont.value += ',';entry=false;} ! if (key==190) {cont.value += '.';entry=false;} ! if (key==191) {cont.value += '?';entry=false;} ! if (key==192) {cont.value += '?';entry=false;} ! if (key==219) {cont.value += '<';entry=false;} ! if (key==221) {cont.value += '>';entry=false;} } else { ! if (key==186) {cont.value += '?';entry=false;} ! if (key==188) {cont.value += '?';entry=false;} ! if (key==190) {cont.value += '?';entry=false;} ! if (key==191) {cont.value += '?';entry=false;} ! if (key==192) {cont.value += '?';entry=false;} ! if (key==219) {cont.value += '?';entry=false;} ! if (key==221) {cont.value += '?';entry=false;} ! if (key==222) {cont.value += '?';entry=false;} } --- 227,260 ---- function arkey(a) { if ((document.layers)|(navigator.userAgent.indexOf("MSIE 4")>-1)|(langue!="Arabic")) return true; ! keyCode=event.keyCode; entry=true; cont=event.srcElement ; ! if (keyCode>64 && keyCode<91) { entry=false; ! source='Ø´ ÙØ§Ø¤ Ù Ø« ب ٠ا ٠ت Ù Ù Ø© Ù Ø® Ø Ø¶ ٠س ٠ع ر ص Ø¡ غ ئ '; ! shsource='Ù ÙØ¢} ] Ù [ ÙØ£Ø£ ÷ Ù Ø / Ø¢ Ã Ø Ù Ù Ù ÙØ¥ { ٠٠إ ~'; ! if (event.shiftKey) cont.value += shsource.substr((keyCode-64)*2-2,2); else ! cont.value += source.substr((keyCode-64)*2-2,2); if (cont.value.substr(cont.value.length-1,1)==' ') cont.value=cont.value.substr(0,cont.value.length-1); } if (event.shiftKey) { ! if (keyCode==186) {cont.value += ':';entry=false;} ! if (keyCode==188) {cont.value += ',';entry=false;} ! if (keyCode==190) {cont.value += '.';entry=false;} ! if (keyCode==191) {cont.value += 'Ø';entry=false;} ! if (keyCode==192) {cont.value += 'Ù';entry=false;} ! if (keyCode==219) {cont.value += '<';entry=false;} ! if (keyCode==221) {cont.value += '>';entry=false;} } else { ! if (keyCode==186) {cont.value += 'Ù';entry=false;} ! if (keyCode==188) {cont.value += 'Ù';entry=false;} ! if (keyCode==190) {cont.value += 'ز';entry=false;} ! if (keyCode==191) {cont.value += 'ظ';entry=false;} ! if (keyCode==192) {cont.value += 'ذ';entry=false;} ! if (keyCode==219) {cont.value += 'ج';entry=false;} ! if (keyCode==221) {cont.value += 'د';entry=false;} ! if (keyCode==222) {cont.value += 'Ø·';entry=false;} } Index: diacritic.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/dialog/fck_universalkey/diacritic.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** diacritic.js 1 Sep 2005 18:15:42 -0000 1.1 --- diacritic.js 29 Sep 2005 19:49:18 -0000 1.2 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,22 **** * Scripts for the fck_universalkey.html page. * - * Version: 2.0 RC3 - * Modified: 2005-02-28 17:13:47 - * * File Authors: ! * Michel Staelens (mic...@wa...) ! * Abdul-Aziz Al-Oraij (to...@ho...) ! */ var dia = new Array() --- 12,19 ---- * Scripts for the fck_universalkey.html page. * * File Authors: ! * Michel Staelens (mic...@wa...) ! * Abdul-Aziz Al-Oraij (to...@ho...) ! */ var dia = new Array() Index: dialogue.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/dialog/fck_universalkey/dialogue.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dialogue.js 1 Sep 2005 18:15:42 -0000 1.1 --- dialogue.js 29 Sep 2005 19:49:18 -0000 1.2 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,24 **** * Scripts for the fck_universalkey.html page. * - * Version: 2.0 RC3 - * Modified: 2005-02-10 17:56:14 - * * File Authors: ! * Michel Staelens (mic...@wa...) ! * Bernadette Cierzniak ! * Abdul-Aziz Al-Oraij (to...@ho...) ! * Frederico Caldeira Knabben (fr...@fc...) ! */ function afficher(txt) --- 12,21 ---- * Scripts for the fck_universalkey.html page. * * File Authors: ! * Michel Staelens (mic...@wa...) ! * Bernadette Cierzniak ! * Abdul-Aziz Al-Oraij (to...@ho...) ! * Frederico Caldeira Knabben (fr...@fc...) ! */ function afficher(txt) Index: data.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/dialog/fck_universalkey/data.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** data.js 1 Sep 2005 18:15:42 -0000 1.1 --- data.js 29 Sep 2005 19:49:18 -0000 1.2 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 13,23 **** * Definition des 104 caracteres en hexa unicode. * - * Version: 2.0 RC3 - * Modified: 2005-02-28 17:13:45 - * * File Authors: ! * Michel Staelens (mic...@wa...) ! * Abdul-Aziz Al-Oraij (to...@ho...) ! */ var Maj = new Array() ; --- 13,20 ---- * Definition des 104 caracteres en hexa unicode. * * File Authors: ! * Michel Staelens (mic...@wa...) ! * Abdul-Aziz Al-Oraij (to...@ho...) ! */ var Maj = new Array() ; *************** *** 36,39 **** --- 33,38 ---- Maj["Danish (L)"] ="00A7|0021|0022|0023|00A4|0025|0026|002F|0028|0029|003D|003F|0060|0051|0057|0045|0052|0054|0059|0055|0049|004F|0050|00C5|005E|0041|0053|0044|0046|0047|0048|004A|004B|004C|00C6|00D8|003E|005A|0058|0043|0056|0042|004E|004D|003B|003A|002A|005F|007B|007D|005C|007E" ; Min["Danish (L)"] ="00BD|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002B|00B4|0071|0077|0065|0072|0074|0079|0075|0069|006F|0070|00E5|00A8|0061|0073|0064|0066|0067|0068|006A|006B|006C|00E6|00F8|003C|007A|0078|0063|0076|0062|006E|006D|002C|002E|0027|002D|005B|005D|007C|0040" ; + Maj["Farsi"] ="0020|0021|0040|0023|0024|0025|005E|0026|002A|0029|0028|005F|002B|0020|0020|0020|0020|0020|0020|0020|00F7|00D7|0020|007D|007B|0020|0020|005D|005B|0623|0622|0640|060C|061B|003A|0022|007E|0020|0020|0020|0020|0020|2019|003E|003C|061F|007C|0020|0020|0020|0020|0020" + Min["Farsi"] ="067E|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002D|003D|0636|0635|062B|0642|0641|063A|0639|0647|062E|062D|062C|0686|0634|0633|064A|0628|0644|0627|062A|0646|0645|0643|06AF|0638|0637|0632|0631|0630|062F|0621|0648|002E|002F|005C|0020|0020|0020|0020|0020" Maj["Finnish (L)"] ="00A7|0021|0022|0023|00A4|0025|0026|002F|0028|0029|003D|003F|0060|0051|0057|0045|0052|0054|0059|0055|0049|004F|0050|00C5|005E|0041|0053|0044|0046|0047|0048|004A|004B|004C|00D6|00C4|003E|005A|0058|0043|0056|0042|004E|004D|003B|003A|002A|005F|007B|007D|005C|007E" ; Min["Finnish (L)"] ="00BD|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002B|00B4|0071|0077|0065|0072|0074|0079|0075|0069|006F|0070|00E5|00A8|0061|0073|0064|0066|0067|0068|006A|006B|006C|00F6|00E4|003C|007A|0078|0063|0076|0062|006E|006D|002C|002E|0027|002D|005B|005D|007C|0040" ; |
From: Thyamad c. <th...@us...> - 2005-09-29 19:50:12
|
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/dialog/fck_link In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/dialog/fck_link Modified Files: fck_link.js Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi Index: fck_link.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/dialog/fck_link/fck_link.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fck_link.js 1 Sep 2005 18:15:42 -0000 1.1 --- fck_link.js 29 Sep 2005 19:49:18 -0000 1.2 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,25 **** * Scripts related to the Link dialog window (see fck_link.html). * - * Version: 2.0 RC3 - * Modified: 2005-02-09 13:53:13 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ ! var oEditor = window.parent.InnerDialogLoaded() ; ! var FCK = oEditor.FCK ; ! var FCKLang = oEditor.FCKLang ; //#### Dialog Tabs --- 12,23 ---- * Scripts related to the Link dialog window (see fck_link.html). * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ ! var oEditor = window.parent.InnerDialogLoaded() ; ! var FCK = oEditor.FCK ; ! var FCKLang = oEditor.FCKLang ; ! var FCKConfig = oEditor.FCKConfig ; //#### Dialog Tabs *************** *** 27,34 **** // Set the dialog tabs. window.parent.AddTab( 'Info', FCKLang.DlgLnkInfoTab ) ; ! window.parent.AddTab( 'Target', FCKLang.DlgLnkTargetTab, true ) ; ! // TODO : Enable File Upload (1/3). ! //window.parent.AddTab( 'Upload', 'Upload', true ) ; ! window.parent.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ; // Function called when a dialog tag is selected. --- 25,37 ---- // Set the dialog tabs. window.parent.AddTab( 'Info', FCKLang.DlgLnkInfoTab ) ; ! ! if ( !FCKConfig.LinkDlgHideTarget ) ! window.parent.AddTab( 'Target', FCKLang.DlgLnkTargetTab, true ) ; ! ! if ( FCKConfig.LinkUpload ) ! window.parent.AddTab( 'Upload', FCKLang.DlgLnkUpload, true ) ; ! ! if ( !FCKConfig.LinkDlgHideAdvanced ) ! window.parent.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ; // Function called when a dialog tag is selected. *************** *** 37,42 **** ShowE('divInfo' , ( tabCode == 'Info' ) ) ; ShowE('divTarget' , ( tabCode == 'Target' ) ) ; ! // TODO : Enable File Upload (2/3). ! // ShowE('divUpload' , ( tabCode == 'Upload' ) ) ; ShowE('divAttribs' , ( tabCode == 'Advanced' ) ) ; } --- 40,44 ---- ShowE('divInfo' , ( tabCode == 'Info' ) ) ; ShowE('divTarget' , ( tabCode == 'Target' ) ) ; ! ShowE('divUpload' , ( tabCode == 'Upload' ) ) ; ShowE('divAttribs' , ( tabCode == 'Advanced' ) ) ; } *************** *** 118,122 **** var oLink = FCK.Selection.MoveToAncestorNode( 'A' ) ; if ( oLink ) ! FCK.Selection.MoveToNode( oLink ) ; window.onload = function() --- 120,124 ---- var oLink = FCK.Selection.MoveToAncestorNode( 'A' ) ; if ( oLink ) ! FCK.Selection.SelectNode( oLink ) ; window.onload = function() *************** *** 135,143 **** // Show/Hide the "Browse Server" button. ! GetE('divBrowseServer').style.display = oEditor.FCKConfig.LinkBrowser ? '' : 'none' ; // Show the initial dialog content. GetE('divInfo').style.display = '' ; // Activate the "OK" button. window.parent.SetOkButton( true ) ; --- 137,149 ---- // Show/Hide the "Browse Server" button. ! GetE('divBrowseServer').style.display = FCKConfig.LinkBrowser ? '' : 'none' ; // Show the initial dialog content. GetE('divInfo').style.display = '' ; + // Set the actual uploader URL. + if ( FCKConfig.LinkUpload ) + GetE('frmUpload').action = FCKConfig.LinkUploadURL ; + // Activate the "OK" button. window.parent.SetOkButton( true ) ; *************** *** 282,289 **** ShowE('divLinkTypeEMail' , (linkType == 'email') ) ; ! window.parent.SetTabVisibility( 'Target' , (linkType == 'url') ) ; ! // TODO : Enable File Upload (3/3). ! // window.parent.SetTabVisibility( 'Upload' , (linkType == 'url') ) ; ! window.parent.SetTabVisibility( 'Advanced' , (linkType != 'anchor' || bHasAnchors) ) ; if ( linkType == 'email' ) --- 288,299 ---- ShowE('divLinkTypeEMail' , (linkType == 'email') ) ; ! if ( !FCKConfig.LinkDlgHideTarget ) ! window.parent.SetTabVisibility( 'Target' , (linkType == 'url') ) ; ! ! if ( FCKConfig.LinkUpload ) ! window.parent.SetTabVisibility( 'Upload' , (linkType == 'url') ) ; ! ! if ( !FCKConfig.LinkDlgHideAdvanced ) ! window.parent.SetTabVisibility( 'Advanced' , (linkType != 'anchor' || bHasAnchors) ) ; if ( linkType == 'email' ) *************** *** 453,457 **** --- 463,470 ---- if ( oLink ) // Modifying an existent link. + { + oEditor.FCKUndo.SaveUndoStep() ; oLink.href = sUri ; + } else // Creating a new link. { *************** *** 490,495 **** { // Set the browser window feature. ! var iWidth = oEditor.FCKConfig.LinkBrowserWindowWidth ; ! var iHeight = oEditor.FCKConfig.LinkBrowserWindowHeight ; var iLeft = (screen.width - iWidth) / 2 ; --- 503,508 ---- { // Set the browser window feature. ! var iWidth = FCKConfig.LinkBrowserWindowWidth ; ! var iHeight = FCKConfig.LinkBrowserWindowHeight ; var iLeft = (screen.width - iWidth) / 2 ; *************** *** 503,507 **** // Open the browser window. ! var oWindow = window.open( oEditor.FCKConfig.LinkBrowserURL, "FCKBrowseWindow", sOptions ) ; } --- 516,520 ---- // Open the browser window. ! var oWindow = window.open( FCKConfig.LinkBrowserURL, "FCKBrowseWindow", sOptions ) ; } *************** *** 510,512 **** --- 523,580 ---- document.getElementById('txtUrl').value = url ; OnUrlChange() ; + window.parent.SetSelectedTab( 'Info' ) ; + } + + function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) + { + switch ( errorNumber ) + { + case 0 : // No errors + alert( 'Your file has been successfully uploaded' ) ; + break ; + case 1 : // Custom error + alert( customMsg ) ; + return ; + case 101 : // Custom warning + alert( customMsg ) ; + break ; + case 201 : + alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ; + break ; + case 202 : + alert( 'Invalid file type' ) ; + return ; + case 203 : + alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ; + return ; + default : + alert( 'Error on file upload. Error number: ' + errorNumber ) ; + return ; + } + + SetUrl( fileUrl ) ; + GetE('frmUpload').reset() ; + } + + var oUploadAllowedExtRegex = new RegExp( FCKConfig.LinkUploadAllowedExtensions, 'i' ) ; + var oUploadDeniedExtRegex = new RegExp( FCKConfig.LinkUploadDeniedExtensions, 'i' ) ; + + function CheckUpload() + { + var sFile = GetE('txtUploadFile').value ; + + if ( sFile.length == 0 ) + { + alert( 'Please select a file to upload' ) ; + return false ; + } + + if ( ( FCKConfig.LinkUploadAllowedExtensions.length > 0 && !oUploadAllowedExtRegex.test( sFile ) ) || + ( FCKConfig.LinkUploadDeniedExtensions.length > 0 && oUploadDeniedExtRegex.test( sFile ) ) ) + { + OnUploadCompleted( 202 ) ; + return false ; + } + + return true ; } \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2005-09-29 19:50:12
|
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor Modified Files: fckconfig.js fckeditor.asp fckeditor.cfc fckeditor.cfm fckeditor.js fckeditor.php fckeditor.pl fckstyles.xml Added Files: _documentation.html _whatsnew.html fckeditor.afp fcktemplates.xml Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi Index: fckeditor.php =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/fckeditor.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckeditor.php 1 Sep 2005 18:15:38 -0000 1.4 --- fckeditor.php 29 Sep 2005 19:49:16 -0000 1.5 *************** *** 1,5 **** ! <?php /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,6 ---- ! <?php ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 15,24 **** * instances in PHP pages on server side. * - * Version: 2.0 RC3 - * Modified: 2005-03-02 12:38:37 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ class FCKeditor --- 16,22 ---- * instances in PHP pages on server side. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ class FCKeditor *************** *** 32,37 **** var $Config ; ! function FCKeditor( $instanceName ) ! { $this->InstanceName = $instanceName ; $this->BasePath = '/FCKeditor/' ; --- 30,36 ---- var $Config ; ! // PHP 5 Constructor (by Marcus Bointon <co...@us...>) ! function __construct( $instanceName ) ! { $this->InstanceName = $instanceName ; $this->BasePath = '/FCKeditor/' ; *************** *** 43,46 **** --- 42,51 ---- $this->Config = array() ; } + + // PHP 4 Contructor + function FCKeditor( $instanceName ) + { + $this->__construct( $instanceName ) ; + } function Create() *************** *** 60,70 **** if ( $this->ToolbarSet != '' ) ! $Link .= "&Toolbar={$this->ToolbarSet}" ; // Render the linked hidden field. ! $Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}\" name=\"{$this->InstanceName}\" value=\"{$HtmlValue}\">" ; // Render the configurations hidden field. ! $Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}___Config\" value=\"" . $this->GetConfigFieldString() . "\">" ; // Render the editor IFRAME. --- 65,75 ---- if ( $this->ToolbarSet != '' ) ! $Link .= "&Toolbar={$this->ToolbarSet}" ; // Render the linked hidden field. ! $Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}\" name=\"{$this->InstanceName}\" value=\"{$HtmlValue}\" />" ; // Render the configurations hidden field. ! $Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}___Config\" value=\"" . $this->GetConfigFieldString() . "\" />" ; // Render the editor IFRAME. *************** *** 93,97 **** function IsCompatible() { ! $sAgent = $_SERVER['HTTP_USER_AGENT'] ; if ( strpos($sAgent, 'MSIE') !== false && strpos($sAgent, 'mac') === false && strpos($sAgent, 'Opera') === false ) --- 98,107 ---- function IsCompatible() { ! global $HTTP_USER_AGENT ; ! ! if ( isset( $HTTP_USER_AGENT ) ) ! $sAgent = $HTTP_USER_AGENT ; ! else ! $sAgent = $_SERVER['HTTP_USER_AGENT'] ; if ( strpos($sAgent, 'MSIE') !== false && strpos($sAgent, 'mac') === false && strpos($sAgent, 'Opera') === false ) *************** *** 100,104 **** return ($iVersion >= 5.5) ; } ! else if ( strpos($sAgent, 'Gecko') !== false ) { $iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ; --- 110,114 ---- return ($iVersion >= 5.5) ; } ! else if ( strpos($sAgent, 'Gecko/') !== false ) { $iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ; *************** *** 117,121 **** { if ( $bFirst == false ) ! $sParams .= '&' ; else $bFirst = false ; --- 127,131 ---- { if ( $bFirst == false ) ! $sParams .= '&' ; else $bFirst = false ; Index: fckstyles.xml =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/fckstyles.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckstyles.xml 1 Sep 2005 18:15:38 -0000 1.4 --- fckstyles.xml 29 Sep 2005 19:49:16 -0000 1.5 *************** *** 1,6 **** <?xml version="1.0" encoding="utf-8" ?> ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,6 ---- <?xml version="1.0" encoding="utf-8" ?> ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 15,24 **** * See FCKConfig.StylesXmlPath in the configuration file. * - * Version: 2.0 RC3 - * Modified: 2005-02-09 13:51:09 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <Styles> <Style name="Image on Left" element="img"> --- 15,21 ---- * See FCKConfig.StylesXmlPath in the configuration file. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <Styles> <Style name="Image on Left" element="img"> --- NEW FILE: _documentation.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ --> <html> <head> <title>FCKeditor - Documentation</title> <style> BODY { FONT-FAMILY: Arial, Verdana, Sans-Serif } P { MARGIN-LEFT: 20px } </style> </head> <body> <H1>FCKeditor Documentation</H1> <P>You can find all the available documentation for FCKeditor online, at our wiki web site:</P> <BLOCKQUOTE dir="ltr" style="MARGIN-RIGHT: 0px"> <P><A href="http://fckeditor.wikiwikiweb.de/">http://fckeditor.wikiwikiweb.de/</A></P></BLOCKQUOTE> </body> </html> Index: fckeditor.cfm =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/fckeditor.cfm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckeditor.cfm 1 Sep 2005 18:15:38 -0000 1.4 --- fckeditor.cfm 29 Sep 2005 19:49:16 -0000 1.5 *************** *** 1,35 **** <cfsetting enablecfoutputonly="Yes"> ! <!--- ! * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben ! * ! * Licensed under the terms of the GNU Lesser General Public License: ! * http://www.opensource.org/licenses/lgpl-license.php ! * ! * For further information visit: ! * http://www.fckeditor.net/ ! * ! * File Name: fckeditor.cfm ! * ColdFusion integration. ! * Note this module is created for use with Coldfusion 4.52 and above. ! * For a cfc version for coldfusion mx check the fckeditor.cfc. ! * ! * Syntax: ! * ! * <cfmodule name="path/to/cfc/fckeditor" ! * instanceName="myEditor" ! * toolbarSet="..." ! * width="..." ! * height="..:" ! * value="..." ! * config="..." ! * > ! * ! * Version: 2.0 RC3 ! * Modified: 2004-12-22 13:51:08 ! * ! * File Authors: ! * Hendrik Kramer (hk...@lw...) ! ---> <!--- :: * Attribute validation --- 1,22 ---- <cfsetting enablecfoutputonly="Yes"> ! <!--- @Packager.Header ! <FileDescription> ! ColdFusion integration. ! Note this module is created for use with Coldfusion 4.52 and above. ! For a cfc version for coldfusion mx check the fckeditor.cfc. ! ! Syntax: ! ! <cfmodule name="path/to/cfc/fckeditor" ! instanceName="myEditor" ! toolbarSet="..." ! width="..." ! height="..:" ! value="..." ! config="..." ! > ! </FileDescription> ! <Author name="Hendrik Kramer" email="hk...@lw..." /> ! ---> <!--- :: * Attribute validation *************** *** 68,72 **** } // check for Gecko ( >= 20030210+ ) ! else if( find( "gecko", sAgent ) ) { // try to extract Gecko version date --- 55,59 ---- } // check for Gecko ( >= 20030210+ ) ! else if( find( "gecko/", sAgent ) ) { // try to extract Gecko version date *************** *** 104,108 **** // append toolbarset name to the url if( len( attributes.toolbarSet ) ) ! sURL = sURL & "&Toolbar=" & attributes.toolbarSet; // create configuration string: Key1=Value1&Key2=Value2&... (Key/Value:HTML encoded) --- 91,95 ---- // append toolbarset name to the url if( len( attributes.toolbarSet ) ) ! sURL = sURL & "&Toolbar=" & attributes.toolbarSet; // create configuration string: Key1=Value1&Key2=Value2&... (Key/Value:HTML encoded) *************** *** 115,121 **** */ lConfigKeys = ""; ! lConfigKeys = lConfigKeys & "CustomConfigurationsPath,EditorAreaCSS,Debug,SkinPath,PluginsPath,AutoDetectLanguage,DefaultLanguage,EnableXHTML,EnableSourceXHTML"; ! lConfigKeys = lConfigKeys & ",GeckoUseSPAN,StartupFocus,ForcePasteAsPlainText,LinkShowTargets,LinkTargets,LinkDefaultTarget,ToolbarStartExpanded,ToolbarCanCollapse"; ! lConfigKeys = lConfigKeys & ",ToolbarSets,FontColors,FontNames,FontSizes,FontFormats,StylesXmlPath,LinkBrowser,LinkBrowserURL,LinkBrowserWindowWidth,LinkBrowserWindowHeight"; lConfigKeys = lConfigKeys & ",LinkUpload,LinkUploadURL,LinkUploadWindowWidth,LinkUploadWindowHeight,LinkUploadAllowedExtensions,LinkUploadDeniedExtensions"; lConfigKeys = lConfigKeys & ",ImageBrowser,ImageBrowserURL,ImageBrowserWindowWidth,ImageBrowserWindowHeight,SmileyPath,SmileyImages,SmileyColumns,SmileyWindowWidth,SmileyWindowHeight"; --- 102,109 ---- */ lConfigKeys = ""; ! lConfigKeys = lConfigKeys & "CustomConfigurationsPath,EditorAreaCSS,DocType,BaseHref,FullPage,Debug,SkinPath,PluginsPath,AutoDetectLanguage,DefaultLanguage,ContentLangDirection,EnableXHTML,EnableSourceXHTML,ProcessHTMLEntities,IncludeLatinEntities,IncludeGreekEntities"; ! lConfigKeys = lConfigKeys & ",FillEmptyBlocks,FormatSource,FormatOutput,FormatIndentator,GeckoUseSPAN,StartupFocus,ForcePasteAsPlainText,ForceSimpleAmpersand,TabSpaces,ShowBorders,UseBROnCarriageReturn"; ! lConfigKeys = lConfigKeys & ",ToolbarStartExpanded,ToolbarCanCollapse,ToolbarSets,ContextMenu,FontColors,FontNames,FontSizes,FontFormats,StylesXmlPath,SpellChecker,IeSpellDownloadUrl,MaxUndoLevels"; ! lConfigKeys = lConfigKeys & ",LinkBrowser,LinkBrowserURL,LinkBrowserWindowWidth,LinkBrowserWindowHeight"; lConfigKeys = lConfigKeys & ",LinkUpload,LinkUploadURL,LinkUploadWindowWidth,LinkUploadWindowHeight,LinkUploadAllowedExtensions,LinkUploadDeniedExtensions"; lConfigKeys = lConfigKeys & ",ImageBrowser,ImageBrowserURL,ImageBrowserWindowWidth,ImageBrowserWindowHeight,SmileyPath,SmileyImages,SmileyColumns,SmileyWindowWidth,SmileyWindowHeight"; *************** *** 129,143 **** { if( len( sConfig ) ) ! sConfig = sConfig & "&"; fieldValue = attributes.config[key]; fieldName = listGetAt( lConfigKeys, iPos ); - // set all boolean possibilities in CFML to true/false values - if( isBoolean( fieldValue) and fieldValue ) - fieldValue = "true"; - else if( isBoolean( fieldValue) ) - fieldValue = "false"; - sConfig = sConfig & HTMLEditFormat( fieldName ) & '=' & HTMLEditFormat( fieldValue ); } --- 117,125 ---- { if( len( sConfig ) ) ! sConfig = sConfig & "&"; fieldValue = attributes.config[key]; fieldName = listGetAt( lConfigKeys, iPos ); sConfig = sConfig & HTMLEditFormat( fieldName ) & '=' & HTMLEditFormat( fieldValue ); } Index: fckeditor.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/fckeditor.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckeditor.js 1 Sep 2005 18:15:38 -0000 1.4 --- fckeditor.js 29 Sep 2005 19:49:16 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 16,25 **** * operations, use the specific integration system. * - * Version: 2.0 RC3 - * Modified: 2005-02-27 19:04:39 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ // FCKeditor Class --- 16,22 ---- * operations, use the specific integration system. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ // FCKeditor Class *************** *** 35,38 **** --- 32,36 ---- this.CheckBrowser = true ; this.DisplayErrors = true ; + this.EnableSafari = false ; // This is a temporary property, while Safari support is under development. this.Config = new Object() ; *************** *** 55,59 **** if ( !this.CheckBrowser || this._IsCompatibleBrowser() ) { ! document.write( '<input type="hidden" id="' + this.InstanceName + '" name="' + this.InstanceName + '" value="' + this._HTMLEncode( this.Value ) + '">' ) ; document.write( this._GetConfigHtml() ) ; document.write( this._GetIFrameHtml() ) ; --- 53,57 ---- if ( !this.CheckBrowser || this._IsCompatibleBrowser() ) { ! document.write( '<input type="hidden" id="' + this.InstanceName + '" name="' + this.InstanceName + '" value="' + this._HTMLEncode( this.Value ) + '" />' ) ; document.write( this._GetConfigHtml() ) ; document.write( this._GetIFrameHtml() ) ; *************** *** 108,116 **** for ( var o in this.Config ) { ! if ( sConfig.length > 0 ) sConfig += '&' ; sConfig += escape(o) + '=' + escape( this.Config[o] ) ; } ! return '<input type="hidden" id="' + this.InstanceName + '___Config" value="' + sConfig + '">' ; } --- 106,114 ---- for ( var o in this.Config ) { ! if ( sConfig.length > 0 ) sConfig += '&' ; sConfig += escape(o) + '=' + escape( this.Config[o] ) ; } ! return '<input type="hidden" id="' + this.InstanceName + '___Config" value="' + sConfig + '" />' ; } *************** *** 136,139 **** --- 134,140 ---- else if ( navigator.product == "Gecko" && navigator.productSub >= 20030210 ) return true ; + // Safari + else if ( this.EnableSafari && sAgent.indexOf( 'safari' ) != -1 ) + return ( sAgent.match( /safari\/(\d+)/ )[1] >= 312 ) ; // Build must be at least 312 (1.3) else return false ; --- NEW FILE: _whatsnew.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ --> <html> <head> <title>FCKeditor - What's New?</title> <style> body { font-family: Arial, Verdana, Sans-Serif; } p { margin-left: 20px; } </style></head> <body> <H3> [...1821 lines suppressed...] <LI> Optimizations when loading the editor. <LI> [SF BUG-709544] - Toolbar buttons wait for the images to be downloaded to start watching and responding the user actions (turn buttons on/off when the user changes position inside the editor). <LI> Javascript integration is now Object Oriented. CreateFCKeditor function is not available anymore. Take a look in test.html. <LI> Two new configuration options, ImageBrowser and ImageUpload, are available to turn on and off the image upload and image browsing options in the Image dialog box. This options can be hidden for a specific editor instance throw specific URL parameter in the editors IFRAME (upload=true/false&browse=true/false). All specific language integration modules handle this option. For sample see the _test directory. </LI> </UL></SPAN> </body> </html> Index: fckconfig.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/fckconfig.js,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckconfig.js 1 Sep 2005 18:15:38 -0000 1.4 --- fckconfig.js 29 Sep 2005 19:49:16 -0000 1.5 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 13,22 **** * See the documentation for more info. * - * Version: 2.0 RC3 - * Modified: 2005-02-27 21:31:48 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ FCKConfig.CustomConfigurationsPath = '' ; --- 13,19 ---- * See the documentation for more info. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ FCKConfig.CustomConfigurationsPath = '' ; *************** *** 24,27 **** --- 21,26 ---- FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ; + FCKConfig.DocType = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' ; + FCKConfig.BaseHref = '' ; *************** *** 40,45 **** FCKConfig.ContentLangDirection = 'ltr' ; ! FCKConfig.EnableXHTML = true ; ! FCKConfig.EnableSourceXHTML = true ; FCKConfig.FillEmptyBlocks = true ; --- 39,48 ---- FCKConfig.ContentLangDirection = 'ltr' ; ! FCKConfig.EnableXHTML = true ; // Unsupported: Do not change. ! FCKConfig.EnableSourceXHTML = true ; // Unsupported: Do not change. ! ! FCKConfig.ProcessHTMLEntities = true ; ! FCKConfig.IncludeLatinEntities = true ; ! FCKConfig.IncludeGreekEntities = true ; FCKConfig.FillEmptyBlocks = true ; *************** *** 58,64 **** FCKConfig.ToolbarStartExpanded = true ; FCKConfig.ToolbarCanCollapse = true ; FCKConfig.ToolbarSets["Default"] = [ ! ['Source','DocProps','-','Save','NewPage','Preview'], ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'], ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], --- 61,69 ---- FCKConfig.ToolbarStartExpanded = true ; FCKConfig.ToolbarCanCollapse = true ; + FCKConfig.IEForceVScroll = false ; + FCKConfig.IgnoreEmptyParagraphValue = true ; FCKConfig.ToolbarSets["Default"] = [ ! ['Source','DocProps','-','Save','NewPage','Preview','-','Templates'], ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'], ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], *************** *** 67,71 **** ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['Link','Unlink','Anchor'], ! ['Image','Table','Rule','Smiley','SpecialChar','UniversalKey'], ['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'], '/', --- 72,76 ---- ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['Link','Unlink','Anchor'], ! ['Image','Flash','Table','Rule','Smiley','SpecialChar','UniversalKey'], ['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'], '/', *************** *** 79,83 **** ] ; ! FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','TableCell','Table','Form'] ; FCKConfig.FontColors = '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF' ; --- 84,88 ---- ] ; ! FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','TableCell','Table','Form'] ; FCKConfig.FontColors = '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF' ; *************** *** 87,100 **** FCKConfig.FontFormats = 'p;div;pre;address;h1;h2;h3;h4;h5;h6' ; ! FCKConfig.StylesXmlPath = '../fckstyles.xml' ; FCKConfig.SpellChecker = 'ieSpell' ; // 'ieSpell' | 'SpellerPages' FCKConfig.IeSpellDownloadUrl = 'http://www.iespell.com/rel/ieSpellSetup211325.exe' ; FCKConfig.LinkBrowser = true ; FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/asp/connector.asp' ; //FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/asp/connector.asp&ServerPath=/CustomFiles/' ; ! //FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/aspx/connector.aspx' ; ! //FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/php/connector.php' ; FCKConfig.LinkBrowserWindowWidth = screen.width * 0.7 ; // 70% FCKConfig.LinkBrowserWindowHeight = screen.height * 0.7 ; // 70% --- 92,122 ---- FCKConfig.FontFormats = 'p;div;pre;address;h1;h2;h3;h4;h5;h6' ; ! FCKConfig.StylesXmlPath = FCKConfig.EditorPath + 'fckstyles.xml' ; ! FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.xml' ; FCKConfig.SpellChecker = 'ieSpell' ; // 'ieSpell' | 'SpellerPages' FCKConfig.IeSpellDownloadUrl = 'http://www.iespell.com/rel/ieSpellSetup211325.exe' ; + FCKConfig.MaxUndoLevels = 15 ; + + FCKConfig.DisableImageHandles = false ; + FCKConfig.DisableTableHandles = false ; + + FCKConfig.LinkDlgHideTarget = false ; + FCKConfig.LinkDlgHideAdvanced = false ; + + FCKConfig.ImageDlgHideLink = false ; + FCKConfig.ImageDlgHideAdvanced = false ; + + FCKConfig.FlashDlgHideAdvanced = false ; + FCKConfig.LinkBrowser = true ; FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/asp/connector.asp' ; //FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/asp/connector.asp&ServerPath=/CustomFiles/' ; ! // ASP.Net // FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/aspx/connector.aspx' ; ! // ColdFusion // FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/cfm/connector.cfm' ; ! // Perl // FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/perl/connector.cgi' ; ! // PHP // FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/php/connector.php' ; ! // PHP - mcpuk // FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/mcpuk/browser.html?Connector=connectors/php/connector.php' ; FCKConfig.LinkBrowserWindowWidth = screen.width * 0.7 ; // 70% FCKConfig.LinkBrowserWindowHeight = screen.height * 0.7 ; // 70% *************** *** 102,113 **** FCKConfig.ImageBrowser = true ; FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/asp/connector.asp' ; ! //FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/aspx/connector.aspx' ; ! //FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/php/connector.php' ; FCKConfig.ImageBrowserWindowWidth = screen.width * 0.7 ; // 70% ; FCKConfig.ImageBrowserWindowHeight = screen.height * 0.7 ; // 70% ; FCKConfig.SmileyPath = FCKConfig.BasePath + 'images/smiley/msn/' ; FCKConfig.SmileyImages = ['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'] ; FCKConfig.SmileyColumns = 8 ; FCKConfig.SmileyWindowWidth = 320 ; ! FCKConfig.SmileyWindowHeight = 240 ; \ No newline at end of file --- 124,168 ---- FCKConfig.ImageBrowser = true ; FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/asp/connector.asp' ; ! // ASP.Net // FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/aspx/connector.aspx' ; ! // ColdFusion // FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/cfm/connector.cfm' ; ! // Perl // FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/perl/connector.cgi' ; ! // PHP // FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/php/connector.php' ; ! // PHP - mcpuk // FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/mcpuk/browser.html?Type=Image&Connector=connectors/php/connector.php' ; FCKConfig.ImageBrowserWindowWidth = screen.width * 0.7 ; // 70% ; FCKConfig.ImageBrowserWindowHeight = screen.height * 0.7 ; // 70% ; + FCKConfig.FlashBrowser = true ; + FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/asp/connector.asp' ; + // ASP.Net // FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/aspx/connector.aspx' ; + // ColdFusion // FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/cfm/connector.cfm' ; + // Perl // FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/perl/connector.cgi' ; + // PHP // FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/php/connector.php' ; + // PHP - mcpuk // FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/mcpuk/browser.html?Type=Flash&Connector=connectors/php/connector.php' ; + FCKConfig.FlashBrowserWindowWidth = screen.width * 0.7 ; //70% ; + FCKConfig.FlashBrowserWindowHeight = screen.height * 0.7 ; //70% ; + + FCKConfig.LinkUpload = true ; + FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/upload/asp/upload.asp' ; + // PHP // FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/upload/php/upload.php' ; + 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 + + FCKConfig.ImageUpload = true ; + FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/upload/asp/upload.asp?Type=Image' ; + // PHP // FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/upload/php/upload.php?Type=Image' ; + FCKConfig.ImageUploadAllowedExtensions = ".(jpg|gif|jpeg|png)$" ; // empty for all + FCKConfig.ImageUploadDeniedExtensions = "" ; // empty for no one + + FCKConfig.FlashUpload = true ; + FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/upload/asp/upload.asp?Type=Flash' ; + // PHP // FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/upload/php/upload.php?Type=Flash' ; + FCKConfig.FlashUploadAllowedExtensions = ".(swf|fla)$" ; // empty for all + FCKConfig.FlashUploadDeniedExtensions = "" ; // empty for no one + FCKConfig.SmileyPath = FCKConfig.BasePath + 'images/smiley/msn/' ; FCKConfig.SmileyImages = ['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'] ; FCKConfig.SmileyColumns = 8 ; FCKConfig.SmileyWindowWidth = 320 ; ! FCKConfig.SmileyWindowHeight = 240 ; ! ! if( window.console ) window.console.log( 'Config is loaded!' ) ; // @Packager.Compactor.RemoveLine \ No newline at end of file Index: fckeditor.pl =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/fckeditor.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fckeditor.pl 1 Sep 2005 18:15:38 -0000 1.1 --- fckeditor.pl 29 Sep 2005 19:49:16 -0000 1.2 *************** *** 1,5 **** ! ##### # FCKeditor - The text editor for internet ! # Copyright (C) 2003-2004 Frederico Caldeira Knabben # # Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! ##### # FCKeditor - The text editor for internet ! # Copyright (C) 2003-2005 Frederico Caldeira Knabben # # Licensed under the terms of the GNU Lesser General Public License: *************** *** 12,21 **** # This is the integration file for Perl. # - # Version: 2.0 RC3 - # Modified: 2005-02-28 15:50:35 - # # File Authors: ! # Takashi Yamaguchi (ja...@om...) ! ##### #my $InstanceName; --- 12,18 ---- # This is the integration file for Perl. # # File Authors: ! # Takashi Yamaguchi (ja...@om...) ! ##### #my $InstanceName; *************** *** 65,77 **** $Link = $BasePath . "editor/fckeditor.html?InstanceName=$InstanceName"; if($ToolbarSet ne '') { ! $Link .= "&Toolbar=$ToolbarSet"; } #// Render the linked hidden field. ! $Html .= "<input type=\"hidden\" id=\"$InstanceName\" name=\"$InstanceName\" value=\"$HtmlValue\">" ; #// Render the configurations hidden field. $cfgstr = &GetConfigFieldString(); $wk = $InstanceName."___Config"; ! $Html .= "<input type=\"hidden\" id=\"$wk\" value=\"$cfgstr\">" ; #// Render the editor IFRAME. --- 62,74 ---- $Link = $BasePath . "editor/fckeditor.html?InstanceName=$InstanceName"; if($ToolbarSet ne '') { ! $Link .= "&Toolbar=$ToolbarSet"; } #// Render the linked hidden field. ! $Html .= "<input type=\"hidden\" id=\"$InstanceName\" name=\"$InstanceName\" value=\"$HtmlValue\" />" ; #// Render the configurations hidden field. $cfgstr = &GetConfigFieldString(); $wk = $InstanceName."___Config"; ! $Html .= "<input type=\"hidden\" id=\"$wk\" value=\"$cfgstr\" />" ; #// Render the editor IFRAME. *************** *** 102,110 **** $iVersion = substr($sAgent,index($sAgent,'MSIE') + 5,3); return($iVersion >= 5.5) ; ! } elsif($sAgent =~ /Gecko/i) { $iVersion = substr($sAgent,index($sAgent,'Gecko/') + 6,8); return($iVersion >= 20030210) ; } else { ! return(1); } } --- 99,107 ---- $iVersion = substr($sAgent,index($sAgent,'MSIE') + 5,3); return($iVersion >= 5.5) ; ! } elsif($sAgent =~ /Gecko\//i) { $iVersion = substr($sAgent,index($sAgent,'Gecko/') + 6,8); return($iVersion >= 20030210) ; } else { ! return(0); # 2.0 PR fix } } *************** *** 117,121 **** $sValue = $Config{$sKey}; if($bFirst == 1) { ! $sParams .= '&'; } else { $bFirst = 1; --- 114,118 ---- $sValue = $Config{$sKey}; if($bFirst == 1) { ! $sParams .= '&'; } else { $bFirst = 1; Index: fckeditor.asp =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/fckeditor.asp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckeditor.asp 1 Sep 2005 18:15:38 -0000 1.4 --- fckeditor.asp 29 Sep 2005 19:49:16 -0000 1.5 *************** *** 1,5 **** ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! <!-- * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 15,24 **** * instances in ASP pages on server side. * - * Version: 2.0 RC3 - * Modified: 2005-02-27 19:16:33 - * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <% Class FCKeditor --- 15,21 ---- * instances in ASP pages on server side. * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! --> <% Class FCKeditor *************** *** 64,68 **** Public Property Let Value( newValue ) ! sValue = newValue End Property --- 61,69 ---- Public Property Let Value( newValue ) ! If ( IsNull( newValue ) OR IsEmpty( newValue ) ) Then ! sValue = "" ! Else ! sValue = newValue ! End If End Property *************** *** 81,92 **** If (sToolbarSet & "") <> "" Then ! sLink = sLink + "&Toolbar=" & sToolbarSet End If ' Render the linked hidden field. ! Response.Write "<input type=""hidden"" id=""" & instanceName & """ name=""" & instanceName & """ value=""" & Server.HTMLEncode( sValue ) & """>" ' Render the configurations hidden field. ! Response.Write "<input type=""hidden"" id=""" & instanceName & "___Config"" value=""" & GetConfigFieldString() & """>" ' Render the editor IFRAME. --- 82,93 ---- If (sToolbarSet & "") <> "" Then ! sLink = sLink + "&Toolbar=" & sToolbarSet End If ' Render the linked hidden field. ! Response.Write "<input type=""hidden"" id=""" & instanceName & """ name=""" & instanceName & """ value=""" & Server.HTMLEncode( sValue ) & """ />" ' Render the configurations hidden field. ! Response.Write "<input type=""hidden"" id=""" & instanceName & "___Config"" value=""" & GetConfigFieldString() & """ />" ' Render the editor IFRAME. *************** *** 127,131 **** iVersion = CInt( ToNumericFormat( Mid(sAgent, InStr(sAgent, "MSIE") + 5, 3) ) ) IsCompatible = ( iVersion >= 5.5 ) ! ElseIf InStr(sAgent, "Gecko") > 0 Then iVersion = CLng( Mid( sAgent, InStr( sAgent, "Gecko/" ) + 6, 8 ) ) IsCompatible = ( iVersion >= 20030210 ) --- 128,132 ---- iVersion = CInt( ToNumericFormat( Mid(sAgent, InStr(sAgent, "MSIE") + 5, 3) ) ) IsCompatible = ( iVersion >= 5.5 ) ! ElseIf InStr(sAgent, "Gecko/") > 0 Then iVersion = CLng( Mid( sAgent, InStr( sAgent, "Gecko/" ) + 6, 8 ) ) IsCompatible = ( iVersion >= 20030210 ) *************** *** 160,164 **** If bFirst = False Then ! sParams = sParams & "&" Else bFirst = False --- 161,165 ---- If bFirst = False Then ! sParams = sParams & "&" Else bFirst = False --- NEW FILE: fckeditor.afp --- <% * FCKeditor - The text editor for internet * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: sampleposteddata.afp * This page lists the data posted by a form. * * Version: 1.0 * Modified: 2005-07-01 * * File Authors: Soenke Freitag (www.afp-hosting.de) * DEFINE CLASS goFckeditor AS CONTAINER OLEPUBLIC cInstanceName ="" BasePath ="" cWIDTH ="" cHEIGHT ="" ToolbarSet ="" cValue="" DIMENSION aConfig(10,2) && ----------------------------------------------------------------------- FUNCTION fckeditor( tcInstanceName ) LOCAL lnLoop,lnLoop2 THIS.cInstanceName = tcInstanceName THIS.BasePath = '/FCKeditor/' THIS.cWIDTH = '100%' THIS.cHEIGHT = '200' THIS.ToolbarSet = 'Default' THIS.cValue = '' FOR lnLoop=1 TO 10 FOR lnLoop2=1 TO 2 THIS.aConfig(lnLoop,lnLoop2) = "" NEXT NEXT RETURN ENDFUNC && ----------------------------------------------------------------------- FUNCTION CREATE() ? THIS.CreateHtml() RETURN ENDFUNC && ----------------------------------------------------------------------- FUNCTION CreateHtml() LOCAL html LOCAL lcLink HtmlValue = THIS.cValue && HTMLSPECIALCHARS() html = [<div>] IF THIS.IsCompatible() lcLink = THIS.BasePath+[editor/fckeditor.html?InstanceName=]+THIS.cInstanceName IF ( THIS.ToolbarSet # '' ) lcLink = lcLink + [Toolbar=]+THIS.ToolbarSet ENDIF && Render the LINKED HIDDEN FIELD. html = html + [<input type="hidden" id="]+THIS.cInstanceName +[" name="]+THIS.cInstanceName +[" value="]+HtmlValue+[">] && Render the configurations HIDDEN FIELD. html = html + [<input type="hidden" id="]+THIS.cInstanceName +[___Config" value="]+THIS.GetConfigFieldString() + [">] +CHR(13)+CHR(10) && Render the EDITOR IFRAME. html = html + [<iframe id="]+THIS.cInstanceName +[___Frame" src="Link" width="]+THIS.cWIDTH+[" height="]+THIS.cHEIGHT+[" frameborder="no" scrolling="no"></iframe>] ELSE IF ( AT("%", THIS.cWIDTH)=0 ) WidthCSS = THIS.cWIDTH + 'px' ELSE WidthCSS = THIS.cWIDTH ENDIF IF ( AT("%",THIS.cHEIGHT)=0 ) HeightCSS = THIS.cHEIGHT + 'px' ELSE HeightCSS = THIS.cHEIGHT ENDIF html = html + [<textarea name="]+THIS.cInstanceName +[" rows="4" cols="40" style="width: ]+WidthCSS+[ height: ]+HeightCSS+[" wrap="virtual">]+HtmlValue+[</textarea>] ENDIF html = html + [</div>] RETURN (html) ENDFUNC && ----------------------------------------------------------------------- FUNCTION IsCompatible() LOCAL llRetval LOCAL sAgent llRetval=.F. sAgent = LOWER(ALLTRIM(request.servervariables("HTTP_USER_AGENT"))) IF AT("msie",sAgent) >0 .AND. AT("mac",sAgent)=0 .AND. AT("opera",sAgent)=0 iVersion=VAL(SUBSTR(sAgent,AT("msie",sAgent)+5,3)) llRetval= iVersion > 5.5 ELSE IF AT("gecko",sAgent)>0 iVersion=VAL(SUBSTR(sAgent,AT("gecko/",sAgent)+6,8)) llRetval =iVersion > 20030210 ENDIF ENDIF RETURN (llRetval) ENDFUNC && ----------------------------------------------------------------------- FUNCTION GetConfigFieldString() LOCAL sParams LOCAL bFirst LOCAL sKey sParams = "" bFirst = .T. FOR lnLoop=1 TO 10 && ALEN(this.aconfig) IF !EMPTY(THIS.aConfig(lnLoop,1)) IF bFirst = .F. sParams = sParams + "&" ELSE bFirst = .F. ENDIF sParams = sParams +THIS.aConfig(lnLoop,1)+[=]+THIS.aConfig(lnLoop,2) ELSE EXIT ENDIF NEXT RETURN(sParams) ENDFUNC ENDDEFINE %> --- NEW FILE: fcktemplates.xml --- <?xml version="1.0" encoding="utf-8" ?> <Templates imagesBasePath="fck_template/images/"> <Template title="Image and Title" image="template1.gif"> <Description>One main image with a title and text that surround the image.</Description> <Html> <![CDATA[ <img style="MARGIN-RIGHT: 10px" height="100" alt="" width="100" align="left"/> <h3>Type the title here</h3> Type the text here ]]> </Html> </Template> <Template title="Strange Template" image="template2.gif"> <Description>A template that defines two colums, each one with a title, and some text.</Description> <Html> <![CDATA[ <table cellspacing="0" cellpadding="0" width="100%" border="0"> <tbody> <tr> <td width="50%"> <h3>Title 1</h3> </td> <td> </td> <td width="50%"> <h3>Title 2</h3> </td> </tr> <tr> <td>Text 1</td> <td> </td> <td>Text 2</td> </tr> </tbody> </table> More text goes here. ]]> </Html> </Template> <Template title="Text and Table" image="template3.gif"> <Description>A title with some text and a table.</Description> <Html> <![CDATA[ <table align="left" width="80%" border="0" cellspacing="0" cellpadding="0"><tr><td> <h3>Title goes here</h3> <p> <table style="FLOAT: right" cellspacing="0" cellpadding="0" width="150" border="1"> <tbody> <tr> <td align="center" colspan="3"><strong>Table title</strong></td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </tbody> </table> Type the text here</p> </td></tr></table> ]]> </Html> </Template> </Templates> Index: fckeditor.cfc =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/fckeditor.cfc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fckeditor.cfc 1 Sep 2005 18:15:38 -0000 1.4 --- fckeditor.cfc 29 Sep 2005 19:49:16 -0000 1.5 *************** *** 1,43 **** ! <cfcomponent output="false" displayname="FCKEditor" hint="Create an instance of the FCKEditor."> ! <!--- ! * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben ! * ! * Licensed under the terms of the GNU Lesser General Public License: ! * http://www.opensource.org/licenses/lgpl-license.php ! * ! * For further information visit: ! * http://www.fckeditor.net/ ! * ! * File Name: fckeditor.cfc ! * ColdFusion MX integration. ! * Note this CFC is created for use only with Coldfusion MX and above. ! * For older version, check the fckeditor.cfm. ! * ! * Syntax: ! * ! * <cfscript> ! * fckEditor = createObject("component", "fckEditorV2/fckeditor"); ! * fckEditor.instanceName="myEditor"; ! * fckEditor.basePath="/fckEditorV2/"; ! * fckEditor.value="This is my <strong>initial</strong> html text."; ! * fckEditor.width="100%"; ! * fckEditor.height="200"; ! * // ... additional parameters ... ! * fckEditor.create(); // create instance now. ! * </cfscript> ! * ! * See your macromedia coldfusion mx documentation for more info. ! * ! * *** Note: ! * Do not use path names with a "." (dot) in the name. This is a coldfusion ! * limitation with the cfc invocation. ! * ! * Version: 2.0 RC3 ! * Modified: 2004-12-22 13:49:40 ! * ! * File Authors: ! * Hendrik Kramer (hk...@lw...) ! ---> <cffunction name="create" --- 1,30 ---- ! <cfcomponent output="false" displayname="FCKeditor" hint="Create an instance of the FCKeditor."> ! <!--- @Packager.Header ! <FileDescription> ! ColdFusion MX integration. ! Note this CFC is created for use only with Coldfusion MX and above. ! For older version, check the fckeditor.cfm. ! ! Syntax: ! ! <cfscript> ! fckEditor = createObject("component", "fckEditorV2/fckeditor"); ! fckEditor.instanceName="myEditor"; ! fckEditor.basePath="/fckEditorV2/"; ! fckEditor.value="This is my <strong>initial</strong> html text."; ! fckEditor.width="100%"; ! fckEditor.height="200"; ! // ... additional parameters ... ! fckEditor.create(); // create instance now. ! </cfscript> ! ! See your macromedia coldfusion mx documentation for more info. ! ! *** Note: ! Do not use path names with a "." (dot) in the name. This is a coldfusion ! limitation with the cfc invocation. ! </FileDescription> ! <Author name="Hendrik Kramer" email="hk...@lw..." /> ! ---> <cffunction name="create" *************** *** 45,49 **** output="true" returntype="void" ! hint="Initialize the FCKEditor instance." > --- 32,36 ---- output="true" returntype="void" ! hint="Initialize the FCKeditor instance." > *************** *** 97,101 **** } // check for Gecko ( >= 20030210+ ) ! else if( find( "gecko", sAgent ) ) { // try to extract Gecko version date --- 84,88 ---- } // check for Gecko ( >= 20030210+ ) ! else if( find( "gecko/", sAgent ) ) { // try to extract Gecko version date *************** *** 157,161 **** // append toolbarset name to the url if( len( this.toolbarSet ) ) ! sURL = sURL & "&Toolbar=" & this.toolbarSet; </cfscript> --- 144,148 ---- // append toolbarset name to the url if( len( this.toolbarSet ) ) ! sURL = sURL & "&Toolbar=" & this.toolbarSet; </cfscript> *************** *** 192,198 **** * changed 20041206 hk...@lw... (improvements are welcome!) */ ! lConfigKeys = lConfigKeys & "CustomConfigurationsPath,EditorAreaCSS,Debug,SkinPath,PluginsPath,AutoDetectLanguage,DefaultLanguage,EnableXHTML,EnableSourceXHTML"; ! lConfigKeys = lConfigKeys & ",GeckoUseSPAN,StartupFocus,ForcePasteAsPlainText,LinkShowTargets,LinkTargets,LinkDefaultTarget,ToolbarStartExpanded,ToolbarCanCollapse"; ! lConfigKeys = lConfigKeys & ",ToolbarSets,FontColors,FontNames,FontSizes,FontFormats,StylesXmlPath,LinkBrowser,LinkBrowserURL,LinkBrowserWindowWidth,LinkBrowserWindowHeight"; lConfigKeys = lConfigKeys & ",LinkUpload,LinkUploadURL,LinkUploadWindowWidth,LinkUploadWindowHeight,LinkUploadAllowedExtensions,LinkUploadDeniedExtensions"; lConfigKeys = lConfigKeys & ",ImageBrowser,ImageBrowserURL,ImageBrowserWindowWidth,ImageBrowserWindowHeight,SmileyPath,SmileyImages,SmileyColumns,SmileyWindowWidth,SmileyWindowHeight"; --- 179,186 ---- * changed 20041206 hk...@lw... (improvements are welcome!) */ ! lConfigKeys = lConfigKeys & "CustomConfigurationsPath,EditorAreaCSS,DocType,BaseHref,FullPage,Debug,SkinPath,PluginsPath,AutoDetectLanguage,DefaultLanguage,ContentLangDirection,EnableXHTML,EnableSourceXHTML,ProcessHTMLEntities,IncludeLatinEntities,IncludeGreekEntities"; ! lConfigKeys = lConfigKeys & ",FillEmptyBlocks,FormatSource,FormatOutput,FormatIndentator,GeckoUseSPAN,StartupFocus,ForcePasteAsPlainText,ForceSimpleAmpersand,TabSpaces,ShowBorders,UseBROnCarriageReturn"; ! lConfigKeys = lConfigKeys & ",ToolbarStartExpanded,ToolbarCanCollapse,ToolbarSets,ContextMenu,FontColors,FontNames,FontSizes,FontFormats,StylesXmlPath,SpellChecker,IeSpellDownloadUrl,MaxUndoLevels"; ! lConfigKeys = lConfigKeys & ",LinkBrowser,LinkBrowserURL,LinkBrowserWindowWidth,LinkBrowserWindowHeight"; lConfigKeys = lConfigKeys & ",LinkUpload,LinkUploadURL,LinkUploadWindowWidth,LinkUploadWindowHeight,LinkUploadAllowedExtensions,LinkUploadDeniedExtensions"; lConfigKeys = lConfigKeys & ",ImageBrowser,ImageBrowserURL,ImageBrowserWindowWidth,ImageBrowserWindowHeight,SmileyPath,SmileyImages,SmileyColumns,SmileyWindowWidth,SmileyWindowHeight"; *************** *** 204,208 **** { if( len( sParams ) ) ! sParams = sParams & "&"; fieldValue = this.config[key]; --- 192,196 ---- { if( len( sParams ) ) ! sParams = sParams & "&"; fieldValue = this.config[key]; |
From: Thyamad c. <th...@us...> - 2005-09-29 19:50:09
|
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/dialog/fck_image In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/dialog/fck_image Modified Files: fck_image.js Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi Index: fck_image.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/dialog/fck_image/fck_image.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fck_image.js 1 Sep 2005 18:15:42 -0000 1.1 --- fck_image.js 29 Sep 2005 19:49:18 -0000 1.2 *************** *** 1,5 **** ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: --- 1,5 ---- ! /* * FCKeditor - The text editor for internet ! * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: *************** *** 10,32 **** * * File Name: fck_image.js ! * Scripts related to the Link dialog window (see fck_link.html). ! * ! * Version: 2.0 RC3 ! * Modified: 2005-02-19 17:12:36 * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ ! var oEditor = window.parent.InnerDialogLoaded() ; ! var FCK = oEditor.FCK ; //#### Dialog Tabs // Set the dialog tabs. ! window.parent.AddTab( 'Info', oEditor.FCKLang.DlgImgInfoTab ) ; ! // TODO : Enable File Upload (1/3). ! //window.parent.AddTab( 'Upload', 'Upload', true ) ; ! window.parent.AddTab( 'Advanced', oEditor.FCKLang.DlgAdvancedTag ) ; // Function called when a dialog tag is selected. --- 10,39 ---- * * File Name: fck_image.js ! * Scripts related to the Image dialog window (see fck_image.html). * * File Authors: ! * Frederico Caldeira Knabben (fr...@fc...) ! */ ! var oEditor = window.parent.InnerDialogLoaded() ; ! var FCK = oEditor.FCK ; ! var FCKLang = oEditor.FCKLang ; ! var FCKConfig = oEditor.FCKConfig ; ! ! var bImageButton = ( document.location.search.length > 0 && document.location.search.substr(1) == 'ImageButton' ) ; //#### Dialog Tabs // Set the dialog tabs. ! window.parent.AddTab( 'Info', FCKLang.DlgImgInfoTab ) ; ! ! if ( !bImageButton && !FCKConfig.ImageDlgHideLink ) ! window.parent.AddTab( 'Link', FCKLang.DlgImgLinkTab ) ; ! ! if ( FCKConfig.ImageUpload ) ! window.parent.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ; ! ! if ( !FCKConfig.ImageDlgHideAdvanced ) ! window.parent.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ; // Function called when a dialog tag is selected. *************** *** 34,44 **** { ShowE('divInfo' , ( tabCode == 'Info' ) ) ; ! // TODO : Enable File Upload (2/3). ! // ShowE('divUpload' , ( tabCode == 'Upload' ) ) ; ShowE('divAdvanced' , ( tabCode == 'Advanced' ) ) ; } - var bImageButton = ( document.location.search.length > 0 && document.location.search.substr(1) == 'ImageButton' ) ; - // Get the selected image (if available). var oImage = FCK.Selection.GetSelectedElement() ; --- 41,49 ---- { ShowE('divInfo' , ( tabCode == 'Info' ) ) ; ! ShowE('divLink' , ( tabCode == 'Link' ) ) ; ! ShowE('divUpload' , ( tabCode == 'Upload' ) ) ; ShowE('divAdvanced' , ( tabCode == 'Advanced' ) ) ; } // Get the selected image (if available). var oImage = FCK.Selection.GetSelectedElement() ; *************** *** 47,66 **** oImage = null ; var oImageOriginal ; function UpdateOriginal( resetSize ) { ! oImageOriginal = document.createElement( 'IMG' ) ; // new Image() ; ! ! if ( resetSize ) ! { ! oImageOriginal.onload = function() ! { ! this.onload = null ; ! ResetSizes() ; ! } } ! ! oImageOriginal.src = GetE('imgPreview').src ; } --- 52,74 ---- oImage = null ; + // Get the active link. + var oLink = FCK.Selection.MoveToAncestorNode( 'A' ) ; + var oImageOriginal ; function UpdateOriginal( resetSize ) { ! oImageOriginal = document.createElement( 'IMG' ) ; // new Image() ; ! ! if ( resetSize ) ! { ! oImageOriginal.onload = function() ! { ! this.onload = null ; ! ResetSizes() ; ! } } ! ! oImageOriginal.src = GetE('imgPreview').src ; } *************** *** 70,75 **** oEditor.FCKLanguageManager.TranslatePage(document) ; ! GetE('btnLockSizes').title = oEditor.FCKLang.DlgImgLockRatio ; ! GetE('btnResetSize').title = oEditor.FCKLang.DlgBtnResetSize ; // Load the selected element information (if any). --- 78,83 ---- oEditor.FCKLanguageManager.TranslatePage(document) ; ! GetE('btnLockSizes').title = FCKLang.DlgImgLockRatio ; ! GetE('btnResetSize').title = FCKLang.DlgBtnResetSize ; // Load the selected element information (if any). *************** *** 77,84 **** // Show/Hide the "Browse Server" button. ! GetE('tdBrowse').style.display = oEditor.FCKConfig.ImageBrowser ? '' : 'none' ; UpdateOriginal() ; window.parent.SetAutoSize( true ) ; --- 85,97 ---- // Show/Hide the "Browse Server" button. ! GetE('tdBrowse').style.display = FCKConfig.ImageBrowser ? '' : 'none' ; ! GetE('divLnkBrowseServer').style.display = FCKConfig.LinkBrowser ? '' : 'none' ; UpdateOriginal() ; + // Set the actual uploader URL. + if ( FCKConfig.ImageUpload ) + GetE('frmUpload').action = FCKConfig.ImageUploadURL ; + window.parent.SetAutoSize( true ) ; *************** *** 91,116 **** if ( ! oImage ) return ; ! var sUrl = GetAttribute( oImage, 'src', '' ) ; ! // TODO: Wait stable version and remove the following commented lines. // if ( sUrl.startsWith( FCK.BaseUrl ) ) // sUrl = sUrl.remove( 0, FCK.BaseUrl.length ) ; ! GetE('txtUrl').value = sUrl ; ! GetE('txtAlt').value = GetAttribute( oImage, 'alt', '' ) ; ! GetE('txtVSpace').value = GetAttribute( oImage, 'vspace', '' ) ; ! GetE('txtHSpace').value = GetAttribute( oImage, 'hspace', '' ) ; ! GetE('txtBorder').value = GetAttribute( oImage, 'border', '' ) ; ! GetE('cmbAlign').value = GetAttribute( oImage, 'align', '' ) ; ! ! if ( oImage.style.pixelWidth > 0 ) ! GetE('txtWidth').value = oImage.style.pixelWidth ; ! else ! GetE('txtWidth').value = GetAttribute( oImage, "width", '' ) ; ! ! if ( oImage.style.pixelHeight > 0 ) ! GetE('txtHeight').value = oImage.style.pixelHeight ; ! else ! GetE('txtHeight').value = GetAttribute( oImage, "height", '' ) ; // Get Advances Attributes --- 104,129 ---- if ( ! oImage ) return ; ! var sUrl = GetAttribute( oImage, 'src', '' ) ; ! // TODO: Wait stable version and remove the following commented lines. // if ( sUrl.startsWith( FCK.BaseUrl ) ) // sUrl = sUrl.remove( 0, FCK.BaseUrl.length ) ; ! GetE('txtUrl').value = sUrl ; ! GetE('txtAlt').value = GetAttribute( oImage, 'alt', '' ) ; ! GetE('txtVSpace').value = GetAttribute( oImage, 'vspace', '' ) ; ! GetE('txtHSpace').value = GetAttribute( oImage, 'hspace', '' ) ; ! GetE('txtBorder').value = GetAttribute( oImage, 'border', '' ) ; ! GetE('cmbAlign').value = GetAttribute( oImage, 'align', '' ) ; ! ! if ( oImage.style.pixelWidth > 0 ) ! GetE('txtWidth').value = oImage.style.pixelWidth ; ! else ! GetE('txtWidth').value = GetAttribute( oImage, "width", '' ) ; ! ! if ( oImage.style.pixelHeight > 0 ) ! GetE('txtHeight').value = oImage.style.pixelHeight ; ! else ! GetE('txtHeight').value = GetAttribute( oImage, "height", '' ) ; // Get Advances Attributes *************** *** 127,130 **** --- 140,149 ---- GetE('txtAttStyle').value = oImage.getAttribute('style',2) ; + if ( oLink ) + { + GetE('txtLnkUrl').value = oLink.getAttribute('href',2) ; + GetE('cmbLnkTarget').value = oLink.target ; + } + UpdatePreview() ; } *************** *** 138,158 **** GetE('txtUrl').focus() ; ! alert( oEditor.FCKLang.DlgImgAlertUrl ) ; return false ; } ! if ( oImage && bImageButton && oImage.tagName == 'IMG' ) { if ( confirm( 'Do you want to transform the selected image on a image button?' ) ) oImage = null ; } ! else if ( oImage && !bImageButton && oImage.tagName == 'INPUT' ) { if ( confirm( 'Do you want to transform the selected image button on a simple image?' ) ) oImage = null ; } ! ! if ( !oImage ) { if ( bImageButton ) --- 157,179 ---- GetE('txtUrl').focus() ; ! alert( FCKLang.DlgImgAlertUrl ) ; return false ; } ! var bHasImage = ( oImage != null ) ; ! ! if ( bHasImage && bImageButton && oImage.tagName == 'IMG' ) { if ( confirm( 'Do you want to transform the selected image on a image button?' ) ) oImage = null ; } ! else if ( bHasImage && !bImageButton && oImage.tagName == 'INPUT' ) { if ( confirm( 'Do you want to transform the selected image button on a simple image?' ) ) oImage = null ; } ! ! if ( !bHasImage ) { if ( bImageButton ) *************** *** 165,171 **** oImage = FCK.CreateElement( 'IMG' ) ; } ! UpdateImage( oImage ) ; return true ; } --- 186,222 ---- oImage = FCK.CreateElement( 'IMG' ) ; } ! else ! oEditor.FCKUndo.SaveUndoStep() ; ! UpdateImage( oImage ) ; + var sLnkUrl = GetE('txtLnkUrl').value.trim() ; + + if ( sLnkUrl.length == 0 ) + { + if ( oLink ) + FCK.ExecuteNamedCommand( 'Unlink' ) ; + } + else + { + if ( oLink ) // Modifying an existent link. + oLink.href = sLnkUrl ; + else // Creating a new link. + { + if ( !bHasImage ) + oEditor.FCKSelection.SelectNode( oImage ) ; + + oLink = oEditor.FCK.CreateLink( sLnkUrl ) ; + + if ( !bHasImage ) + { + oEditor.FCKSelection.SelectNode( oLink ) ; + oEditor.FCKSelection.Collapse( false ) ; + } + } + + SetAttribute( oLink, 'target', GetE('cmbLnkTarget').value ) ; + } + return true ; } *************** *** 173,183 **** function UpdateImage( e, skipId ) { ! e.src = GetE('txtUrl').value ; ! SetAttribute( e, "alt" , GetE('txtAlt').value ) ; ! SetAttribute( e, "width" , GetE('txtWidth').value ) ; ! SetAttribute( e, "height", GetE('txtHeight').value ) ; ! SetAttribute( e, "vspace", GetE('txtVSpace').value ) ; ! SetAttribute( e, "hspace", GetE('txtHSpace').value ) ; ! SetAttribute( e, "border", GetE('txtBorder').value ) ; SetAttribute( e, "align" , GetE('cmbAlign').value ) ; --- 224,234 ---- function UpdateImage( e, skipId ) { ! e.src = GetE('txtUrl').value ; ! SetAttribute( e, "alt" , GetE('txtAlt').value ) ; ! SetAttribute( e, "width" , GetE('txtWidth').value ) ; ! SetAttribute( e, "height", GetE('txtHeight').value ) ; ! SetAttribute( e, "vspace", GetE('txtVSpace').value ) ; ! SetAttribute( e, "hspace", GetE('txtHSpace').value ) ; ! SetAttribute( e, "border", GetE('txtBorder').value ) ; SetAttribute( e, "align" , GetE('cmbAlign').value ) ; *************** *** 202,208 **** { if ( GetE('txtUrl').value.length == 0 ) ! GetE('imgPreview').style.display = 'none' ; else UpdateImage( GetE('imgPreview'), true ) ; } --- 253,268 ---- { if ( GetE('txtUrl').value.length == 0 ) ! GetE('lnkPreview').style.display = 'none' ; else + { UpdateImage( GetE('imgPreview'), true ) ; + + if ( GetE('txtLnkUrl').value.trim().length > 0 ) + GetE('lnkPreview').href = 'javascript:void(null);' ; + else + SetAttribute( GetE('lnkPreview'), 'href', '' ) ; + + GetE('lnkPreview').style.display = '' ; + } } *************** *** 224,288 **** } ! // Fired when the width or height input texts change ! function OnSizeChanged( dimension, value ) ! { ! // Verifies if the aspect ration has to be mantained ! if ( oImageOriginal && bLockRatio ) ! { ! if ( value.length == 0 || isNaN( value ) ) ! { ! GetE('txtHeight').value = GetE('txtWidth').value = '' ; ! return ; ! } ! ! if ( dimension == 'Width' ) ! GetE('txtHeight').value = Math.round( oImageOriginal.height * ( value / oImageOriginal.width ) ) ; ! else ! GetE('txtWidth').value = Math.round( oImageOriginal.width * ( value / oImageOriginal.height ) ) ; ! } ! ! UpdatePreview() ; } - // Fired when the Reset Size button is clicked - function ResetSizes() - { - if ( ! oImageOriginal ) return ; - - GetE('txtWidth').value = oImageOriginal.width ; - GetE('txtHeight').value = oImageOriginal.height ; - - UpdatePreview() ; - } - function BrowseServer() { ! // Set the browser window feature. ! var iWidth = oEditor.FCKConfig.ImageBrowserWindowWidth ; ! var iHeight = oEditor.FCKConfig.ImageBrowserWindowHeight ; ! var iLeft = (screen.width - iWidth) / 2 ; ! var iTop = (screen.height - iHeight) / 2 ; var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes" ; ! sOptions += ",width=" + iWidth ; ! sOptions += ",height=" + iHeight ; sOptions += ",left=" + iLeft ; sOptions += ",top=" + iTop ; ! // Open the browser window. ! var oWindow = window.open( oEditor.FCKConfig.ImageBrowserURL, "FCKBrowseWindow", sOptions ) ; } function SetUrl( url, width, height, alt ) { ! GetE('txtUrl').value = url ; ! GetE('txtWidth').value = width ? width : '' ; ! GetE('txtHeight').value = height ? height : '' ; ! if ( alt ) ! GetE('txtAlt').value = alt; ! UpdatePreview() ; ! UpdateOriginal( true ) ; } --- 284,430 ---- } ! // Fired when the width or height input texts change ! function OnSizeChanged( dimension, value ) ! { ! // Verifies if the aspect ration has to be mantained ! if ( oImageOriginal && bLockRatio ) ! { ! if ( value.length == 0 || isNaN( value ) ) ! { ! GetE('txtHeight').value = GetE('txtWidth').value = '' ; ! return ; ! } ! ! if ( dimension == 'Width' ) ! GetE('txtHeight').value = value == 0 ? 0 : Math.round( oImageOriginal.height * ( value / oImageOriginal.width ) ) ; ! else ! GetE('txtWidth').value = value == 0 ? 0 : Math.round( oImageOriginal.width * ( value / oImageOriginal.height ) ) ; ! } ! ! UpdatePreview() ; ! } ! ! // Fired when the Reset Size button is clicked ! function ResetSizes() ! { ! if ( ! oImageOriginal ) return ; ! ! GetE('txtWidth').value = oImageOriginal.width ; ! GetE('txtHeight').value = oImageOriginal.height ; ! ! UpdatePreview() ; } function BrowseServer() { ! OpenServerBrowser( ! 'Image', ! FCKConfig.ImageBrowserURL, ! FCKConfig.ImageBrowserWindowWidth, ! FCKConfig.ImageBrowserWindowHeight ) ; ! } ! function LnkBrowseServer() ! { ! OpenServerBrowser( ! 'Link', ! FCKConfig.LinkBrowserURL, ! FCKConfig.LinkBrowserWindowWidth, ! FCKConfig.LinkBrowserWindowHeight ) ; ! } ! ! function OpenServerBrowser( type, url, width, height ) ! { ! sActualBrowser = type ; ! ! var iLeft = (screen.width - width) / 2 ; ! var iTop = (screen.height - height) / 2 ; var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes" ; ! sOptions += ",width=" + width ; ! sOptions += ",height=" + height ; sOptions += ",left=" + iLeft ; sOptions += ",top=" + iTop ; ! var oWindow = window.open( url, "FCKBrowseWindow", sOptions ) ; } + var sActualBrowser ; + function SetUrl( url, width, height, alt ) { ! if ( sActualBrowser == 'Link' ) ! { ! GetE('txtLnkUrl').value = url ; ! UpdatePreview() ; ! } ! else ! { ! GetE('txtUrl').value = url ; ! GetE('txtWidth').value = width ? width : '' ; ! GetE('txtHeight').value = height ? height : '' ; ! ! if ( alt ) ! GetE('txtAlt').value = alt; ! ! UpdatePreview() ; ! UpdateOriginal( true ) ; ! } ! window.parent.SetSelectedTab( 'Info' ) ; ! } ! function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) ! { ! switch ( errorNumber ) ! { ! case 0 : // No errors ! alert( 'Your file has been successfully uploaded' ) ; ! break ; ! case 1 : // Custom error ! alert( customMsg ) ; ! return ; ! case 101 : // Custom warning ! alert( customMsg ) ; ! break ; ! case 201 : ! alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ; ! break ; ! case 202 : ! alert( 'Invalid file type' ) ; ! return ; ! case 203 : ! alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ; ! return ; ! default : ! alert( 'Error on file upload. Error number: ' + errorNumber ) ; ! return ; ! } ! ! sActualBrowser = '' ! SetUrl( fileUrl ) ; ! GetE('frmUpload').reset() ; } + + var oUploadAllowedExtRegex = new RegExp( FCKConfig.ImageUploadAllowedExtensions, 'i' ) ; + var oUploadDeniedExtRegex = new RegExp( FCKConfig.ImageUploadDeniedExtensions, 'i' ) ; + + function CheckUpload() + { + var sFile = GetE('txtUploadFile').value ; + + if ( sFile.length == 0 ) + { + alert( 'Please select a file to upload' ) ; + return false ; + } + + if ( ( FCKConfig.ImageUploadAllowedExtensions.length > 0 && !oUploadAllowedExtRegex.test( sFile ) ) || + ( FCKConfig.ImageUploadDeniedExtensions.length > 0 && oUploadDeniedExtRegex.test( sFile ) ) ) + { + OnUploadCompleted( 202 ) ; + return false ; + } + + return true ; + } \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2005-09-29 19:50:05
|
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/filemanager/browser/mcpuk/connectors/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/filemanager/browser/mcpuk/connectors/php Added Files: config.php connector.php test.html.suspended testme.php.suspended Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi --- NEW FILE: connector.php --- <?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: connector.php * Main connector file, implements the State Pattern to * redirect requests to the appropriate class based on * the command name passed. * * File Authors: * Grant French (gr...@mc...) */ //Errors in the config.php could still cause problems. global $fckphp_config; require_once "config.php"; error_reporting(E_ALL); function errorHandler ($errno, $errstr, $errfile, $errline, $errcontext) { $reported=false; if (strpos($errstr,"var: Deprecated.")===false) { global $fckphp_config; if ($fckphp_config['Debug']===true && $fckphp_config['Debug_Errors']===true) { $oldData=implode("",file($fckphp_config['DebugOutput'])); if ($fh=fopen($fckphp_config['DebugOutput'],"w")) { fwrite($fh,"\n".date("d/m/Y H:i:s")."\n"); fwrite($fh,"PHP ERROR::: Error Number: $errno Error Message: $errstr Error File: $errfile Error Line: $errline\n"); if ($fckphp_config['Debug_Trace']) fwrite($fh," Error Context: ".print_r($errcontext,true)."\n"); if ($fckphp_config['Debug_GET']) fwrite($fh,"\n\$_GET::\n".print_r($_GET,true)."\n"); if ($fckphp_config['Debug_POST']) fwrite($fh,"\n\$_POST::\n".print_r($_POST,true)."\n"); if ($fckphp_config['Debug_SERVER']) fwrite($fh,"\n\$_SERVER::\n".print_r($_SERVER,true)."\n"); if ($fckphp_config['Debug_SESSIONS']) fwrite($fh,"\n\$_SESSIONS::\n".print_r($_SESSION,true)."\n"); fwrite($fh,"\n-------------------------------------------------------\n\n\n"); fwrite($fh,$oldData); $oldData=""; fclose($fh); $reported=true; } } if (!$reported) { //display error instead. echo("PHP ERROR::: <br /> Error Number: $errno <br /> Error Message: $errstr <br /> Error File: $errfile <br /> Error Line: $errline <br />"); if ($fckphp_config['Debug_Trace']) echo "Error Context: ".print_r($errcontext,true)."\n"; if ($fckphp_config['Debug_GET']) echo "\$_GET::\n".print_r($_GET,true)."<br />\n"; if ($fckphp_config['Debug_POST']) echo "\$_POST::\n".print_r($_POST,true)."<br />\n"; if ($fckphp_config['Debug_SERVER']) echo "\$_SERVER::\n".print_r($_SERVER,true)."<br />\n"; if ($fckphp_config['Debug_SESSIONS']) echo "\$_SESSIONS::\n".print_r($_SESSION,true)."<br />\n"; echo "<br />\n<br />\n"; } } } set_error_handler('errorHandler'); if (!isset($_SERVER['DOCUMENT_ROOT'])) $_SERVER["DOCUMENT_ROOT"] = $fckphp_config['basedir']; if ($fckphp_config['Debug']===true && $fckphp_config['Debug_Output']) ob_start(); outputHeaders(); //These are the commands we may expect $valid_commands=$fckphp_config['Commands']; $valid_resource_types=$fckphp_config['ResourceTypes']; //Get the passed data $command=( ((isset($_GET['Command']))&&($_GET['Command']!=""))? $_GET['Command']: "" ); $type=( ((isset($_GET['Type']))&&($_GET['Type']!=""))? $_GET['Type']: "File" ); $cwd=str_replace("..","", ( ((isset($_GET['CurrentFolder']))&&($_GET['CurrentFolder']!=""))? $_GET['CurrentFolder']: "/" ) ); $cwd=str_replace("..","",$cwd); $extra=( ((isset($_GET['ExtraParams']))&&($_GET['ExtraParams']!=""))? $_GET['ExtraParams']: "" ); if (in_array($command,$valid_commands)) { if ($fckphp_config['auth']['Req']) { require_once "./Auth/".$fckphp_config['auth']['HandlerClass'].".php"; $auth=new Auth(); $fckphp_config=$auth->authenticate($extra,$fckphp_config); if ($fckphp_config['authSuccess']!==true) { header ("content-type: text/xml"); echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"; ?> <Connector command="authentication_failed" resourceType="authentication_failed"> <CurrentFolder path="authentication_failed" url="authentication_failed" /> <Error number="-1" /> </Connector><?php if ($fckphp_config['Debug']===true && $fckphp_config['Debug_Output']) recordOutput(); exit(0); } } //bit of validation if (!in_array($type,$valid_resource_types)) { echo "Invalid resource type."; if ($fckphp_config['Debug']===true && $fckphp_config['Debug_Output']) recordOutput(); exit(0); } require_once "Commands/$command.php"; $action=new $command($fckphp_config,$type,$cwd); $action->run(); if ($fckphp_config['Debug']===true && $fckphp_config['Debug_Output']) recordOutput(); } else { //No reason for me to be here. echo "Invalid command."; echo str_replace("\n","<br />",print_r($_GET,true)); if ($fckphp_config['Debug']===true && $fckphp_config['Debug_Output']) recordOutput(); exit(0); } function recordOutput() { global $fckphp_config; if ($fckphp_config['Debug']===true && $fckphp_config['Debug_Output']) { $contents=ob_get_contents(); if (strlen($contents)>0) { $oldData=implode("",file($fckphp_config['DebugOutput'])); if ($fh=fopen($fckphp_config['DebugOutput'],"w")) { fwrite($fh,"\n".date("d/m/Y H:i:s")."\n"); if ($fckphp_config['Debug_GET']) fwrite($fh,"\n\$_GET::\n".print_r($_GET,true)."\n"); if ($fckphp_config['Debug_POST']) fwrite($fh,"\n\$_POST::\n".print_r($_POST,true)."\n"); if ($fckphp_config['Debug_SERVER']) fwrite($fh,"\n\$_SERVER::\n".print_r($_SERVER,true)."\n"); if ($fckphp_config['Debug_SESSIONS']) fwrite($fh,"\n\$_SESSIONS::\n".print_r($_SESSION,true)."\n"); fwrite($fh,$contents); fwrite($fh,"\n-------------------------------------------------------\n\n\n"); fwrite($fh,$oldData); $oldData=""; fclose($fh); } } ob_flush(); } } function outputHeaders() { //Anti browser caching headers //Borrowed from fatboy's implementation (fa...@co...) // ensure file is never cached // Date in the past header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // always modified header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // HTTP/1.1 header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); // HTTP/1.0 header("Pragma: no-cache"); } ?> --- NEW FILE: config.php --- <?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: config.php * Configuration file * * File Authors: * Grant French (gr...@mc...) */ session_start(); /*------------------------------------------------------------------------------*/ /* HTTP over SSL Detection (shouldnt require changing) */ /*------------------------------------------------------------------------------*/ $fckphp_config['prot']="http"; $fckphp_config['prot'].=((isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']=='on')?"s":""); $fckphp_config['prot'].="://"; /*==============================================================================*/ /*------------------------------------------------------------------------------*/ /* The physical path to the document root, Set manually if not using apache */ /*------------------------------------------------------------------------------*/ //$fckphp_config['basedir']=$_SERVER['DOCUMENT_ROOT']; $fckphp_config['basedir'] = 'D:\Work\FCKeditor\www\FCKeditor.V2\editor\filemanager\browser\mcpuk' ; /*==============================================================================*/ /*------------------------------------------------------------------------------*/ /* Prefix added to image path before sending back to editor */ /*------------------------------------------------------------------------------*/ $fckphp_config['urlprefix']=$fckphp_config['prot'].$_SERVER['SERVER_NAME']; /*==============================================================================*/ /*------------------------------------------------------------------------------*/ /* Path to user files relative to the document root (no trailing slash) */ /*------------------------------------------------------------------------------*/ $fckphp_config['UserFilesPath'] = "/UserFiles" ; /*==============================================================================*/ /*------------------------------------------------------------------------------*/ /* Progressbar handler (script that monitors upload progress) (''=none) /*------------------------------------------------------------------------------*/ // $fckphp_config['uploadProgressHandler']=''; //No upload progress handler $fckphp_config['uploadProgressHandler']=$fckphp_config['prot'].$_SERVER['SERVER_NAME']."/cgi-bin/progress.cgi"; //Perl upload progress handler /*==============================================================================*/ /*------------------------------------------------------------------------------*/ /* Authentication (auth) :- */ /* - Req :: Boolean, whether authentication is required */ /* - HandlerClass :: Name of class to handle authentication in connector */ /*------------------------------------------------------------------------------*/ $fckphp_config['auth']['Req']=false; $fckphp_config['auth']['HandlerClass']='Default'; /*==============================================================================*/ /*------------------------------------------------------------------------------*/ /* Settings for authentication handler :- */ /* - SharedKey :: Shared encryption key (as set in test.php in example) */ /*------------------------------------------------------------------------------*/ $fckphp_config['auth']['Handler']['SharedKey']="->Shared_K3y-F0R*5enD1NG^auth3nt1caT10n'Info/To\FILE,Brow5er--!"; /*==============================================================================*/ /*------------------------------------------------------------------------------*/ /* Per resource area settings:- */ /* - AllowedExtensions :: Array, allowed file extensions (in lowercase) */ /* - AllowedMIME :: Array, allowed mime types (in lowercase) */ /* - MaxSize :: Number, Maximum size of file uploads in KBytes */ /* - DiskQuota :: Number, Maximum size allowed for the resource area */ /* - HideFolders :: Array, RegExp, matching folder names will be hidden */ /* - HideFiles :: Array, RegExp, matching file names will be hidden */ /* - AllowImageEditing :: Boolean, whether images in this area may be edited */ /*------------------------------------------------------------------------------*/ //First area options are commented //File Area $fckphp_config['ResourceAreas']['File'] =array( //Files(identified by extension) that may be uploaded to this area 'AllowedExtensions' => array("zip","doc","xls","pdf","rtf","csv","jpg","gif","jpeg","png","avi","mpg","mpeg","swf","fla"), //Not implemented yet 'AllowedMIME' => array(), //Set the maximum single upload to this area to 2MB (2048Kb) 'MaxSize' => 2048, //Set disk quota for this resource area to 20MB 'DiskQuota' => 20, //By Default hide all folders starting with a . (Unix standard) 'HideFolders' => array("^\."), //By Default hide all files starting with a . (Unix standard) 'HideFiles' => array("^\."), //Do not allow images to be edited in this resource area 'AllowImageEditing' => false ); //Image area $fckphp_config['ResourceAreas']['Image'] =array( 'AllowedExtensions' => array("jpg","gif","jpeg","png","tiff","tif",), 'AllowedMIME' => array(), 'MaxSize' => 1024, 'DiskQuota' => 5, 'HideFolders' => array("^\."), 'HideFiles' => array("^\."), 'AllowImageEditing' => false //Not yet complete, but you can take a look and see ); //Flash area $fckphp_config['ResourceAreas']['Flash'] =array( 'AllowedExtensions' => array("swf","fla"), 'AllowedMIME' => array(), 'MaxSize' => 1024, 'DiskQuota' => 5, 'HideFolders' => array("^\."), 'HideFiles' => array("^\."), 'AllowImageEditing' => false ); //Media area $fckphp_config['ResourceAreas']['Media'] =array( 'AllowedExtensions' => array("swf","fla","jpg","gif","jpeg","png","avi","mpg","mpeg"), 'AllowedMIME' => array(), 'MaxSize' => 5120, 'DiskQuota' => 20, 'HideFolders' => array("^\."), 'HideFiles' => array("^\."), 'AllowImageEditing' => false ); /*==============================================================================*/ /*------------------------------------------------------------------------------*/ /* Global Disk Quota - Max size of all resource areas */ /*------------------------------------------------------------------------------*/ $fckphp_config['DiskQuota']['Global']=50; //In MBytes (default: 50mb) /*==============================================================================*/ /*------------------------------------------------------------------------------*/ /* Directory and File Naming :- */ /* -MaxDirNameLength :: Maximum allowed length of a directory name */ /* -DirNameAllowedChars :: Array of characters allowed in a directory name */ /* -FileNameAllowedChars :: Array of characters allowed in a file name */ /*------------------------------------------------------------------------------*/ $fckphp_config['MaxDirNameLength']=25; $fckphp_config['DirNameAllowedChars']=array(); //Allow numbers for($i=48;$i<58;$i++) array_push($fckphp_config['DirNameAllowedChars'],chr($i)); //Allow lowercase letters for($i=97;$i<123;$i++) array_push($fckphp_config['DirNameAllowedChars'],chr($i)); //Allow uppercase letters for($i=65;$i<91;$i++) array_push($fckphp_config['DirNameAllowedChars'],chr($i)); //Allow space,dash,underscore,dot array_push($fckphp_config['DirNameAllowedChars']," ","-","_","."); $fckphp_config['FileNameAllowedChars']=$fckphp_config['DirNameAllowedChars']; array_push($fckphp_config['FileNameAllowedChars'],')','(','[',']','~'); /*==============================================================================*/ /*------------------------------------------------------------------------------*/ /* Debugging :- */ /* - Debug :: Boolean, if set to true a copy of the connector output is */ /* sent to a file as well as to the client. */ /* - DebugOutput :: File to send debug output to (absolute path) */ /*------------------------------------------------------------------------------*/ $fckphp_config['Debug']=false; $fckphp_config['DebugOutput']="/var/www/fckeditor/htdocs/FCKeditor/data/fck_conn_dbg"; #Log PHP errors $fckphp_config['Debug_Errors']=false; $fckphp_config['Debug_Trace']=false; #Log Connector output $fckphp_config['Debug_Output']=false; #With each logged event display contents of /* $_GET */ $fckphp_config['Debug_GET']=false; /* $_POST */ $fckphp_config['Debug_POST']=false; /* $_SERVER */ $fckphp_config['Debug_SERVER']=false; /* $_SESSIONS */ $fckphp_config['Debug_SESSIONS']=false; /*==============================================================================*/ /*------------------------------------------------------------------------------*/ /* Internals :- */ /* ResourceTypes :: Array of valid resource areas */ /* Commands :: Array of valid commands accepted by the connector */ /*------------------------------------------------------------------------------*/ $fckphp_config['ResourceTypes'] = array('File','Image','Flash','Media'); $fckphp_config['Commands'] = array( "CreateFolder", "GetFolders", "GetFoldersAndFiles", "FileUpload", "Thumbnail", "DeleteFile", "DeleteFolder", "GetUploadProgress", "RenameFile", "RenameFolder" ); /*==============================================================================*/ ?> --- NEW FILE: testme.php.suspended --- <html> <head> <title>Test PHP Connector</title> </head> <body> <?php error_reporting(E_ALL); include "config.php"; $resources=$fckphp_config['ResourceTypes']; $dr=$fckphp_config['basedir']; $actual_userfolder=str_replace("//","/",$dr."/".$fckphp_config['UserFilesPath']."/"); //Display base directory set in the$fckphp_config echo "Base Dir is set to: $dr<br />\n"; //Display the path to this script echo "PHP_SELF: ".$_SERVER['PHP_SELF']."<br />\n"; //Seperator echo "\n<br /><hr /><br />\n"; //Check if PHP has MIME-Magic Support echo "Checking for mime magic support: ".((function_exists("mime_content_type"))?"Yes":"No - you won't get icons by mime type")."<br />"; //Check if PHP has GD Support echo "Checking for GD support: ".((function_exists("imagecreate"))?"Yes":"No - you won't get thumbnails for images")."<br />"; echo " JPEG Support: ".((function_exists("imagecreatefromjpeg"))?"Yes":"No - you won't get thumbnails for jpeg images")."<br />"; echo " PNG Support: ".((function_exists("imagecreatefrompng"))?"Yes":"No - you won't get thumbnails for png images")."<br />"; echo " GIF Support: ".((function_exists("imagecreatefromgif"))?"Yes":"No - you won't get thumbnails for gif images")."<br />"; echo " Image Write Support: ".((function_exists("imagegif") || function_exists("imagepng") || function_exists("imagejpeg"))?"Yes":"No - you won't get thumbnails for any images, as i cant write GIFs, PNGs or JPEGs")."<br />"; //Seperator echo "\n<br /><hr /><br />\n"; //Check if the user files folder set in the$fckphp_config exists echo "Checking if user files folder exists ($actual_userfolder): "; if (is_dir($actual_userfolder)) { echo "[ Passed ]<br />\n"; } else { echo "[ Failed ] <br />Task: Create the user files folder in the webroot and point the$fckphp_config.php file to it.<br />\n"; echo "Skipping all other tests, fix this one first."; exit(0); } //Seperator echo "\n<br /><hr /><br />\n"; //Check if the File,Image,Flash,Media folders exist in the user files folder and are writeable echo "Checking for resource type folders under user file folder: <br />\n"; foreach ($resources as $value) { //Does the folder exist $passed=false; echo " $value exists (".($actual_userfolder.$value).": "; if (is_dir(($actual_userfolder.$value))) { echo "[ Passed ]<br />\n"; $passed=true; } else { echo "[ Failed ]<br /> Task: chmod this folder to make it writeable to the php processes user.<br />\n"; } //Is the folder writeable by PHP echo " $value writeable: "; if ($passed) { if (is_writeable(($actual_userfolder.$value))) { echo "[ Passed ]<br />\n"; } else { echo "[ Failed ]<br /> Task: chmod this folder to make it writeable to the php processes user.<br />\n"; } } else { echo "[ Skipped ]<br />\n"; } echo "<br />\n"; } //Check if PHP is$fckphp_configured to use open_basedir echo "Checking if open_basedir restriction in place: (".((($bd=ini_get("open_basedir"))==null)?"Not Set":$bd." - This may cause you some troubles.").")<br />"; //Try to open the user files folder echo "Trying an opendir on the user files folder: ".((opendir($actual_userfolder))?"[ Passed ]":"[ Failed ]")."<br />"; //Seperator echo "\n<br /><hr /><br />\n"; //Compose the url to the connector $uri="http".(((isset($_SERVER['HTTPS']))&&(strtolower($_SERVER['HTTPS'])!='off'))?"s":"")."://".$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME'])."/"; //-------------------------------------------------------------------------------------------------------------------------------------------------- //Test the GetFolders Command echo "Requesting connector.php?Command=GetFolders&Type=Image&CurrentFolder=/ :<br />\n <div style=\"border-style:solid;border-width:1px;border-color:#000000\">\n"; $test = implode("",file($uri."connector.php?Command=GetFolders&Type=Image&CurrentFolder=/")); $test=htmlentities($test); echo str_replace("\n","<br />",$test); echo "</div> Please do a sanity check on this, it should be something like: \n <div style=\"border-style:solid;border-width:1px;border-color:#000000\">\n"; $expect=" <?xml version=\"1.0\" encoding=\"utf-8\" ?> <Connector command=\"GetFolders\" resourceType=\"Image\"> <CurrentFolder path=\"/\" url=\"/data/resources/Image/\" /> <Folders> </Folders> </Connector>"; $expect=htmlentities($expect); $expect=str_replace(array("\n","\r"),"<br />",$expect); echo "<b>EXAMPLE RESPONSE</b>".$expect; ?> </div> <br /><br /> <?php //-------------------------------------------------------------------------------------------------------------------------------------------------- //Seperator echo "\n<br /><hr /><br />\n"; //-------------------------------------------------------------------------------------------------------------------------------------------------- //Test GetFoldersAndFiles Command echo "Requesting connector.php?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=/ :<br />\n <div style=\"border-style:solid;border-width:1px;border-color:#000000\">\n"; $test = implode("",file($uri."connector.php?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=/")); $test=htmlentities($test); echo str_replace("\n","<br />",$test); echo "</div> Please do a sanity check on this, it should be something like: \n <div style=\"border-style:solid;border-width:1px;border-color:#000000\">\n"; $expect=" <?xml version=\"1.0\" encoding=\"utf-8\" ?> <Connector command=\"GetFoldersAndFiles\" resourceType=\"Image\"> <CurrentFolder path=\"/\" url=\"/data/resources/Image/\" /> <Folders> </Folders> <Files> </Files> </Connector>"; $expect=htmlentities($expect); $expect=str_replace(array("\n","\r"),"<br />",$expect); echo "<b>EXAMPLE RESPONSE</b>".$expect; ?> </div> <br /><br /> <?php //-------------------------------------------------------------------------------------------------------------------------------------------------- //Seperator echo "\n<br /><hr /><br />\n"; //-------------------------------------------------------------------------------------------------------------------------------------------------- //Test the CreateFolder command echo "Requesting connector.php?Command=CreateFolder&Type=Image&CurrentFolder=/&NewFolderName=TestFolder99 :<br />\n <div style=\"border-style:solid;border-width:1px;border-color:#000000\">\n"; $test = implode("",file($uri."connector.php?Command=CreateFolder&Type=Image&CurrentFolder=/&NewFolderName=TestFolder99")); $test=htmlentities($test); echo str_replace("\n","<br />",$test); echo "</div> Please do a sanity check on this, it should be something like: \n <div style=\"border-style:solid;border-width:1px;border-color:#000000\">\n"; $expect=" <?xml version=\"1.0\" encoding=\"utf-8\" ?> <Connector command=\CreateFolder\" resourceType=\"Image\"> <CurrentFolder path=\"/\" url=\"/data/resources/Image/\" /> <Error number=\"0\" /> </Connector>"; $expect=htmlentities($expect); $expect=str_replace(array("\n","\r"),"<br />",$expect); echo "<b>EXAMPLE RESPONSE</b>".$expect; ?> </div> <br /><br /> <?php //-------------------------------------------------------------------------------------------------------------------------------------------------- //Seperator echo "\n<br /><hr /><br />\n"; //-------------------------------------------------------------------------------------------------------------------------------------------------- //Test the RenameFolder Command echo "Requesting connector.php?Command=RenameFolder&Type=Image&CurrentFolder=/&FolderName=TestFolder99&NewName=TestFolder90 :<br />\n <div style=\"border-style:solid;border-width:1px;border-color:#000000\">\n"; $test = implode("",file($uri."connector.php?Command=RenameFolder&Type=Image&CurrentFolder=/&FolderName=TestFolder99&NewName=TestFolder90")); $test=htmlentities($test); echo str_replace("\n","<br />",$test); echo "</div> Please do a sanity check on this, it should be something like: \n <div style=\"border-style:solid;border-width:1px;border-color:#000000\">\n"; $expect=" <?xml version=\"1.0\" encoding=\"utf-8\" ?> <Connector command=\"RenameFolder\" resourceType=\"Image\"> <CurrentFolder path=\"/\" url=\"/data/resources/Image/\" /> <Error number=\"0\" /> </Connector>"; $expect=htmlentities($expect); $expect=str_replace(array("\n","\r"),"<br />",$expect); echo "<b>EXAMPLE RESPONSE</b>".$expect; ?> </div> <br /><br /> <?php //-------------------------------------------------------------------------------------------------------------------------------------------------- //Seperator echo "\n<br /><hr /><br />\n"; //-------------------------------------------------------------------------------------------------------------------------------------------------- //Test the DeleteFolder Command echo "Requesting connector.php?Command=DeleteFolder&Type=Image&CurrentFolder=/&FolderName=TestFolder90 :<br />\n <div style=\"border-style:solid;border-width:1px;border-color:#000000\">\n"; $test = implode("",file($uri."connector.php?Command=DeleteFolder&Type=Image&CurrentFolder=/&FolderName=TestFolder90")); $test=htmlentities($test); echo str_replace("\n","<br />",$test); echo "</div> Please do a sanity check on this, it should be something like: \n <div style=\"border-style:solid;border-width:1px;border-color:#000000\">\n"; $expect=" <?xml version=\"1.0\" encoding=\"utf-8\" ?> <Connector command=\"DeleteFolder\" resourceType=\"Image\"> <CurrentFolder path=\"/\" url=\"/data/resources/Image/\" /> <Error number=\"0\" /> </Connector>"; $expect=htmlentities($expect); $expect=str_replace(array("\n","\r"),"<br />",$expect); echo "<b>EXAMPLE RESPONSE</b>".$expect; ?> </div> <br /><br /> <?php //-------------------------------------------------------------------------------------------------------------------------------------------------- //Seperator echo "\n<br /><hr /><br />\n"; //-------------------------------------------------------------------------------------------------------------------------------------------------- //Test the Progress.cgi Command echo "Requesting ".$fckphp_config['uploadProgressHandler']."?iTotal=0&iRead=0&iStatus=1&sessionid=92823&dtnow=".time()."&dtstart=".time()." :<br />\n <div style=\"border-style:solid;border-width:1px;border-color:#000000\">\n"; $test = implode("",file($fckphp_config['uploadProgressHandler']."?iTotal=0&iRead=0&iStatus=1&sessionid=92823&dtnow=".time()."&dtstart=".time())); $test=htmlentities($test); echo str_replace("\n","<br />",$test); echo "</div> Please do a sanity check on this, it should be something like: \n <div style=\"border-style:solid;border-width:1px;border-color:#000000\">\n"; $expect=" <UploadProgress sessionID=\"92823\"> <RefreshURL><![CDATA[".$fckphp_config['uploadProgressHandler']."?iTotal=0&iRead=0&iStatus=1&sessionid=92823&dtnow=1098477167&dtstart=1098477166]]></RefreshURL> <TotalBytes>0</TotalBytes> <ReadBytes>0</ReadBytes> <Status>1</Status> <Speed>0</Speed> <TimeRemaining>00:00:00</TimeRemaining> <TimeElapsed>00:00:01</TimeElapsed> </UploadProgress>"; $expect=htmlentities($expect); $expect=str_replace(array("\n","\r"),"<br />",$expect); echo "<b>EXAMPLE RESPONSE</b>".$expect; ?> </div> <br /><br /> <?php //-------------------------------------------------------------------------------------------------------------------------------------------------- //Seperator echo "\n<br /><hr /><br />\n"; //-------------------------------------------------------------------------------------------------------------------------------------------------- //Test the GetUploadProgress Command echo "Requesting connector.php?Command=GetUploadProgress&Type=File&CurrentFolder=/Docs/&uploadID=19382&refreshURL=".$fckphp_config['uploadProgressHandler']."?uploadID=19382&read=30&total=100 :<br />\n <div style=\"border-style:solid;border-width:1px;border-color:#000000\">\n"; $test = implode("",file($uri."connector.php?Command=GetUploadProgress&Type=File&CurrentFolder=/Docs/&uploadID=19382&refreshURL=".$fckphp_config['uploadProgressHandler']."?uploadID=19382&read=30&total=100")); $test=str_replace("&","&",$test); $test=htmlentities($test); echo str_replace("\n","<br />",$test); echo "</div> Please do a sanity check on this, it should be something like: \n <div style=\"border-style:solid;border-width:1px;border-color:#000000\">\n"; $expect=" <?xml version=\"1.0\" encoding=\"utf-8\" ?> <Connector command=\"GetUploadProgress\" resourceType=\"File\"> <CurrentFolder path=\"/Docs/\" url=\"/data/resources/File/Docs/\" /> <Progress max=\"0\" value=\"0\" /> <RefreshURL url=\"".$fckphp_config['uploadProgressHandler']."?iTotal=&iRead=&iStatus=&sessionid=&dtnow=1098478692&dtstart=\" /> </Connector>"; $expect=htmlentities($expect); $expect=str_replace(array("\n","\r"),"<br />",$expect); echo "<b>EXAMPLE RESPONSE</b>".$expect; ?> </div> <br /><br /> <?php //-------------------------------------------------------------------------------------------------------------------------------------------------- ?> </body> </html> --- NEW FILE: test.html.suspended --- <html><head><title>File Upload Test</title></head> <body> <form enctype="multipart/form-data" method="post" action="/cgi-bin/upload.cgi?uploadID=58484&Connector=/FCKeditor/editor/filemanager/browser/default/connectors/php/connector.php&Command=FileUpload&Type=Image&CurrentFolder=/&ExtraParams=313131323934373331357c5e5345505e7c3139322e3136382e302e327c5e5345505e7c61646d696e7c5e5345505e7c3338316139376339633638303937393566343665313463613738383230626439"> <input type="file" name="NewFile" /> <input type="submit" value="Upload" /> </form> </body></html> |
From: Thyamad c. <th...@us...> - 2005-09-29 19:50:05
|
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/filemanager/browser/mcpuk/connectors/php/Commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/filemanager/browser/mcpuk/connectors/php/Commands Added Files: CreateFolder.php DeleteFile.php DeleteFolder.php FileUpload.php GetFolders.php GetFoldersAndFiles.php GetUploadProgress.php RenameFile.php RenameFolder.php Thumbnail.php Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi --- NEW FILE: DeleteFolder.php --- <?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: DeleteFolder.php * Implements the DeleteFolder command to delete a folder * in the current directory. Output is in XML. * * File Authors: * Grant French (gr...@mc...) */ class DeleteFolder { var $fckphp_config; var $type; var $cwd; var $actual_cwd; var $newfolder; function DeleteFolder($fckphp_config,$type,$cwd) { $this->fckphp_config=$fckphp_config; $this->type=$type; $this->raw_cwd=$cwd; $this->actual_cwd=str_replace("//","/",($this->fckphp_config['UserFilesPath']."/$type/".$this->raw_cwd)); $this->real_cwd=str_replace("//","/",($this->fckphp_config['basedir']."/".$this->actual_cwd)); $this->foldername=str_replace(array("..","/"),"",$_GET['FolderName']); } function run() { if ($this->delDir($this->real_cwd.'/'.$this->foldername)) { $err_no=0; } else { $err_no=402; } header ("content-type: text/xml"); echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"; ?> <Connector command="DeleteFolder" resourceType="<?php echo $this->type; ?>"> <CurrentFolder path="<?php echo $this->raw_cwd; ?>" url="<?php echo $this->actual_cwd; ?>" /> <Error number="<?php echo "".$err_no; ?>" /> </Connector> <?php } function delDir($dir) { $dh=opendir($dir); if ($dh) { while ($entry=readdir($dh)) { if (($entry!=".")&&($entry!="..")) { if (is_dir($dir.'/'.$entry)) { $this->delDir($dir.'/'.$entry); } else { $thumb=$dir.'/.thumb_'.$entry; if (file_exists($thumb)) if (!unlink($thumb)) return false; if (!unlink($dir.'/'.$entry)) return false; } } } closedir($dh); return rmdir($dir); } else { return false; } } } ?> --- NEW FILE: RenameFile.php --- <?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: RenameFile.php * Implements the DeleteFile command to delete a file * in the current directory. Output is in XML * * File Authors: * Grant French (gr...@mc...) */ class RenameFile { var $fckphp_config; var $type; var $cwd; var $actual_cwd; var $newfolder; function RenameFile($fckphp_config,$type,$cwd) { $this->fckphp_config=$fckphp_config; $this->type=$type; $this->raw_cwd=$cwd; $this->actual_cwd=str_replace("//","/",($fckphp_config['UserFilesPath']."/$type/".$this->raw_cwd)); $this->real_cwd=str_replace("//","/",($this->fckphp_config['basedir']."/".$this->actual_cwd)); $this->filename=str_replace(array("..","/"),"",$_GET['FileName']); $this->newname=str_replace(array("..","/"),"",$this->checkName($_GET['NewName'])); } function checkName($name) { $newName=""; for ($i=0;$i<strlen($name);$i++) { if (in_array($name[$i],$this->fckphp_config['FileNameAllowedChars'])) $newName.=$name[$i]; } return $newName; } function run() { $result1=false; $result2=true; if ($this->newname!='') { if ($this->nameValid($this->newname)) { //Remove thumbnail if it exists $result2=true; $thumb=$this->real_cwd.'/.thumb_'.$this->filename; if (file_exists($thumb)) $result2=unlink($thumb); $result1=rename($this->real_cwd.'/'.$this->filename,$this->real_cwd.'/'.$this->newname); } else { $result1=false; } } header ("content-type: text/xml"); echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"; ?> <Connector command="RenameFile" resourceType="<?php echo $this->type; ?>"> <CurrentFolder path="<?php echo $this->raw_cwd; ?>" url="<?php echo $this->actual_cwd; ?>" /> <?php if ($result1&&$result2) { $err_no=0; } else { $err_no=502; } ?> <Error number="<?php echo "".$err_no; ?>" /> </Connector> <?php } function nameValid($fname) { $type_config=$this->fckphp_config['ResourceAreas'][$this->type]; $lastdot=strrpos($fname,"."); if ($lastdot!==false) { $ext=substr($fname,($lastdot+1)); $fname=substr($fname,0,$lastdot); if (in_array(strtolower($ext),$type_config['AllowedExtensions'])) { return true; } else { return false; } } } } ?> --- NEW FILE: GetFoldersAndFiles.php --- <?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: GetFoldersAndFiles.php * Implements the GetFoldersAndFiles command, to list * files and folders in the current directory. * Output is in XML * * File Authors: * Grant French (gr...@mc...) */ class GetFoldersAndFiles { var $fckphp_config; var $type; var $cwd; var $actual_cwd; function GetFoldersAndFiles($fckphp_config,$type,$cwd) { $this->fckphp_config=$fckphp_config; $this->type=$type; $this->raw_cwd=$cwd; $this->actual_cwd=str_replace("//","/",($fckphp_config['UserFilesPath']."/$type/".$this->raw_cwd)); $this->real_cwd=str_replace("//","/",($this->fckphp_config['basedir']."/".$this->actual_cwd)); } function run() { header ("Content-Type: application/xml; charset=utf-8"); echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"; ?> <!DOCTYPE Connector [ <?php include "dtd/iso-lat1.ent";?> <!ELEMENT Connector (CurrentFolder,Folders,Files)> <!ATTLIST Connector command CDATA "noname"> <!ATTLIST Connector resourceType CDATA "0"> <!ELEMENT CurrentFolder (#PCDATA)> <!ATTLIST CurrentFolder path CDATA "noname"> <!ATTLIST CurrentFolder url CDATA "0"> <!ELEMENT Folders (#PCDATA)> <!ELEMENT Folder (#PCDATA)> <!ATTLIST Folder name CDATA "noname_dir"> <!ELEMENT Files (#PCDATA)> <!ELEMENT File (#PCDATA)> <!ATTLIST File name CDATA "noname_file"> <!ATTLIST File size CDATA "0"> ] > <Connector command="GetFoldersAndFiles" resourceType="<?php echo $this->type; ?>"> <CurrentFolder path="<?php echo $this->raw_cwd; ?>" url="<?php echo $this->fckphp_config['urlprefix'] . $this->actual_cwd; ?>" /> <Folders> <?php $files=array(); if ($dh=opendir($this->real_cwd)) { while (($filename=readdir($dh))!==false) { if (($filename!=".")&&($filename!="..")) { if (is_dir($this->real_cwd."/$filename")) { //check if$fckphp_configured not to show this folder $hide=false; for($i=0;$i<sizeof($this->fckphp_config['ResourceAreas'][$this->type]['HideFolders']);$i++) $hide=(ereg($this->fckphp_config['ResourceAreas'][$this->type]['HideFolders'][$i],$filename)?true:$hide); if (!$hide) echo "\t\t<Folder name=\"$filename\" />\n"; } else { array_push($files,$filename); } } } closedir($dh); } echo "\t</Folders>\n"; echo "\t<Files>\n"; for ($i=0;$i<sizeof($files);$i++) { $lastdot=strrpos($files[$i],"."); $ext=(($lastdot!==false)?(substr($files[$i],$lastdot+1)):""); if (in_array(strtolower($ext),$this->fckphp_config['ResourceAreas'][$this->type]['AllowedExtensions'])) { //check if$fckphp_configured not to show this file $editable=$hide=false; for($j=0;$j<sizeof($this->fckphp_config['ResourceAreas'][$this->type]['HideFiles']);$j++) $hide=(ereg($this->fckphp_config['ResourceAreas'][$this->type]['HideFiles'][$j],$files[$i])?true:$hide); if (!$hide) { if ($this->fckphp_config['ResourceAreas'][$this->type]['AllowImageEditing']) $editable=$this->isImageEditable($this->real_cwd."/".$files[$i]); echo "\t\t<File name=\"".htmlentities($files[$i])."\" size=\"".ceil(filesize($this->real_cwd."/".$files[$i])/1024)."\" editable=\"" . ( $editable?"1":"0" ) . "\" />\n"; } } } echo "\t</Files>\n"; echo "</Connector>\n"; } function isImageEditable($file) { $fh=fopen($file,"r"); if ($fh) { $start4=fread($fh,4); fclose($fh); $start3=substr($start4,0,3); if ($start4=="\x89PNG") { //PNG return (function_exists("imagecreatefrompng") && function_exists("imagepng")); } elseif ($start3=="GIF") { //GIF return (function_exists("imagecreatefromgif") && function_exists("imagegif")); } elseif ($start3=="\xFF\xD8\xFF") { //JPEG return (function_exists("imagecreatefromjpeg")&& function_exists("imagejpeg")); } elseif ($start4=="hsi1") { //JPEG return (function_exists("imagecreatefromjpeg")&& function_exists("imagejpeg")); } else { return false; } } else { return false; } } } ?> --- NEW FILE: FileUpload.php --- <?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: FileUpload.php * Implements the FileUpload command, * Checks the file uploaded is allowed, * then moves it to the user data area. * * File Authors: * Grant French (gr...@mc...) */ class FileUpload { var $fckphp_config; var $type; var $cwd; var $actual_cwd; var $newfolder; function FileUpload($fckphp_config,$type,$cwd) { $this->fckphp_config=$fckphp_config; $this->type=$type; $this->raw_cwd=$cwd; $this->actual_cwd=str_replace("//","/",($this->fckphp_config['UserFilesPath']."/$type/".$this->raw_cwd)); $this->real_cwd=str_replace("//","/",($this->fckphp_config['basedir']."/".$this->actual_cwd)); } function cleanFilename($filename) { $n_filename=""; //Check that it only contains valid characters for($i=0;$i<strlen($filename);$i++) if (in_array(substr($filename,$i,1),$this->fckphp_config['FileNameAllowedChars'])) $n_filename.=substr($filename,$i,1); //If it got this far all is ok return $n_filename; } function run() { //If using CGI Upload script, get file info and insert into $_FILE array if ( (sizeof($_FILES)==0) && isset($_GET['file']) && isset($_GET['file']['NewFile']) && is_array($_GET['file']['NewFile']) ) { if (isset($_GET['file']['NewFile']['name'])&&$_GET['file']['NewFile']['size']&&$_GET['file']['NewFile']['tmp_name']) { $_FILES['NewFile']['name']=basename(str_replace("\\","/",$_GET['file']['NewFile']['name'])); $_FILES['NewFile']['size']=$_GET['file']['NewFile']['size']; $_FILES['NewFile']['tmp_name']=$_GET['file']['NewFile']['tmp_name']; } else { $disp="202,'Incomplete file information from upload CGI'"; } } // if (isset($_FILES['NewFile'])&&isset($_FILES['NewFile']['name'])&&($_FILES['NewFile']['name']!="")) // $_FILES['NewFile']['name']=$_FILES['NewFile']['name']; //$this->cleanFilename($_FILES['NewFile']['name']); $typeconfig=$this->fckphp_config['ResourceAreas'][$this->type]; header ("content-type: text/html"); if (sizeof($_FILES)>0) { if (array_key_exists("NewFile",$_FILES)) { if ($_FILES['NewFile']['size']<($typeconfig['MaxSize']*1024)) { $filename=basename(str_replace("\\","/",$_FILES['NewFile']['name'])); $lastdot=strrpos($filename,"."); if ($lastdot!==false) { $ext=substr($filename,($lastdot+1)); $filename=substr($filename,0,$lastdot); if (in_array(strtolower($ext),$typeconfig['AllowedExtensions'])) { $test=0; $dirSizes=array(); $globalSize=0; $failSizeCheck=false; if ($this->fckphp_config['DiskQuota']['Global']!=-1) { foreach ($this->fckphp_config['ResourceTypes'] as $resType) { $dirSizes[$resType]= $this->getDirSize( $this->fckphp_config['basedir']."/".$this->fckphp_config['UserFilesPath']."/$resType"); if ($dirSizes[$resType]===false) { //Failed to stat a directory, fall out $failSizeCheck=true; $msg="\\nUnable to determine the size of a folder."; break; } $globalSize+=$dirSizes[$resType]; } $globalSize+=$_FILES['NewFile']['size']; if (!$failSizeCheck) { if ($globalSize>($this->fckphp_config['DiskQuota']['Global']*1048576)) { $failSizeCheck=true; $msg="\\nYou are over the global disk quota."; } } } if (($typeconfig['DiskQuota']!=-1)&&(!$failSizeCheck)) { if ($this->fckphp_config['DiskQuota']['Global']==-1) { $dirSizes[$this->type]= $this->getDirSize( $this->fckphp_config['basedir']."/".$this->fckphp_config['UserFilesPath']."/".$this->type); } if (($dirSizes[$this->type]+$_FILES['NewFile']['size'])> ($typeconfig['DiskQuota']*1048576)) { $failSizeCheck=true; $msg="\\nYou are over the disk quota for this resource type."; } } if ((($this->fckphp_config['DiskQuota']['Global']!=-1)||($typeconfig['DiskQuota']!=-1))&&$failSizeCheck) { //Disk Quota over $disp="202,'Over disk quota, ".$msg."'"; } else { if (file_exists($this->real_cwd."/$filename.$ext")) { $taskDone=false; //File already exists, try renaming //If there are more than 200 files with // the same name giveup for ($i=1;(($i<200)&&($taskDone==false));$i++) { if (!file_exists($this->real_cwd."/$filename($i).$ext")) { if (is_uploaded_file($_FILES['NewFile']['tmp_name'])) { if (move_uploaded_file($_FILES['NewFile']['tmp_name'],($this->real_cwd."/$filename($i).$ext"))) { chmod(($this->real_cwd."/$filename($i).$ext"),0777); $disp="201,'..$filename($i).$ext'"; } else { $disp="202,'Failed to upload file, internal error.'"; } } else { if (rename($_FILES['NewFile']['tmp_name'],($this->real_cwd."/$filename($i).$ext"))) { chmod(($this->real_cwd."/$filename($i).$ext"),0777); $disp="201,'$filename($i).$ext'"; } else { $disp="202,'Failed to upload file, internal error.'"; } } $taskDone=true; } } if ($taskDone==false) { $disp="202,'Failed to upload file, internal error..'"; } } else { //Upload file if (is_uploaded_file($_FILES['NewFile']['tmp_name'])) { if (move_uploaded_file($_FILES['NewFile']['tmp_name'],($this->real_cwd."/$filename.$ext"))) { chmod(($this->real_cwd."/$filename.$ext"),0777); $disp="0"; } else { $disp="202,'Failed to upload file, internal error...'"; } } else { if (rename($_FILES['NewFile']['tmp_name'],($this->real_cwd."/$filename.$ext"))) { chmod(($this->real_cwd."/$filename.$ext"),0777); $disp="0"; } else { $disp="202,'Failed to upload file, internal error...'"; } } } } } else { //Disallowed file extension $disp="202,'Disallowed file type.'"; } } else { //No file extension to check $disp="202,'Unable to determine file type of file'"; } } else { //Too big $disp="202,'This file exceeds the maximum upload size.'"; } } else { //No file uploaded with field name NewFile $disp="202,'Unable to find uploaded file.'"; } } else { //No files uploaded //Should really send something back saying //invalid file, but this breaks the filemanager //with firefox, so for now we'll just exit exit(0); //$disp="202"; } ?> <html> <head> <title>Upload Complete</title> </head> <body> <script type="text/javascript"> window.parent.frames['frmUpload'].OnUploadCompleted(<?php echo $disp; ?>) ; </script> </body> </html> <?php } function getDirSize($dir) { $dirSize=0; if ($dh=@opendir($dir)) { while ($file=@readdir($dh)) { if (($file!=".")&&($file!="..")) { if (is_dir($dir."/".$file)) { $tmp_dirSize=$this->getDirSize($dir."/".$file); if ($tmp_dirSize!==false) $dirSize+=$tmp_dirSize; } else { $dirSize+=filesize($dir."/".$file); } } } @closedir($dh); } else { return false; } return $dirSize; } } ?> --- NEW FILE: CreateFolder.php --- <?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: CreateFolder.php * Implements the CreateFolder command to make a new folder * in the current directory. Output is in XML. * * File Authors: * Grant French (gr...@mc...) */ class CreateFolder { var $fckphp_config; var $type; var $cwd; var $actual_cwd; var $newfolder; function CreateFolder($fckphp_config,$type,$cwd) { $this->fckphp_config=$fckphp_config; $this->type=$type; $this->raw_cwd=$cwd; $this->actual_cwd=str_replace("//","/",($this->fckphp_config['UserFilesPath']."/$type/".$this->raw_cwd)); $this->real_cwd=str_replace("//","/",($this->fckphp_config['basedir']."/".$this->actual_cwd)); $this->newfolder=str_replace(array("..","/"),"",$_GET['NewFolderName']); } function checkFolderName($folderName) { //Check the name is not too long if (strlen($folderName)>$this->fckphp_config['MaxDirNameLength']) return false; //Check that it only contains valid characters for($i=0;$i<strlen($folderName);$i++) if (!in_array(substr($folderName,$i,1),$this->fckphp_config['DirNameAllowedChars'])) return false; //If it got this far all is ok return true; } function run() { header ("content-type: text/xml"); echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"; ?> <Connector command="CreateFolder" resourceType="<?php echo $this->type; ?>"> <CurrentFolder path="<?php echo $this->raw_cwd; ?>" url="<?php echo $this->actual_cwd; ?>" /> <?php $newdir=str_replace("//","/",($this->real_cwd."/".$this->newfolder)); //Check the new name if ($this->checkFolderName($this->newfolder)) { //Check if it already exists if (is_dir($newdir)) { $err_no=101; //Folder already exists } else { //Check if we can create the directory here if (is_writeable($this->real_cwd)) { //Make the directory if (mkdir($newdir,0777)) { $err_no=0; //Success } else { $err_no=110; //Unknown error } } else { $err_no=103; //No permissions to create } } } else { $err_no=102; //Invalid Folder Name } ?> <Error number="<?php echo "".$err_no; ?>" /> </Connector> <?php } } ?> --- NEW FILE: GetFolders.php --- <?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: GetFolders.php * Implements the GetFolders command, to list the folders * in the current directory. Output is in XML * * File Authors: * Grant French (gr...@mc...) */ class GetFolders { var $fckphp_config; var $type; var $cwd; var $actual_cwd; function GetFolders($fckphp_config,$type,$cwd) { $this->fckphp_config=$fckphp_config; $this->type=$type; $this->raw_cwd=$cwd; $this->actual_cwd=str_replace("//","/",($fckphp_config['UserFilesPath']."/$type/".$this->raw_cwd)); $this->real_cwd=str_replace("//","/",($this->fckphp_config['basedir']."/".$this->actual_cwd)); } function run() { header ("content-type: text/xml"); echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"; ?> <Connector command="GetFolders" resourceType="<?php echo $this->type; ?>"> <CurrentFolder path="<?php echo $this->raw_cwd; ?>" url="<?php echo $this->actual_cwd; ?>" /> <Folders> <?php if ($dh=opendir($this->real_cwd)) { while (($filename=readdir($dh))!==false) { if (($filename!=".")&&($filename!="..")) { if (is_dir($this->real_cwd."/$filename")) { //check if$fckphp_configured not to show this folder $hide=false; for($i=0;$i<sizeof($this->fckphp_config['ResourceAreas'][$this->type]['HideFolders']);$i++) $hide=(ereg($this->fckphp_config['ResourceAreas'][$this->type]['HideFolders'][$i],$filename)?true:$hide); if (!$hide) echo "<Folder name=\"$filename\" />\n"; } } } closedir($dh); } ?> </Folders> </Connector> <?php } } ?> --- NEW FILE: RenameFolder.php --- <?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: RenameFolder.php * Implements the DeleteFile command to delete a file * in the current directory. Output is in XML * * File Authors: * Grant French (gr...@mc...) */ class RenameFolder { var $fckphp_config; var $type; var $cwd; var $actual_cwd; var $newfolder; function RenameFolder($fckphp_config,$type,$cwd) { $this->fckphp_config=$fckphp_config; $this->type=$type; $this->raw_cwd=$cwd; $this->actual_cwd=str_replace("//","/",($fckphp_config['UserFilesPath']."/$type/".$this->raw_cwd)); $this->real_cwd=str_replace("//","/",($this->fckphp_config['basedir']."/".$this->actual_cwd)); $this->foldername=str_replace(array("..","/"),"",$_GET['FolderName']); $this->newname=str_replace(array("..","/"),"",$this->checkName($_GET['NewName'])); } function checkName($name) { $newName=""; for ($i=0;$i<strlen($name);$i++) { if (in_array($name[$i],$this->fckphp_config['DirNameAllowedChars'])) $newName.=$name[$i]; } return $newName; } function run() { $result1=false; if ($this->newname!='') { $result1=rename($this->real_cwd.'/'.$this->foldername,$this->real_cwd.'/'.$this->newname); } header ("content-type: text/xml"); echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"; ?> <Connector command="RenameFolder" resourceType="<?php echo $this->type; ?>"> <CurrentFolder path="<?php echo $this->raw_cwd; ?>" url="<?php echo $this->actual_cwd; ?>" /> <?php if ($result1) { $err_no=0; } else { $err_no=602; } ?> <Error number="<?php echo "".$err_no; ?>" /> </Connector> <?php } } ?> --- NEW FILE: Thumbnail.php --- <?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: Thumbnail.php * Implements the Thumbnail command, to return * a thumbnail to the browser for the sent file, * if the file is an image an attempt is made to * generate a thumbnail, otherwise an appropriate * icon is returned. * Output is image data * * File Authors: * Grant French (gr...@mc...) */ include "helpers/iconlookup.php"; class Thumbnail { var $fckphp_config; var $type; var $cwd; var $actual_cwd; var $filename; function Thumbnail($fckphp_config,$type,$cwd) { $this->fckphp_config=$fckphp_config; $this->type=$type; $this->raw_cwd=$cwd; $this->actual_cwd=str_replace("//","/",($fckphp_config['UserFilesPath']."/$type/".$this->raw_cwd)); $this->real_cwd=str_replace("//","/",($this->fckphp_config['basedir']."/".$this->actual_cwd)); $this->filename=str_replace(array("..","/"),"",$_GET['FileName']); } function run() { //$mimeIcon=getMimeIcon($mime); $fullfile=$this->real_cwd.'/'.$this->filename; $thumbfile=$this->real_cwd.'/.thumb_'.$this->filename; $icon=false; if (file_exists($thumbfile)) { $icon=$thumbfile; } else { $mime=$this->getMIME($fullfile); $ext=strtolower($this->getExtension($this->filename)); if ($this->isImage($mime,$ext)) { //Try and find a thumbnail, else try to generate one // else send generic picture icon. if ($this->isJPEG($mime,$ext)) { $result=$this->resizeFromJPEG($fullfile); } elseif ($this->isGIF($mime,$ext)) { $result=$this->resizeFromGIF($fullfile); } elseif ($this->isPNG($mime,$ext)) { $result=$this->resizeFromPNG($fullfile); } if ($result!==false) { if (function_exists("imagejpeg")) { imagejpeg($result,$thumbfile,70); chmod($thumbfile,0777); $icon=$thumbfile; } elseif (function_exists("imagepng")) { imagepng($result,$thumbfile); chmod($thumbfile,0777); $icon=$thumbfile; } elseif (function_exists("imagegif")) { imagegif($result,$thumbfile); chmod($thumbfile,0777); $icon=$thumbfile; } else { $icon=iconLookup($mime,$ext); } } else { $icon=iconLookup($mime,$ext); } } else { $icon=iconLookup($mime,$ext); } } $iconMime=$this->image2MIME($icon); if ($iconMime==false) $iconMime="image/jpeg"; header("Content-type: $iconMime",true); readfile($icon); } function getMIME($file) { $mime="text/plain"; //If mime magic is installed if (function_exists("mime_content_type")) { $mime=mime_content_type($file); } else { $mime=$this->image2MIME($file); } return strtolower($mime); } function image2MIME($file) { $fh=fopen($file,"r"); if ($fh) { $start4=fread($fh,4); $start3=substr($start4,0,3); if ($start4=="\x89PNG") { return "image/png"; } elseif ($start3=="GIF") { return "image/gif"; } elseif ($start3=="\xFF\xD8\xFF") { return "image/jpeg"; } elseif ($start4=="hsi1") { return "image/jpeg"; } else { return false; } unset($start3);unset($start4); fclose($fh); } else { return false; } } function isImage($mime,$ext) { if ( ($mime=="image/gif")|| ($mime=="image/jpeg")|| ($mime=="image/jpg")|| ($mime=="image/pjpeg")|| ($mime=="image/png")|| ($ext=="jpg")|| ($ext=="jpeg")|| ($ext=="png")|| ($ext=="gif") ) { return true; } else { return false; } } function isJPEG($mime,$ext) { if (($mime=="image/jpeg")||($mime=="image/jpg")||($mime=="image/pjpeg")||($ext=="jpg")||($ext=="jpeg")) { return true; } else { return false; } } function isGIF($mime,$ext) { if (($mime=="image/gif")||($ext=="gif")) { return true; } else { return false; } } function isPNG($mime,$ext) { if (($mime=="image/png")||($ext=="png")) { return true; } else { return false; } } function getExtension($filename) { //Get Extension $ext=""; $lastpos=strrpos($this->filename,'.'); if ($lastpos!==false) $ext=substr($this->filename,($lastpos+1)); return strtolower($ext); } function resizeFromJPEG($file) { if (function_exists("imagecreatefromjpeg")) { $img=@imagecreatefromjpeg($this->real_cwd.'/'.$this->filename); return (($img)?$this->resizeImage($img):false); } else { return false; } } function resizeFromGIF($file) { if (function_exists("imagecreatefromgif")) { $img=@imagecreatefromgif($this->real_cwd.'/'.$this->filename); return (($img)?$this->resizeImage($img):false); } else { return false; } } function resizeFromPNG($file) { if (function_exists("imagecreatefrompng")) { $img=@imagecreatefrompng($this->real_cwd.'/'.$this->filename); return (($img)?$this->resizeImage($img):false); } else { return false; } } function resizeImage($img) { //Get size for thumbnail $width=imagesx($img); $height=imagesy($img); if ($width>$height) { $n_height=$height*(96/$width); $n_width=96; } else { $n_width=$width*(96/$height); $n_height=96; } $x=0;$y=0; if ($n_width<96) $x=round((96-$n_width)/2); if ($n_height<96) $y=round((96-$n_height)/2); $thumb=imagecreatetruecolor(96,96); #Background colour fix by: #Ben Lancaster (be...@st...) $bgcolor = imagecolorallocate($thumb,255,255,255); imagefill($thumb, 0, 0, $bgcolor); if (function_exists("imagecopyresampled")) { if (!($result=@imagecopyresampled($thumb,$img,$x,$y,0,0,$n_width,$n_height,$width,$height))) { $result=imagecopyresized($thumb,$img,$x,$y,0,0,$n_width,$n_height,$width,$height); } } else { $result=imagecopyresized($thumb,$img,$x,$y,0,0,$n_width,$n_height,$width,$height); } return ($result)?$thumb:false; } } ?> --- NEW FILE: DeleteFile.php --- <?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: DeleteFile.php * Implements the DeleteFile command to delete a file * in the current directory. Output is in XML. * * File Authors: * Grant French (gr...@mc...) */ class DeleteFile { var $fckphp_config; var $type; var $cwd; var $actual_cwd; var $newfolder; function DeleteFile($fckphp_config,$type,$cwd) { $this->fckphp_config=$fckphp_config; $this->type=$type; $this->raw_cwd=$cwd; $this->actual_cwd=str_replace("//","/",($this->fckphp_config['UserFilesPath']."/$type/".$this->raw_cwd)); $this->real_cwd=str_replace("//","/",($this->fckphp_config['basedir']."/".$this->actual_cwd)); $this->filename=str_replace(array("..","/"),"",$_GET['FileName']); } function run() { $result1=false; $result2=true; $thumb=$this->real_cwd.'/.thumb_'.$this->filename; $result1=unlink($this->real_cwd.'/'.$this->filename); if (file_exists($thumb)) $result2=unlink($thumb); header ("content-type: text/xml"); echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"; ?> <Connector command="DeleteFile" resourceType="<?php echo $this->type; ?>"> <CurrentFolder path="<?php echo $this->raw_cwd; ?>" url="<?php echo $this->actual_cwd; ?>" /> <?php if ($result1&&$result2) { $err_no=0; } else { $err_no=302; } ?> <Error number="<?php echo "".$err_no; ?>" /> </Connector> <?php } } ?> --- NEW FILE: GetUploadProgress.php --- <?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: GetUploadProgress.php * Implements the GetFolders command, to list the folders * in the current directory. Output is in XML * * File Authors: * Grant French (gr...@mc...) */ class GetUploadProgress { var $fckphp_config; var $type; var $cwd; var $actual_cwd; var $uploadID; function GetUploadProgress($fckphp_config,$type,$cwd) { $this->fckphp_config=$fckphp_config; $this->type=$type; $this->raw_cwd=$cwd; $this->actual_cwd=str_replace("//","/",($fckphp_config['UserFilesPath']."/$type/".$this->raw_cwd)); $this->real_cwd=str_replace("//","/",($this->fckphp_config['basedir']."/".$this->actual_cwd)); $this->uploadID=$_GET['uploadID']; $this->refreshURL=$_GET['refreshURL']; } function run() { if (isset($this->refreshURL)&&($this->refreshURL!="")) { //Continue monitoring $uploadProgress=file($this->refreshURL); $url=$this->refreshURL; } else { //New download $uploadProgressHandler=$this->fckphp_config['uploadProgressHandler']; if ($uploadProgressHandler=='') { //Progresshandler not specified, return generic response ?> <Connector command="GetUploadProgress" resourceType="<?php echo $this->type; ?>"> <CurrentFolder path="<?php echo $this->raw_cwd; ?>" url="<?php echo $this->actual_cwd; ?>" /> <Progress max="2" value="1" /> <RefreshURL url="" /> </Connector> <?php exit(0); } $url=$uploadProgressHandler."?iTotal=0&iRead=0&iStatus=1&sessionid=".$this->uploadID."&dtnow=".time()."&dtstart=".time(); $_SESSION[$this->uploadID]=$url; $uploadProgress=file($url); } $uploadProgress2=implode("\n",$uploadProgress); $parser = xml_parser_create(); xml_parse_into_struct($parser, $uploadProgress2, $vals, $index); $refreshURL=isset($vals[$index['REFRESHURL'][0]]['value'])?$vals[$index['REFRESHURL'][0]]['value']:""; $totalBytes=isset($vals[$index['TOTALBYTES'][0]]['value'])?$vals[$index['TOTALBYTES'][0]]['value']:0; $readBytes=isset($vals[$index['READBYTES'][0]]['value'])?$vals[$index['READBYTES'][0]]['value']:0; $status=isset($vals[$index['STATUS'][0]]['value'])?$vals[$index['STATUS'][0]]['value']:1; header ("content-type: text/xml"); echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"; ?> <Connector command="GetUploadProgress" resourceType="<?php echo $this->type; ?>"> <CurrentFolder path="<?php echo $this->raw_cwd; ?>" url="<?php echo $this->actual_cwd; ?>" /> <Progress max="<?php echo $totalBytes; ?>" value="<?php echo $readBytes; ?>" /> <RefreshURL url="<?php echo htmlentities($refreshURL); ?>" /> </Connector> <?php xml_parser_free($parser); } } ?> |
From: Thyamad c. <th...@us...> - 2005-09-29 19:50:04
|
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/filemanager/browser/mcpuk/js In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/filemanager/browser/mcpuk/js Added Files: EditorContent.js common.js fckxml.js wz_jsgraphics.js Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi --- NEW FILE: wz_jsgraphics.js --- (This appears to be a binary file; contents omitted.) --- NEW FILE: common.js --- (This appears to be a binary file; contents omitted.) --- NEW FILE: EditorContent.js --- (This appears to be a binary file; contents omitted.) --- NEW FILE: fckxml.js --- (This appears to be a binary file; contents omitted.) |
From: Thyamad c. <th...@us...> - 2005-09-29 19:50:04
|
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/filemanager/browser/mcpuk/connectors/php/Docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/filemanager/browser/mcpuk/connectors/php/Docs Added Files: AuthenticationHandlers.txt license.txt readme.txt Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi --- NEW FILE: license.txt --- This connector is supplied under the same license as FCKeditor, The Lesser GPL License (LGPL)- GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the library's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. <signature of Ty Coon>, 1 April 1990 Ty Coon, President of Vice That's all there is to it! --- NEW FILE: readme.txt --- PHP Connector for the FCKeditor v2 File Manager Written By Grant French, Sept 2004 gr...@mc... - http://www.mcpuk.net FCK Editor - Written By Frederico Caldeira Knabben http://www.fckeditor.net Icons supplied for file types from everaldo - http://www.everaldo.com Permissions fix for upload.cgu and fix for thumbnail background colour by - Ben Lancaster (be...@st...) !!PLEASE READ THROUGH THIS README *BEFORE* CRYING FOR HELP!! NOTES: ------ This software is provided as is with no guarantees or warranties what so ever. It has been proven to work under the following setups (many other should work):- PHP 4.3.x / Apache 1.3.x (FreeBSD/WinXP Pro/OpenBSD) PHP 5.x / Apache 2.x (Linux) Reported to work under IIS with minor alterations. (Manually define $_SERVER['DOCUMENT_ROOT'] and dont use the upload cgi) !!! if you specify the relative path of the connector in the fckconfig.js file you may experience some unusual behaviour mainly in firefox, like the resource list failing to refresh. To avoid this specify the absolute path of the connector. CONNECTOR CONFIGURATION ----------------------- /FCKeditor/editor/filemanager/browser/mcpuk/connectors/php/config.php The config.php file contains most of the configuration options for the connector, the file is fully commented, so please take a look through it. Most commonly asked question: Can i put the userfiles outside the FCKeditor folder? The answer is yes, the folder containing all users files is setup be default to be /UserFiles this can be changed to anything you like, such as /userdata/editorfiles this is done by editing the $fckphp_config['UserFilesPath'] directive in the config.php file for the connector FILE & FOLDER SETUP: -------------------- 1. Create the user files folder (set in the config.php) NOTE: you no longer need to create the Image/File/Media/Flash folders if you are using the 'Authentication' option in the connector. If you are not using the 'Authentication' option then you must create the Image File Media and Flash folders in the user files folder. 2. The user files folder must all be chmodded to 0777 (a+wrx) Upload Progress (Optional) - Rather Buggy ----------------------------------------- You may move the filemanager/browser/default/connectors/php/Commands/helpers/upload.cgi , filemanager/browser/default/connectors/php/Commands/helpers/progress.cgi and filemanager/browser/default/connectors/php/Commands/helpers/header.cgi to you cgi-bin folder or set the settings on the folder to allow these to be executed, check the first line in each of these files to check that the path to perl is correct for your setup. Open the header.cgi file, check and modify settings as required. If you have moved these files adjust the path to them in the fckconfig lines as specified above and the path the progress.cgi in the config.php file (see below) FINAL NOTE: ----------- 1. Limited support will be provided by email as and when i have time. 2. If you have any ideas share them either by mailing me or in the forum for the fckeditor (http://sf.net/projects/fckeditor/forums) 3. Enjoy LICENSE: -------- LGPL - Lesser General Public License (see LICENSE.txt file) --- NEW FILE: AuthenticationHandlers.txt --- Authentication via connector:: In my PHP connector the one from the FBXP project, it is possible to require authentication before a user can use the connector. The works in the following manor:- A1/ File Browser Requests Command From Connector A2/ Connector.php recieves the request B1/ File config.php imported B2/ If authentication required load the authentication handler file specified in the config, i.e. $config['auth']['HandlerClass']='Default'; the Auth/Default.php will be imported B3/ Create new instance of Auth class (defined in the authentication handler imported. C1/ Auth class, authenticate method called, passing the data recieved in the ExtraParams variable of the query string. C2/ authenticate method returns a modified copy of the $config, to indicate successfull authentication $config['authSuccess'] should be set to true, if the authentication failed this should be set to false. B4a/ on success command is executed and output sent to client B4b/ on failure blank xml response returned. A3/ End How to create my own authentication handler:: Create a file in the Auth folder with the name of the handler (your choice) i.e. If i wanted to call it MySQL the file i would create would be MySQL.php in the Auth folder. Skeleton for the new authentication class:: <?php class Auth { function authenticate($data,$config) { } } ?> as you can see the class must have a method called authenticate which takes two parameters, the value from the ExtraParams ($data) and a reference to the connector configuration $config (so you can change things depending on the user if you wish) , you can now put what ever code you like in that method to determine if the user is allowed or not. (you may add extra function to the class for internal use too, these will not be called by the connector, but call them from inside the authenticate method). The function returns a modified copy of the $config, with any changes you like + the addition of a top level array element key: authSuccess value: true if authentication successful, else false. If you want to limit what the user can do then you may want to change the array at: $config['Commands'] This holds an array of command that can be executed, if you remove say DeleteFolder from the array then the user will not be able to delete a folder. By Example:: There is a default authentication handler that i wrote to distribute with the connector, so you may want to take a look at it to get a better idea of whats going on. |
From: Thyamad c. <th...@us...> - 2005-09-29 19:50:04
|
Update of /cvsroot/thyapi/thyapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563 Modified Files: .sync_svn2cvs Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi Index: .sync_svn2cvs =================================================================== RCS file: /cvsroot/thyapi/thyapi/.sync_svn2cvs,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** .sync_svn2cvs 23 Sep 2005 12:59:37 -0000 1.23 --- .sync_svn2cvs 29 Sep 2005 19:49:16 -0000 1.24 *************** *** 1 **** ! 1989 \ No newline at end of file --- 1 ---- ! 2029 \ No newline at end of file |
From: Thyamad c. <th...@us...> - 2005-09-29 19:50:04
|
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/filemanager/browser/mcpuk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/filemanager/browser/mcpuk Added Files: browser.css browser.html frmactualfolder.html frmcreatefolder.html frmfolders.html frmimageeditor.html frmresourceslist.html frmresourcetype.html frmupload.html Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi --- NEW FILE: frmfolders.html --- <!-- * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: frmfolders.html * This page shows the list of folders available in the parent folder * of the current folder. * * File Authors: * Frederico Caldeira Knabben (fr...@fc...) --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <link href="browser.css" type="text/css" rel="stylesheet"> <script type="text/javascript" src="js/fckxml.js"></script> <script type="text/javascript" src="js/common.js"></script> <script language="javascript"> var sActiveFolder ; var bIsLoaded = false ; var iIntervalId ; var oListManager = new Object() ; oListManager.Init = function() { this.Table = document.getElementById('tableFiles') ; this.UpRow = document.getElementById('trUp') ; this.TableRows = new Object() ; } oListManager.Clear = function() { // Remove all other rows available. while ( this.Table.rows.length > 1 ) this.Table.deleteRow(1) ; // Reset the TableRows collection. this.TableRows = new Object() ; } oListManager.AddItem = function( folderName, folderPath ) { // Create the new row. var oRow = this.Table.insertRow(-1) ; oRow.className = 'FolderListFolder' ; // Build the link to view the folder. var sLink = '<a href="#" onclick="OpenFolder(\'' + folderPath + '\');return false;">' ; // Add the folder icon cell. var oCell = oRow.insertCell(-1) ; oCell.width = 16 ; oCell.innerHTML = sLink + '<img alt="" src="images/spacer.gif" width="16" height="16" border="0"></a>' ; // Add the folder name cell. oCell = oRow.insertCell(-1) ; oCell.noWrap = true ; oCell.innerHTML = ' ' + sLink + folderName + '</a>' ; this.TableRows[ folderPath ] = oRow ; } oListManager.ShowUpFolder = function( upFolderPath ) { this.UpRow.style.display = ( upFolderPath != null ? '' : 'none' ) ; if ( upFolderPath != null ) { document.getElementById('linkUpIcon').onclick = document.getElementById('linkUp').onclick = function() { LoadFolders( upFolderPath ) ; return false ; } } } function CheckLoaded() { if ( window.top.IsLoadedActualFolder && window.top.IsLoadedCreateFolder && window.top.IsLoadedUpload && window.top.IsLoadedResourcesList ) { window.clearInterval( iIntervalId ) ; bIsLoaded = true ; OpenFolder( sActiveFolder ) ; } } function OpenFolder( folderPath ) { sActiveFolder = folderPath ; if ( ! bIsLoaded ) { if ( ! iIntervalId ) iIntervalId = window.setInterval( CheckLoaded, 100 ) ; return ; } // Change the style for the select row (to show the opened folder). for ( var sFolderPath in oListManager.TableRows ) { oListManager.TableRows[ sFolderPath ].className = ( sFolderPath == folderPath ? 'FolderListCurrentFolder' : 'FolderListFolder' ) ; } // Set the current folder in all frames. window.parent.frames['frmActualFolder'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ; window.parent.frames['frmCreateFolder'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ; window.parent.frames['frmUpload'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ; // Load the resources list for this folder. window.parent.frames['frmResourcesList'].LoadResources( oConnector.ResourceType, folderPath ) ; } function LoadFolders( folderPath ) { // Clear the folders list. oListManager.Clear() ; // Get the parent folder path. var sParentFolderPath ; if ( folderPath != '/' ) sParentFolderPath = folderPath.substring( 0, folderPath.lastIndexOf( '/', folderPath.length - 2 ) + 1 ) ; // Show/Hide the Up Folder. oListManager.ShowUpFolder( sParentFolderPath ) ; if ( folderPath != '/' ) { sActiveFolder = folderPath ; oConnector.CurrentFolder = sParentFolderPath oConnector.SendCommand( 'GetFolders', null, GetFoldersCallBack ) ; } else { oListManager.ShowUpFolder( '/' ) ; sActiveFolder = folderPath ; oConnector.SendCommand( 'GetFolders', null, GetFoldersCallBack ) ; } } function GetFoldersCallBack( fckXml ) { // Get the current folder path. var oNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ) ; var sCurrentFolderPath = oNode.attributes.getNamedItem('path').value ; var oNodes = fckXml.SelectNodes( 'Connector/Folders/Folder' ) ; for ( var i = 0 ; i < oNodes.length ; i++ ) { var sFolderName = oNodes[i].attributes.getNamedItem('name').value ; oListManager.AddItem( sFolderName, sCurrentFolderPath + sFolderName + "/" ) ; } OpenFolder( sActiveFolder ) ; } function SetResourceType( type ) { oConnector.ResourceType = type ; LoadFolders( '/' ) ; } window.onload = function() { oListManager.Init() ; if ( oConnector.ResourceType.length == 0 ) SetResourceType( 'File' ) ; else LoadFolders( '/' ) ; } </script> </head> <body class="FileArea" bottomMargin="10" leftMargin="10" topMargin="10" rightMargin="10"> <table id="tableFiles" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr id="trUp" style="DISPLAY: none"> <td width="16"><a id="linkUpIcon" href="#"><img alt="" src="images/FolderUp.gif" width="16" height="16" border="0"></a></td> <td nowrap width="100%"> <a id="linkUp" href="#">..</a></td> </tr> </table> </body> </html> --- NEW FILE: frmactualfolder.html --- <!-- * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: frmactualfolder.html * This page shows the actual folder path. * * File Authors: * Frederico Caldeira Knabben (fr...@fc...) --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <link href="browser.css" type="text/css" rel="stylesheet"> <script type="text/javascript"> function OnResize() { divName.style.width = "1px" ; divName.style.width = tdName.offsetWidth + "px" ; } function SetCurrentFolder( resourceType, folderPath ) { document.getElementById('tdName').innerHTML = folderPath ; } window.onload = function() { window.top.IsLoadedActualFolder = true ; } </script> </head> <body bottomMargin="0" topMargin="0"> <table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td> <button style="WIDTH: 100%" type="button"> <table cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td><img height="32" alt="" src="images/FolderOpened32.gif" width="32"></td> <td> </td> <td id="tdName" width="100%" nowrap class="ActualFolder">/</td> <td> </td> <td><!--<img height="8" src="images/ButtonArrow.gif" width="12">--></td> <td> </td> </tr> </table> </button> </td> </tr> </table> </body> </html> --- NEW FILE: browser.html --- <!-- * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: browser.html * This page compose the File Browser dialog frameset. * * File Authors: * Frederico Caldeira Knabben (fr...@fc...) --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Resources Browser</title> <link href="browser.css" type="text/css" rel="stylesheet"> </head> <frameset cols="150,*" framespacing="0" bordercolor="#f1f1e3" frameborder="no" class="Frame_none"> <frameset rows="50,*" framespacing="0" class="Frame_r"> <frame src="frmresourcetype.html" scrolling="no" frameborder="no"> <frame name="frmFolders" id="frmFolders" src="frmfolders.html" scrolling="auto" frameborder="no"> </frameset> <frameset rows="50,*,50" framespacing="0" class="Frame_none"> <frame name="frmActualFolder" src="frmactualfolder.html" scrolling="no" frameborder="no"> <frame name="frmResourcesList" id="mainWindow" src="frmresourceslist.html" scrolling="auto" frameborder="no"> <frameset cols="150,*,0" framespacing="0" frameborder="no" class="Frame_t"> <frame name="frmCreateFolder" id="frmCreateFolder" src="frmcreatefolder.html" scrolling="no" frameborder="no"> <frame name="frmUpload" id="frmUpload" src="frmupload.html" scrolling="no" frameborder="no"> <frame name="frmUploadWorker" src="" scrolling="no" frameborder="no"> </frameset> </frameset> </frameset> </html> --- NEW FILE: frmresourcetype.html --- <!-- * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: frmresourcetype.html * This page shows the list of available resource types. * * File Authors: * Frederico Caldeira Knabben (fr...@fc...) --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"> <link href="browser.css" type="text/css" rel="stylesheet"> <script type="text/javascript" src="js/common.js"></script> <script language="javascript"> function SetResourceType( type ) { window.parent.frames["frmFolders"].SetResourceType( type ) ; } var aTypes = [ ['File','File'], ['Image','Image'], ['Flash','Flash'], ['Media','Media'] ] ; window.onload = function() { var bHasType = ( oConnector.ResourceType.length > 0 ) ; cmbTypeObj=document.getElementById("cmbType"); for ( var i = 0 ; i < aTypes.length ; i++ ) { if ( !bHasType || aTypes[i][0] == oConnector.ResourceType ) AddSelectOption( cmbTypeObj, aTypes[i][1], aTypes[i][0] ) ; } } </script> </head> <body bottomMargin="0" topMargin="0"> <table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td nowrap> Resource Type<BR> <select id="cmbType" style="WIDTH: 100%" onchange="SetResourceType(this.value);"> </select> </td> </tr> </table> </body> </html> --- NEW FILE: frmimageeditor.html --- <!-- * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: frmimageeditor.html * This page facilitates the editing of images. * * File Authors: * Grant French (gr...@mc...) --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <link href="browser.css" type="text/css" rel="stylesheet"> <script type="text/javascript" src="js/fckxml.js"></script> <script type="text/javascript" src="js/common.js"></script> <script type="text/javascript" src="js/wz_jsgraphics.js"></script> <script type="text/javascript" src="js/EditorContent.js"></script> <script language="javascript" type="text/javascript"> <!-- oConnector.CurrentFolder = GetMyUrlParam( 'CurrentFolder' ) ; var fileName=GetMyUrlParam( 'FileName' ) ; var fileURL=unescape( GetMyUrlParam( 'FileURL' ) ); var cursor_X, cursor_Y; var imageEditorLoaded=false; var bottomFrame1, bottomFrame2, bottomFrame3; /* var t_cx, t_cy, t_cw, t_ch; var m_sx, m_sy, m_w, m_h, m_a, m_d; var s_sw, s_sh; var r_ra; var constrained; var pattern = "images/2x2.gif";*/ function RenameFile( fileName, fileUrl ) { var promptMsg='Please enter the new name for ' + fileName + ':'; var newName=prompt(promptMsg,fileName); if ((newName!=null)&&(newName!='')&&(newName!=fileName)) { oConnector.SendCommand( 'RenameFile', "FileName=" + escape( fileName ) + "&NewName=" + escape( newName ), RenameFileCallBack ) ; } } function RenameFolder( folderName ) { var promptMsg='Please enter the new name for ' + folderName + ':'; var newName=prompt(promptMsg,folderName); if ((newName!=null)&&(newName!='')&&(newName!=folderName)) { oConnector.SendCommand( 'RenameFolder', "FolderName=" + escape( folderName ) + "&NewName=" + escape ( newName ), RenameFolderCallBack ) ; } } function LoadResources( resourceType, folderPath ) { oListManager.Clear() ; oConnector.ResourceType = resourceType ; oConnector.CurrentFolder = folderPath oConnector.SendCommand( 'GetFoldersAndFiles', null, GetFoldersAndFilesCallBack ) ; } function Refresh() { LoadResources( oConnector.ResourceType, oConnector.CurrentFolder ) ; } function RenameFolderCallBack ( fckXml ) { var oNodes = fckXml.SelectNodes( 'Connector/Error' ); if (oNodes.length>0) { var errNo = parseInt(oNodes[0].attributes.getNamedItem('number').value) ; switch (errNo) { case 0 : break; case 602 : alert('Failed to rename folder.'); break; default: alert('Invalid XML response from connector..'); } } else { alert('Invalid XML response from connector.'); } Refresh(); } function drawFramework() { bottomFrame1 = top.frames['frmCreateFolder'].document; bottomFrame2 = top.frames['frmUpload'].document; bottomFrame3 = top.frames['frmFolders'].document; bottomFrame1.body.innerHTML='<table style="border-width: 0px; border-style: none;" align="center" cellpadding="2" id="toolbar1"><table>'; bottomFrame2.body.innerHTML='<table style="height: 100%; border-width: 0px; border-style: none;" cellpadding="4"><tr id="toolbar2"></tr><table>'; bottomFrame3.body.innerHTML='<table style="border-width: 0px; border-style: none;" align="center" cellpadding="8" id="toolbar3"><table>'; var toolbar1 = bottomFrame1.getElementById('toolbar1'); var toolbar2 = bottomFrame2.getElementById('toolbar2'); var toolbar3 = bottomFrame3.getElementById('toolbar3'); /*#######################*/ /* START OF MAIN TOOLBAR */ /*#######################*/ /* --- Save Image --- */ var row = toolbar3.insertRow(-1); var oCell = row.insertCell(-1); oCell.innerHTML = '<a href="" title="Save Image">' + '<img src="images/toolbar/save.gif" style="width: 22px; height: 22px;" /><br />' + 'Save' + '</a>'; oCell.noWrap = true; oCell.align = 'center'; /* --- Close Image --- */ var row = toolbar3.insertRow(-1); var oCell = row.insertCell(-1); oCell.innerHTML = '<a href="#" title="Close Image" onclick="window.top.location.reload();">' + '<img src="images/toolbar/close.gif" style="width: 22px; height: 22px;" /><br />' + 'Close' + '</a>'; oCell.noWrap = true; oCell.align = 'center'; /* --- Seperator --- */ var row = toolbar3.insertRow(-1); var oCell = row.insertCell(-1); oCell.innerHTML = '<hr /><br />'; oCell.noWrap = true; oCell.align = 'center'; /* --- Resize Image --- */ var row = toolbar3.insertRow(-1); var oCell = row.insertCell(-1); oCell.innerHTML = '<a href="javascript: top.frames[\'frmResourcesList\'].setMode(\'resize\');" class="tb_item" id="tb_scale" title="Resize Image">' + '<img src="images/toolbar/resize.gif" style="width: 22px; height: 22px;" /><br />' + 'Resize' + '</a>'; oCell.noWrap = true; oCell.align = 'center'; /* --- Crop Image --- */ var row = toolbar3.insertRow(-1); var oCell = row.insertCell(-1); oCell.innerHTML = '<a href="javascript: top.frames[\'frmResourcesList\'].setMode(\'crop\');" class="tb_item" id="tb_crop" title="Crop Image">' + '<img src="images/toolbar/crop.gif" style="width: 22px; height: 22px;" /><br />' + 'Crop' + '</a>'; oCell.noWrap = true; oCell.align = 'center'; /* --- Rotate Image --- */ var row = toolbar3.insertRow(-1); var oCell = row.insertCell(-1); oCell.innerHTML = '<a href="javascript: top.frames[\'frmResourcesList\'].setMode(\'rotate\');" class="tb_item" id="tb_rotate" title="Rotate Image">' + '<img src="images/toolbar/rotate.gif" style="width: 22px; height: 22px;" /><br />' + 'Rotate' + '</a>'; oCell.noWrap = true; oCell.align = 'center'; /* --- Flip Image --- */ var row = toolbar3.insertRow(-1); var oCell = row.insertCell(-1); oCell.innerHTML = '<a href="javascript: top.frames[\'frmResourcesList\'].setMode(\'flip\');" class="tb_item" id="tb_flip" title="Flip Image">' + '<img src="images/toolbar/flip.gif" style="width: 22px; height: 22px;" /><br />' + 'Flip' + '</a>'; oCell.noWrap = true; oCell.align = 'center'; /*###################*/ /* START OF INFO BAR */ /*###################*/ /* --- X Position --- */ var row = toolbar1.insertRow(-1); var oCell = row.insertCell(-1); oCell.innerHTML = '<div style="display: inline;">X: <div style="display: inline;" id="cursor_x">0</div>px</div>'; oCell.noWrap = true; oCell.align = 'center'; cursor_X=bottomFrame1.getElementById('cursor_x'); /* --- Y Posision --- */ var row = toolbar1.insertRow(-1); var oCell = row.insertCell(-1); oCell.innerHTML = '<div style="display: inline;">Y: <div style="display: inline;" id="cursor_y">0</div>px</div>'; oCell.noWrap = true; oCell.align = 'center'; cursor_Y=bottomFrame1.getElementById('cursor_y'); /*#####################*/ /* START OF MANUAL BAR */ /*#####################*/ /* --- X Position --- */ //var row = toolbar2.insertRow(-1); var oCell = toolbar2.insertCell(-1); oCell.innerHTML = '<input type="text" id="cx" />' + '<input type="text" id="cy" />'; oCell.noWrap = true; oCell.align = 'center'; cursor_X=bottomFrame1.getElementById('cursor_x'); } window.onload = function() { drawFramework(); document.getElementById('theImage').src=fileURL; jg_doc = new jsGraphics("imgCanvas"); // draw directly into document jg_doc.setColor("#000000"); // black // top.frames['frmResourcesList'].setMode('scale'); imageEditorLoaded=true; // top.frames['frmResourcesList'].setMode('scale'); } function updateXY(eventObject) { if (imageEditorLoaded) { cursor_X.innerHTML = eventObject.pageX; cursor_Y.innerHTML = eventObject.pageY; } } //--> </script> <style type="text/css"> body { margin: 0; padding: 0; background-color: #eee; } table { width: 100%; } table td { text-align: center; } .crop{cursor:crosshair;} .selection { border: dotted 1px #000000; position:absolute; width: 0px; height: 1px; z-index:5; } .selectionWhite{ border: dotted 1px #FFFFFF; position:absolute; width: 0px; height: 1px; z-index:5; } .handleBox{ z-index:105; } .error { font-size:large; font-weight:bold; color:#c00; font-family: Helvetica, sans-serif; } </style> </head> <body class="FileArea" bottomMargin="10" leftMargin="10" topMargin="10" rightMargin="10"> <div id="status"></div> <div id="ant" class="selection" style="visibility:hidden"><img src="img/spacer.gif" width="0" height="0" border="0" alt="" id="cropContent"></div> <br /><table style="margin-left: auto; margin-right: auto;"> <tr> <td> <span id="imgCanvas" class="crop"><img src="" alt="" id="theImage" name="theImage"></span> </td> </tr> </table> </body> </html> --- NEW FILE: frmresourceslist.html --- <!-- * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: frmresourceslist.html * This page shows all resources available in a folder in the File Browser. * * File Authors: * Frederico Caldeira Knabben (fr...@fc...) * Grant French (gr...@mc...) --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <link href="browser.css" type="text/css" rel="stylesheet"> <script type="text/javascript" src="js/fckxml.js"></script> <script type="text/javascript" src="js/common.js"></script> <script language="javascript"> var oListManager = new Object() ; oListManager.Init = function() { this.Table = document.getElementById('tableFiles') ; } oListManager.Clear = function() { // Remove all other rows available. while ( this.Table.rows.length > 0 ) this.Table.deleteRow(0) ; } oListManager.AddFolder = function( folderName, folderPath ) { var docWidth=document.body.clientWidth; if (docWidth==null) docWidth=document.body.scrollWidth; var maxCols=docWidth/120; maxCols--; var rows=this.Table.getElementsByTagName('tr'); if (rows.length!=0) { var lastRow = rows[(rows.length-1)]; var cells = lastRow.getElementsByTagName('td'); var lastRow_Cols = cells.length; if (lastRow_Cols>=maxCols) { lastRow = this.Table.insertRow(-1); lastRow.className="Frame_tb"; } } else { var lastRow = this.Table.insertRow(-1); lastRow.className="Frame_tb"; } // Build the link to view the folder. var sLink = '<a href="#" onclick="OpenFolder(\'' + escape(folderPath) + '\');return false;">' ; var dLink = '<a href="#" onclick="DeleteFolder(\'' + escape(folderName) + '\');return false;">' ; var rLink = '<a href="#" onclick="RenameFolder(\'' + escape(folderName) + '\');return false;">' ; // Add the file icon cell. var oCell = lastRow.insertCell(-1) ; oCell.vAlign="top"; oCell.width = 96 ; oCell.innerHTML = sLink + '<img alt="' + folderName + '" src="images/Folder96.jpg" width="96" height="96" border="0"><br />' + folderName + '</a><br />'; oCell.innerHTML += dLink + '<img border="0" src="images/delete.gif" width="16" height="16" alt="Delete Folder" title="Delete Folder"></a> '; oCell.innerHTML += rLink + '<img border="0" src="images/edit.gif" width="16" height="16" alt="Rename Folder" title="Rename Folder"></a>' ; oCell.noWrap = true ; oCell.align = 'center' ; } oListManager.AddFile = function ( fileName, fileUrl, fileSize, imageEditable ) { var docWidth=document.body.clientWidth; if (docWidth==null) docWidth=document.body.scrollWidth; var maxCols=docWidth/120; maxCols--; var rows=this.Table.getElementsByTagName('tr'); if (rows.length!=0) { var lastRow = rows[(rows.length-1)]; var cells = lastRow.getElementsByTagName('td'); var lastRow_Cols = cells.length; if (lastRow_Cols>=maxCols) { var lastRow = this.Table.insertRow(-1); lastRow.className="Frame_tb"; } } else { var lastRow = this.Table.insertRow(-1); lastRow.className="Frame_tb"; } // Build the link to view the file. var sLink = '<a href="#" title="Size: ' + fileSize + 'kb" onclick="OpenFile(\'' + escape(fileUrl) + '\');return false;">' ; var dLink = '<a href="#" title="Delete file" onclick="DeleteFile(\'' + escape(fileName) + '\');return false;">' ; var eLink = '<a href="#" title="Rename file" onclick="RenameFile(\'' + escape(fileName) + '\');return false;">' ; var eImageLink = '<a href="#" title="Edit Image" onclick="EditImage(\'' + escape(fileName) + '\',\'' + escape(fileUrl) + '\');return false;">' ; // Add the file icon cell. var oCell = lastRow.insertCell(-1) ; oCell.vAlign="top"; oCell.width = 96 ; oCell.innerHTML = sLink + '<img alt="' + fileName + '" src="' + oConnector.ConnectorUrl + '?Command=Thumbnail&Type=' + oConnector.ResourceType + '&CurrentFolder=' + oConnector.CurrentFolder + '&FileName=' + escape(fileName) + '&ExtraParams=' + oConnector.ExtraParams + '" width="96" height="96" border="0"><br />' + fileName + '</a><br />'; oCell.innerHTML += dLink + '<img border="0" src="images/delete.gif" width="16" height="16" alt="Delete File" title="Delete File"></a> '; oCell.innerHTML += eLink + '<img border="0" src="images/edit.gif" width="16" height="16" alt="Edit/Rename File" title="Rename File"></a>' ; if (imageEditable==1) { oCell.innerHTML += eImageLink + '<img border="0" src="images/editImage.gif" width="16" height="16" alt="Edit Image" title="Edit Image"></a>' ; } oCell.noWrap = true ; oCell.align = 'center' ; } oListManager.PackRow = function () { var docWidth=document.body.clientWidth; if (docWidth==null) docWidth=document.body.scrollWidth; var maxCols=docWidth/120; maxCols--; var rows=this.Table.getElementsByTagName('tr'); if (rows.length!=0) { var lastRow = rows[(rows.length-1)]; var cells = lastRow.getElementsByTagName('td'); var lastRow_Cols = cells.length; if (lastRow_Cols<maxCols) { for (i=lastRow_Cols;i<maxCols;i++) { var oCell = lastRow.insertCell(-1); oCell.width=96; oCell.innerHTML = ' '; oCell.noWrap=true; oCell.align='center'; } } } } function OpenFolder( folderPath ) { // Load the resources list for this folder. window.parent.frames['frmFolders'].LoadFolders( folderPath ) ; } function OpenFile( fileUrl ) { fileUrl=unescape(fileUrl); window.top.opener.SetUrl( fileUrl ) ; window.top.close() ; window.top.opener.focus() ; } function DeleteFile( fileName, fileUrl ) { if (confirm('Are you sure you wish to delete ' + unescape(fileName) + '?')) { oConnector.SendCommand( 'DeleteFile', "FileName=" + fileName, DeleteFileCallBack ) ; } } function DeleteFolder( folderName ) { if (confirm('Are you sure you wish to delete ' + unescape(folderName) + ' and all files in it?')) { oConnector.SendCommand( 'DeleteFolder', "FolderName=" + folderName, DeleteFolderCallBack ) ; } } function RenameFile( fileName, fileUrl ) { var promptMsg='Please enter the new name for ' + unescape(fileName) + ':'; var newName=prompt(promptMsg,unescape(fileName)); if ((newName!=null)&&(newName!='')&&(newName!=fileName)) { oConnector.SendCommand( 'RenameFile', "FileName=" + fileName + "&NewName=" + escape( newName ), RenameFileCallBack ) ; } } function EditImage( fileName, fileUrl ) { window.location.href="frmimageeditor.html?Connector=" + oConnector.ConnectorUrl + "&Type=" + oConnector.ResourceType + "&CurrentFolder=" + oConnector.CurrentFolder + "&FileName=" + fileName + "&FileURL=" + fileUrl; } function RenameFolder( folderName ) { var promptMsg='Please enter the new name for ' + unescape(folderName) + ':'; var newName=prompt(promptMsg,unescape(folderName)); if ((newName!=null)&&(newName!='')&&(newName!=unescape(folderName))) { oConnector.SendCommand( 'RenameFolder', "FolderName=" + folderName + "&NewName=" + escape ( newName ), RenameFolderCallBack ) ; } } function LoadResources( resourceType, folderPath ) { oListManager.Clear() ; oConnector.ResourceType = resourceType ; oConnector.CurrentFolder = folderPath oConnector.SendCommand( 'GetFoldersAndFiles', null, GetFoldersAndFilesCallBack ) ; } function Refresh() { LoadResources( oConnector.ResourceType, oConnector.CurrentFolder ) ; } function GetFoldersAndFilesCallBack( fckXml ) { // Get the current folder path. var oNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ) ; var sCurrentFolderPath = oNode.attributes.getNamedItem('path').value ; var sCurrentFolderUrl = oNode.attributes.getNamedItem('url').value ; // Add the Folders. var oNodes = fckXml.SelectNodes( 'Connector/Folders/Folder' ) ; if (oNodes!=null) { for ( var i = 0 ; i < oNodes.length ; i++ ) { var sFolderName = oNodes[i].attributes.getNamedItem('name').value ; oListManager.AddFolder( sFolderName, sCurrentFolderPath + sFolderName + "/" ) ; } } // Add the Files. var oNodes = fckXml.SelectNodes( 'Connector/Files/File' ) ; if (oNodes!=null) { for ( var i = 0 ; i < oNodes.length ; i++ ) { var sFileName = oNodes[i].attributes.getNamedItem('name').value ; var sFileSize = oNodes[i].attributes.getNamedItem('size').value ; var iEditable = oNodes[i].attributes.getNamedItem('editable') ; if (iEditable!=null) { iEditable = iEditable.value; } else { iEditable = 0; } oListManager.AddFile( sFileName, sCurrentFolderUrl + sFileName, sFileSize, iEditable ) ; } } oListManager.PackRow(); } function DeleteFileCallBack ( fckXml ) { var oNodes = fckXml.SelectNodes( 'Connector/Error' ); if (oNodes!=null && oNodes.length>0) { var errNo = parseInt(oNodes[0].attributes.getNamedItem('number').value) ; switch (errNo) { case 0 : break; case 302 : alert('Failed to delete file.'); break; default: alert('DFi: Invalid XML response from connector..'); } } else { alert('DFi: Invalid XML response from connector.'); } Refresh(); } function DeleteFolderCallBack ( fckXml ) { var oNodes = fckXml.SelectNodes( 'Connector/Error' ); if (oNodes!=null && oNodes.length>0) { var errNo = parseInt(oNodes[0].attributes.getNamedItem('number').value) ; switch (errNo) { case 0 : break; case 402 : alert('Failed to delete folder.'); break; default: alert('DFo: Invalid XML response from connector..'); } } else { alert('DFo: Invalid XML response from connector.'); } Refresh(); } function RenameFileCallBack ( fckXml ) { var oNodes = fckXml.SelectNodes( 'Connector/Error' ); if (oNodes!=null && oNodes.length>0) { var errNo = parseInt(oNodes[0].attributes.getNamedItem('number').value) ; switch (errNo) { case 0 : break; case 502 : alert('Failed to rename file.'); break; default: alert('RFi: Invalid XML response from connector..'); } } else { alert('RFi: Invalid XML response from connector.'); } Refresh(); } function RenameFolderCallBack ( fckXml ) { var oNodes = fckXml.SelectNodes( 'Connector/Error' ); if (oNodes!=null && oNodes.length>0) { var errNo = parseInt(oNodes[0].attributes.getNamedItem('number').value) ; switch (errNo) { case 0 : break; case 602 : alert('Failed to rename folder.'); break; default: alert('RFo: Invalid XML response from connector..'); } } else { alert('RFo: Invalid XML response from connector.'); } Refresh(); } window.onload = function() { oListManager.Init() ; window.top.IsLoadedResourcesList = true ; } </script> </head> <body class="FileArea" bottomMargin="10" leftMargin="10" topMargin="10" rightMargin="10"> <table id="tableFiles" cellSpacing="4" cellPadding="5" width="100%" border="0"> </table> </body> </html> --- NEW FILE: frmcreatefolder.html --- <!-- * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: frmcreatefolder.html * Page used to create new folders in the current folder. * * File Authors: * Frederico Caldeira Knabben (fr...@fc...) --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="browser.css" type="text/css" rel="stylesheet"> <script type="text/javascript" src="js/fckxml.js"></script> <script type="text/javascript" src="js/common.js"></script> <script language="javascript"> function SetCurrentFolder( resourceType, folderPath ) { oConnector.ResourceType = resourceType ; oConnector.CurrentFolder = folderPath } function CreateFolder() { var sFolderName ; while ( true ) { sFolderName = prompt( 'Type the name of the new folder:', '' ) ; if ( sFolderName == null ) return ; else if ( sFolderName.length == 0 ) alert( 'Please type the folder name' ) ; else break ; } oConnector.SendCommand( 'CreateFolder', 'NewFolderName=' + escape( sFolderName) , CreateFolderCallBack ) ; } function CreateFolderCallBack( fckXml ) { // Get the current folder path. var oNode = fckXml.SelectSingleNode( 'Connector/Error' ) ; var iErrorNumber = parseInt( oNode.attributes.getNamedItem('number').value ) ; switch ( iErrorNumber ) { case 0 : window.parent.frames['frmResourcesList'].Refresh() ; break ; case 101 : alert( 'Folder already exists' ) ; break ; case 102 : alert( 'Invalid folder name' ) ; break ; case 103 : alert( 'You have no permissions to create the folder' ) ; break ; case 110 : alert( 'Unknown error creating folder' ) ; break ; default : alert( 'Error creating folder. Error number: ' + iErrorNumber ) ; break ; } } window.onload = function() { window.top.IsLoadedCreateFolder = true ; } </script> </head> <body bottomMargin="0" topMargin="0"> <table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td> <button type="button" style="WIDTH: 100%" onclick="CreateFolder();"> <table cellSpacing="0" cellPadding="0" border="0"> <tr> <td><img height="16" alt="" src="images/Folder.gif" width="16"></td> <td> </td> <td nowrap>Create New Folder</td> </tr> </table> </button> </td> </tr> </table> </body> </html> --- NEW FILE: browser.css --- /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: browser.css * CSS styles used by all pages that compose the File Browser. * * File Authors: * Frederico Caldeira Knabben (fr...@fc...) */ body { background-color: #e3e9f1; } form { margin: 0px 0px 0px 0px ; padding: 0px 0px 0px 0px ; } a, :link, :active, :visited { color: #000000; text-decoration: none; } :hover { color: #0000fa; } a img { border-width: 0px; border-style: none; } frame { background-color: #e3e9f1; border-color: #000000; border-collapse: collapse; } frameset { background-color: #e3e9f1; border-color: #000000; border-collapse: collapse; } .progress_hollow { background-color: transparent; } .progress_filled { background-color: #8fa7c7; } .progress_bar { background-color: #F0F7FF; border-width: 1px; border-color: #000000; border-style: solid; } .Frame_none { border-width: 0px; border-style: none; } .Frame_t { border-right: 0px none; border-top: 1px solid; border-left: 0px none; border-bottom: 0px none; } .Frame_tr { border-right: 1px solid; border-top: 1px solid; border-left: 0px none; border-bottom: 0px none; } .Frame_tl { border-right: 0px none; border-top: 1px solid; border-left: 1px solid; border-bottom: 0px none; } .Frame_r { border-right: 1px solid; border-top: 0px none; border-left: 0px none; border-bottom: 0px none; } .Frame_l { border-right: 0px none; border-top: 0px none; border-left: 1px solid; border-bottom: 0px none; } .Frame_rl { border-right: 1px solid; border-top: 0px none; border-left: 1px solid; border-bottom: 0px none; } .Frame_b { border-right: 0px none; border-top: 0px none; border-left: 0px none; border-bottom: 1px solid; } .Frame_br { border-right: 1px solid; border-top: 0px none; border-left: 0px none; border-bottom: 1px solid; } .Frame_bl { border-right: 0px none; border-top: 0px none; border-left: 1px solid; border-bottom: 1px solid; } .Frame_tb { border-right: 0px none; border-top: 1px solid; border-left: 0px none; border-bottom: 1px solid; } .Frame_all { border-right: 1px solid; border-top: 1px solid; border-left: 1px solid; border-bottom: 1px solid; } body.FileArea { background-color: #ffffff; } body, td, input, select { font-size: 11px; font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; } .ActualFolder { font-weight: bold; font-size: 14px; } .PopupButtons { border-top: #8fa7c7 1px solid; background-color: #ffffff; padding: 7px 10px 7px 10px; } .Button, button { border-right: #737357 1px solid; border-top: #737357 1px solid; border-left: #737357 1px solid; color: #ffffff; border-bottom: #737357 1px solid; background-color: #8fa7c7; } .FolderListCurrentFolder img { background-image: url(images/FolderOpened.gif); } .FolderListFolder img { background-image: url(images/Folder.gif); } --- NEW FILE: frmupload.html --- <!-- * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: frmupload.html * Page used to upload new files in the current folder. * * File Authors: * Frederico Caldeira Knabben (fr...@fc...) * Grant French (gr...@mc...) --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <link href="browser.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="js/fckxml.js"></script> <script type="text/javascript" src="js/common.js"></script> <script language="javascript"> var randomnumber=Math.floor(Math.random()*65535); var refreshURL=''; var uploading=false; function SetCurrentFolder( resourceType, folderPath ) { var sUrl = oConnector.UploadHandler +'?uploadID='+randomnumber+'&Connector='+escape(oConnector.ConnectorUrl)+'&Command=FileUpload' ; sUrl += '&Type=' + resourceType ; sUrl += '&CurrentFolder=' + folderPath ; sUrl += '&ExtraParams=' + oConnector.ExtraParams ; document.getElementById('frmUpload').action = sUrl ; oConnector.ResourceType = resourceType ; oConnector.CurrentFolder = folderPath ; } function OnSubmit() { if ( document.getElementById('NewFile').value.length == 0 ) { alert( 'Please select a file from your computer' ) ; return false ; } // Set the interface elements. document.getElementById('eUploadMessage').innerHTML = 'Upload a new file in this folder (Upload in progress, please wait... 0%)' ; document.getElementById('filebox').style.display="none"; resetProgressBar(); document.getElementById('progressbox').style.display="inline"; document.getElementById('btnUpload').disabled = true ; uploading=true; setTimeout("GetUploadProgress()",2000); return true ; } function OnUploadCompleted( errorNumber, fileName ) { uploading=false; // Reset the Upload Worker Frame. window.parent.frames['frmUploadWorker'].location = '' ; // Reset the upload form. //Sometimes causes IE to get itself in a mess (wont allow second upload) //document.getElementById('NewFile').reset() ; // Reset the interface elements. document.getElementById('eUploadMessage').innerHTML = 'Upload a new file in this folder' ; document.getElementById('btnUpload').disabled = false ; var randomnumber=Math.floor(Math.random()*65535); SetCurrentFolder(oConnector.ResourceType,oConnector.CurrentFolder); switch ( errorNumber ) { case 0 : window.parent.frames['frmResourcesList'].Refresh() ; document.getElementById('filebox').style.display="inline"; document.getElementById('progressbox').style.display="none"; break ; case 201 : window.parent.frames['frmResourcesList'].Refresh() ; document.getElementById('filebox').style.display="inline"; document.getElementById('progressbox').style.display="none"; alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ; break ; case 202 : document.getElementById('filebox').style.display="inline"; document.getElementById('progressbox').style.display="none"; alert( 'Error, "'+fileName+'"' ) ; break ; default : document.getElementById('filebox').style.display="inline"; document.getElementById('progressbox').style.display="none"; alert( 'Error on file upload. Error number: ' + errorNumber ) ; break ; } } function resetProgressBar() { oProgressBar=document.getElementById('progress'); var rows=oProgressBar.getElementsByTagName('tr'); var row=rows[0]; var cols=row.getElementsByTagName('td'); // var label=document.getElementById("progress_label"); // label.innerHTML="0%" for (i=0;i<(cols.length-1);i++) { cols[i].className="progress_hollow"; } } warned=false; function GetUploadProgressCallback( fckXml ) { // Get the current folder path. if (!uploading) return false; var oNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ) ; if (oNode==null) { if(!warned) { alert("Invalid XML response from connector."); warned=true; } return false; } if ((oNode.attributes.getNamedItem('path')==null)||(oNode.attributes.getNamedItem('url')==null)) { if(!warned) { alert("Invalid XML response from connector."); warned=true; } return; } var sCurrentFolderPath = oNode.attributes.getNamedItem('path').value ; var sCurrentFolderUrl = oNode.attributes.getNamedItem('url').value ; // Add the Folders. var oNode = fckXml.SelectSingleNode( 'Connector/Progress' ) ; if (oNode==null) { if(!warned) { alert("Invalid XML response from connector."); warned=true; } return false; } if ((oNode.attributes.getNamedItem('max')==null)||(oNode.attributes.getNamedItem('value')==null)) { if(!warned) { alert("Invalid XML response from connector."); warned=true; } return; } var iMax = oNode.attributes.getNamedItem('max').value ; var iValue = oNode.attributes.getNamedItem('value').value ; var oNode = fckXml.SelectSingleNode( 'Connector/RefreshURL' ) ; if (oNode==null) { if(!warned) { alert("Invalid XML response from connector."); warned=true; } return false; } if ((oNode.attributes.getNamedItem('url')==null)) { if(!warned) { alert("Invalid XML response from connector."); warned=true; } return; } refreshURL = oNode.attributes.getNamedItem('url').value ; var oProgressBar=document.getElementById('progress'); //var label=document.getElementById("progress_label"); var rows=oProgressBar.getElementsByTagName('tr'); var row=rows[0]; var cols=row.getElementsByTagName('td'); var percentage=Math.floor((iValue/iMax)*100); document.getElementById('eUploadMessage').innerHTML = 'Upload a new file in this folder (Upload in progress, please wait.. ' + percentage + '% )' ; //label.innerHTML=percentage+"%" for (i=0;i<(cols.length-1);i++) { if (((i+1)*(100/cols.length))<=percentage) { cols[i].className="progress_filled"; } else { cols[i].className="progress_hollow"; } } if (uploading) getProgressTimer=setTimeout("GetUploadProgress()",1000); } function GetUploadProgress() { if (uploading) oConnector.SendCommand( 'GetUploadProgress', 'uploadID='+randomnumber+'&refreshURL='+escape(refreshURL), GetUploadProgressCallback ) ; } window.onload = function() { window.top.IsLoadedUpload = true ; } </script> </head> <body bottomMargin="0" topMargin="0"> <form id="frmUpload" action="" target="frmUploadWorker" method="post" enctype="multipart/form-data" onsubmit="return OnSubmit();"> <table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td nowrap> <span id="eUploadMessage">Upload a new file in this folder</span><br> <table cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td width="100%"> <div id="filebox"><input id="NewFile" name="NewFile" style="width: 100%; background-color: transparent;" type="file"></div> <div id="progressbox" style="display: none"> <table id="progress" style="width: 100%" class="progress_bar"> <tr> <td class="progress_hollow"> </td> <td class="progress_hollow"> </td> <td class="progress_hollow"> </td> <td class="progress_hollow"> </td> <td class="progress_hollow"> </td> <td class="progress_hollow"> </td> <td class="progress_hollow"> </td> <td class="progress_hollow"> </td> <td class="progress_hollow"> </td> <td class="progress_hollow"> </td> <td class="progress_hollow"> </td> <td class="progress_hollow"> </td> <td class="progress_hollow"> </td> <td class="progress_hollow"> </td> <td class="progress_hollow"> </td> <td class="progress_hollow"> </td> <td class="progress_hollow"> </td> <td class="progress_hollow"> </td> <td class="progress_hollow"> </td> <td class="progress_hollow"> </td> </tr> </table> <!--<div id="progress_label"></div>--> </div> </td> <td nowrap> <input id="btnUpload" type="submit" value="Upload"></td> </tr> </table> </td> </tr> </table> </form> </body> </html> |
From: Thyamad c. <th...@us...> - 2005-09-29 19:50:04
|
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/filemanager/upload/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/filemanager/upload/php Added Files: config.php upload.php util.php Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi --- NEW FILE: config.php --- <?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: config.php * Configuration file for the PHP File Uploader. * * File Authors: * Frederico Caldeira Knabben (fr...@fc...) */ global $Config ; // SECURITY: You must explicitelly enable this "uploader". $Config['Enabled'] = false ; // Path to uploaded files relative to the document root. $Config['UserFilesPath'] = '/UserFiles/' ; $Config['AllowedExtensions']['File'] = array() ; $Config['DeniedExtensions']['File'] = array('php','php3','php5','phtml','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','dll','reg','cgi') ; $Config['AllowedExtensions']['Image'] = array('jpg','gif','jpeg','png') ; $Config['DeniedExtensions']['Image'] = array() ; $Config['AllowedExtensions']['Flash'] = array('swf','fla') ; $Config['DeniedExtensions']['Flash'] = array() ; ?> --- NEW FILE: util.php --- <?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: util.php * This is the File Manager Connector for ASP. * * File Authors: * Frederico Caldeira Knabben (fr...@fc...) */ function RemoveExtension( $fileName ) { return substr( $fileName, 0, strrpos( $fileName, '.' ) ) ; } function GetRootPath() { $sRealPath = realpath( './' ) ; $sSelfPath = $_SERVER['PHP_SELF'] ; $sSelfPath = substr( $sSelfPath, 0, strrpos( $sSelfPath, '/' ) ) ; return substr( $sRealPath, 0, strlen( $sRealPath ) - strlen( $sSelfPath ) ) ; } ?> --- NEW FILE: upload.php --- <?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: upload.php * This is the "File Uploader" for PHP. * * File Authors: * Frederico Caldeira Knabben (fr...@fc...) */ require('config.php') ; require('util.php') ; // This is the function that sends the results of the uploading process. function SendResults( $errorNumber, $fileUrl = '', $fileName = '', $customMsg = '' ) { echo '<script type="text/javascript">' ; echo 'window.parent.OnUploadCompleted(' . $errorNumber . ',"' . str_replace( '"', '\\"', $fileUrl ) . '","' . str_replace( '"', '\\"', $fileName ) . '", "' . str_replace( '"', '\\"', $customMsg ) . '") ;' ; echo '</script>' ; exit ; } // Check if this uploader has been enabled. if ( !$Config['Enabled'] ) SendResults( '1', '', '', 'This file uploader is disabled. Please check the "editor/filemanager/upload/php/config.php" file' ) ; // Check if the file has been correctly uploaded. if ( !isset( $_FILES['NewFile'] ) || is_null( $_FILES['NewFile']['tmp_name'] ) || $_FILES['NewFile']['name'] == '' ) SendResults( '202' ) ; // Get the posted file. $oFile = $_FILES['NewFile'] ; // Get the uploaded file name and extension. $sFileName = $oFile['name'] ; $sOriginalFileName = $sFileName ; $sExtension = substr( $sFileName, ( strrpos($sFileName, '.') + 1 ) ) ; $sExtension = strtolower( $sExtension ) ; // The the file type (from the QueryString, by default 'File'). $sType = isset( $_GET['Type'] ) ? $_GET['Type'] : 'File' ; // Get the allowed and denied extensions arrays. $arAllowed = $Config['AllowedExtensions'][$sType] ; $arDenied = $Config['DeniedExtensions'][$sType] ; // Check if it is an allowed extension. if ( ( count($arAllowed) > 0 && !in_array( $sExtension, $arAllowed ) ) || ( count($arDenied) > 0 && in_array( $sExtension, $arDenied ) ) ) SendResults( '202' ) ; $sErrorNumber = '0' ; $sFileUrl = '' ; // Initializes the counter used to rename the file, if another one with the same name already exists. $iCounter = 0 ; // The the target directory. $sServerDir = GetRootPath() . $Config["UserFilesPath"] ; while ( true ) { // Compose the file path. $sFilePath = $sServerDir . $sFileName ; // If a file with that name already exists. if ( is_file( $sFilePath ) ) { $iCounter++ ; $sFileName = RemoveExtension( $sOriginalFileName ) . '(' . $iCounter . ').' . $sExtension ; $sErrorNumber = '201' ; } else { move_uploaded_file( $oFile['tmp_name'], $sFilePath ) ; if ( is_file( $sFilePath ) ) { $oldumask = umask(0) ; chmod( $sFilePath, 0777 ) ; umask( $oldumask ) ; } $sFileUrl = $Config["UserFilesPath"] . $sFileName ; break ; } } SendResults( $sErrorNumber, $sFileUrl, $sFileName ) ; ?> |
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/filemanager/browser/mcpuk/images/icons/32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/filemanager/browser/mcpuk/images/icons/32 Added Files: ai.gif avi.gif bmp.gif cs.gif default.icon.gif dll.gif doc.gif exe.gif fla.gif gif.gif htm.gif html.gif jpg.gif js.gif mdb.gif mp3.gif pdf.gif ppt.gif rdp.gif swf.gif swt.gif txt.gif vsd.gif xls.gif xml.gif zip.gif Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi --- NEW FILE: default.icon.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mdb.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: bmp.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: exe.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: cs.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ai.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: html.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mp3.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: htm.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: dll.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: gif.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: zip.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: fla.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: js.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: xls.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: swf.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: swt.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: xml.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: avi.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: txt.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: doc.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ppt.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: vsd.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: rdp.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: pdf.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: jpg.gif --- (This appears to be a binary file; contents omitted.) |
From: Thyamad c. <th...@us...> - 2005-09-29 19:50:04
|
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/images Added Files: anchor.gif Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi --- NEW FILE: anchor.gif --- (This appears to be a binary file; contents omitted.) |
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/filemanager/browser/mcpuk/images/icons In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/filemanager/browser/mcpuk/images/icons Added Files: ai.gif avi.gif bmp.gif cs.gif default.icon.gif dll.gif doc.gif exe.gif fla.gif gif.gif htm.gif html.gif jpg.gif js.gif mdb.gif mp3.gif pdf.gif ppt.gif rdp.gif swf.gif swt.gif txt.gif vsd.gif xls.gif xml.gif zip.gif Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi --- NEW FILE: default.icon.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mdb.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: bmp.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: exe.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: cs.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ai.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: html.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mp3.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: htm.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: dll.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: gif.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: zip.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: fla.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: js.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: xls.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: swf.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: swt.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: xml.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: avi.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: txt.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: doc.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ppt.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: vsd.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: rdp.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: pdf.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: jpg.gif --- (This appears to be a binary file; contents omitted.) |
From: Thyamad c. <th...@us...> - 2005-09-29 19:49:59
|
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/filemanager/upload/asp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/filemanager/upload/asp Added Files: class_upload.asp config.asp io.asp upload.asp Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi --- NEW FILE: config.asp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: io.asp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: class_upload.asp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: upload.asp --- (This appears to be a binary file; contents omitted.) |
Update of /cvsroot/thyapi/thyapi/thywidgets/external/fckeditor/editor/filemanager/browser/mcpuk/connectors/php/Commands/helpers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv563/thywidgets/external/fckeditor/editor/filemanager/browser/mcpuk/connectors/php/Commands/helpers Added Files: .htaccess header.cgi iconlookup.php progress.cgi upload.cgi Log Message: Commiting file additions and modification from SVN revision 2028 to 2029... Changes made by frank on 2005-09-29 21:42:57 +0200 (Thu, 29 Sep 2005) corresponding to SVN revision 2029 with message: updating fckeditor in dynapi --- NEW FILE: header.cgi --- #!/usr/bin/perl # Mega Upload # PHP File Uploader with progress bar Version 1.42 # Copyright (C) Raditha Dissanyake 2003 # http://www.raditha.com # Licence: # The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Initial Developer of the Original Code is Raditha Dissanayake. # Portions created by Raditha are Copyright (C) 2003 # Raditha Dissanayake. All Rights Reserved. # $tmp_dir="/www/m/c/mcpuk.net/tmp"; $|=1; #unbuffers streams $interval=1; # how often to refresh the progress bar $max_upload = 500000000000; # set this to whatever you feel suitable for you. # don't change the next few lines unless you have a very good reason to. $post_data_file = "$tmp_dir/$sessionid"."_postdata"; $monitor_file = "$tmp_dir/$sessionid"."_flength"; $signal_file = "$tmp_dir/$sessionid"."_signal"; 1; --- NEW FILE: progress.cgi --- #!/usr/bin/perl -w # PHP File Uploader with progress bar Version 1.43 # Copyright (C) Raditha Dissanyake 2003,2004 # http://www.raditha.com # Licence: # The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Initial Developer of the Original Code is Raditha Dissanayake. # Portions created by Raditha are Copyright (C) 2003,2004 # Raditha Dissanayake. All Rights Reserved. # # Portions contributed by Orest Kinasevych are Copyright (C) # 2003 Kinasevych Saj # # CHANGES # 1.00 # No longer uses cookies. This has two major benefits; the first # being that minority of users who do not like cookies are not # inconvinienced. Secondly there is one less dependecy and this # would lead to a smoother setup for most people. # (if you want to use cookies look at the contrib folder) # # 1.02 # added a cache control header in version 1.02 # # 1.10 # Added a more detailed progress bar in version # # 1.42 # The organization of the temporary files have been improved so to # make is easier to clean up after abandoned uploads. (as suggested # by Igor Kryltsov) # # use CGI; use Fcntl qw(:DEFAULT :flock); #use Carp; # Carp is only needed if you want debugging. Uncomment the above line # if you comment out any of the carp statements in the body of the # script. # # the most obvious issue that we will face is file locking. # if two threads read and write from the same file at the same # time only one of them will be allowed to finish the operation. # Since we are storing our temporary data in a file we are likely to # run into that exact same problem. # We can't overcome it but we can make sure the progress bar does # not display junk when that happens. # # # status codes = 0-uploading, 1-started, 2- complete $query = new CGI(); $sessionid = $query->param('sessionid'); $sessionid =~ s/[^a-zA-Z0-9]//g; # santized as suggested by Terrence Johnson. $iTotal = $query->param('iTotal'); $iRead = $query->param('iRead'); $status = $query->param('iStatus'); ## # The code that deals with calculating elapsed time, time remaining # and upload speed were contributed by Orest Kinasevych ## ## # Get values assigned for current time and upload start time ## #$dtnow = $query->param('dtnow'); # assign value for current time $dtnow=time; $dtstart = $query->param('dtstart'); # assign value for upload start time ## #carp "$dtnow $dtstart"; $thisUrl = $query->url; ## # Elapsed time # Calculate elapsed time and format for display ## $dtelapsed = $dtnow - $dtstart; $dtelapsed_sec = ($dtelapsed % 60); # gets number of seconds $dtelapsed_min = ((($dtelapsed - $dtelapsed_sec) % 3600) / 60); # gets number of minutes $dtelapsed_hours = (((($dtelapsed - $dtelapsed_sec) - ($dtelapsed_min * 60)) % 86400) / 3600); # gets number of hours; assuming that we won't be going into days! if ($dtelapsed_sec < 10) { $dtelapsed_sec = "0$dtelapsed_sec"; } # append leading zero if ($dtelapsed_min < 10) { $dtelapsed_min = "0$dtelapsed_min"; } # append leading zero if ($dtelapsed_hours < 10) { $dtelapsed_hours = "0$dtelapsed_hours"; } # append leading zero $dtelapsedf = "$dtelapsed_hours:$dtelapsed_min:$dtelapsed_sec"; # display as 00:00:00 ## ## # Upload speed ## $bSpeed = 0; # if not yet determined if ($dtelapsed > 0) # avoid divide by zero errors { $bSpeed = $iRead / $dtelapsed; # Bytes uploaded / Seconds elapsed = Bytes/Second speed $bitSpeed = $bSpeed * 8; # bps $kbitSpeed = $bitSpeed / 1000; # Kbps } else { $kbitSpeed = $bSpeed; # just pass the zero value } $bSpeedf = sprintf("%d",$kbitSpeed); # remove decimals ## # Est remaining time # Calculate remaining time based on upload speed so far ## $bRemaining = $iTotal - $iRead; # Total size - amount uploaded = amount remaining $dtRemaining = 0; if ($bSpeed > 0) { # Bytes remaining / Bytes/Second = Seconds $dtRemaining = $bRemaining / $bSpeed; } $dtRemaining = sprintf("%d",$dtRemaining); # remove decimals $dtRemaining_sec = ($dtRemaining % 60); # gets number of seconds $dtRemaining_min = ((($dtRemaining - $dtRemaining_sec) % 3600) / 60); # gets number of minutes $dtRemaining_hours = (((($dtRemaining - $dtRemaining_sec) - ($dtRemaining_min * 60)) % 86400) / 3600); # gets number of hours; assuming that we won't be going into days! if ($dtRemaining_sec < 10) { # append leading zero $dtRemaining_sec = "0$dtRemaining_sec"; } if ($dtRemaining_min < 10) { # append leading zero $dtRemaining_min = "0$dtRemaining_min"; } if ($dtRemaining_hours < 10) { # append leading zero $dtRemaining_hours = "0$dtRemaining_hours"; } $dtRemainingf = "$dtRemaining_hours:$dtRemaining_min:$dtRemaining_sec"; # display as 00:00:00 ## # The values for iStatus are # 0 - in progress # 1 - New upload # 2 - Complete ## #carp "iTotal = $iTotal, iRead = $iRead, status = $status, sessionId = $sessionid"; require("./header.cgi"); sub readFlength() { if(open (STAT, $monitor_file)) { sysopen(STAT, $monitor_file, O_RDONLY) or die "can't open numfile: $!"; $ofh = select(STAT); $| = 1; select ($ofh); $iTotal = <STAT>; #carp "trying to read the stuff in $iTotal"; if(defined($iTotal) && $iTotal ne "") { return 1; } else { return 0; } } return 0; } ## # many thanx to Terrence Johnson who pointed out the fact that i should have added # cache control header. ## print "Pragma: no-cache\n"; print "Content-type: text/xml\n\n "; if($status == 1) { #new upload starting show_starting(); } elsif($status ==0) { ## # in progress # we will try to read in the total size of data to be transfered from the # shared file. It will also tell us how much data has been transfered upto # now. ## $bRead = -s "$post_data_file"; if(defined $bRead) { # We have been able to read in it from the file. $percent = $bRead * 100 / $iTotal; $iRead=$bRead; } else { &show_error(); exit(); } # # division results in truncation errors at times so don't compare percentage # There have been occaisional reports of the progress bar showing 100% but not # disappearing even after file upload has been completed. # # Nils Menrad came up with the solution which is to modify the end of upload # test. # if((($iTotal == $bRead) && $bRead != 0) || $bRead>$iTotal) { if($status == 1 && -e "$signal_file") { $bRead=0; $status=0; &get_last_values(); } else { show_complete(); unlink $monitor_file; unlink $post_data_file; unlink $signal_file; exit; } } else { $kachal = "$bRead , $iTotal"; } &make_progress_bar(); exit; } else { show_complete(); } # # Since the progress bar is in html, so it needs to refresh itself periodicaly to # obtain new values. The refresh url with the query string is generated by this # function. sub make_url { #print "Content-type: text/html\n\n "; #print "hellow $iTotal $iStatus $sessionid $iRead <br>\n" ; ## $url = "$thisUrl?iTotal=$iTotal&iRead=$iRead&iStatus=$status&sessionid=$sessionid&dtnow=$dtnow&dtstart=$dtstart"; ## $url =~ s/\n//; return $url; } sub make_progress_bar { $url = make_url(); print <<__PART1__; <UploadProgress sessionID="$sessionid"> <RefreshURL><![CDATA[$url]]></RefreshURL> <TotalBytes>$iTotal</TotalBytes> <ReadBytes>$iRead</ReadBytes> <Status>$status</Status> <Speed>$bSpeedf</Speed> <TimeRemaining>$dtRemainingf</TimeRemaining> <TimeElapsed>$dtelapsedf</TimeElapsed> </UploadProgress> __PART1__ } sub show_complete { $status=2; $url = make_url(); print <<__PART2__; <UploadProgress sessionID="$sessionid"> <RefreshURL><![CDATA[$url]]></RefreshURL> <TotalBytes>$iTotal</TotalBytes> <ReadBytes>$iRead</ReadBytes> <Status>$status</Status> <Speed>$bSpeedf</Speed> <TimeRemaining>0</TimeRemaining> <TimeElapsed>$dtelapsedf</TimeElapsed> </UploadProgress> __PART2__ } sub show_starting { #carp "starting"; if(readFlength() == 1) { $status=0; } $url = make_url(); print <<__PART2__; <UploadProgress sessionID="$sessionid"> <RefreshURL><![CDATA[$url]]></RefreshURL> <TotalBytes>$iTotal</TotalBytes> <ReadBytes>$iRead</ReadBytes> <Status>$status</Status> <Speed>$bSpeedf</Speed> <TimeRemaining>$dtRemainingf</TimeRemaining> <TimeElapsed>$dtelapsedf</TimeElapsed> </UploadProgress> __PART2__ } sub show_error { $url = make_url(); print <<__PART2__; <UploadProgress sessionID="$sessionid"> <RefreshURL><![CDATA[$url]]></RefreshURL> <TotalBytes>$iTotal</TotalBytes> <ReadBytes>$iRead</ReadBytes> <Status>-1</Status> <Speed>$bSpeedf</Speed> <TimeRemaining>$dtRemainingf</TimeRemaining> <TimeElapsed>$dtelapsedf</TimeElapsed> </UploadProgress> __PART2__ } # this function may not return; sub get_last_values() { if($status == 1) { show_starting(); exit; } else { if($status == 2) { show_complete(); exit; } else { # # we have done everything possible to try to retrieve the data # now try to calculate the percentage once again # $iTotal = $iTotal; $bRead = $iRead; if(defined($iTotal) && $iTotal != 0) { $percent = $bRead * 100 / $iTotal; $kachal="1"; } else { &show_error(); exit; } } } } --- NEW FILE: upload.cgi --- #!/usr/bin/perl # PHP File Uploader with progress bar Version 1.43 # Copyright (C) Raditha Dissanyake 2003 # http://www.raditha.com # Licence: # The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under this License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Initial Developer of the Original Code is Raditha Dissanayake. # Portions created by Raditha are Copyright (C) 2003 # Raditha Dissanayake. All Rights Reserved. # # CHANGES: # As of version 1.00 cookies were abolished! # as of version 1.02 stdin is no longer set to non blocking. # 1.40 - POST is no longer required and processing is more efficient. # Please refer online docs for details. # 1.42 - The temporary locations were changed, to make it easier to # clean up afterwards. use CGI; use Fcntl qw(:DEFAULT :flock); use File::Temp qw/ tempfile tempdir /; #use Carp; @qstring=split(/&/,$ENV{'QUERY_STRING'}); @p1 = split(/=/,$qstring[0]); $sessionid = $p1[1]; $sessionid =~ s/[^a-zA-Z0-9]//g; # sanitized as suggested by Terrence Johnson. @p1 = split(/=/,$qstring[1]); $php_uploader = $p1[1]; require("./header.cgi"); #carp "$post_data_file and $monitor_file"; $content_type = $ENV{'CONTENT_TYPE'}; $len = $ENV{'CONTENT_LENGTH'}; $bRead=0; $|=1; sub bye_bye { $mes = shift; print "Content-type: text/html\n\n"; print "<br>$mes<br>\n"; exit; } # # The thing to watch out for is file locking. Only # one thread may open a file for writing at any given time. # if (-e "$post_data_file") { unlink("$post_data_file"); } if (-e "$monitor_file") { unlink("$monitor_file"); } sysopen(FH, $monitor_file, O_RDWR | O_CREAT, 0x777) or die "can't open numfile: $!"; # autoflush FH $ofh = select(FH); $| = 1; select ($ofh); flock(FH, LOCK_EX) or die "can't write-lock numfile: $!"; seek(FH, 0, 0) or die "can't rewind numfile : $!"; print FH $len; close(FH); sleep(1); open(TMP,">","$post_data_file") or &bye_bye ("can't open temp file"); # # read and store the raw post data on a temporary file so that we can # pass it though to a CGI instance later on. # my $i=0; $ofh = select(TMP); $| = 1; select ($ofh); while (read (STDIN ,$LINE, 32768) && $bRead < $len ) { $bRead += length $LINE; select(undef, undef, undef,0.01); # sleep for 0.35 of a second. # Many thanx to Patrick Knoell who came up with the optimized value for # the duration of the sleep $i++; print TMP $LINE; } close (TMP); # # We don't want to decode the post data ourselves. That's like # reinventing the wheel. If we handle the post data with the perl # CGI module that means the PHP script does not get access to the # files, but there is a way around this. # # We can ask the CGI module to save the files, then we can pass # these filenames to the PHP script. In other words instead of # giving the raw post data (which contains the 'bodies' of the # files), we just send a list of file names. # #print "\n\n"; open(STDIN,"$post_data_file") or die "can't open temp file"; # chmod the file so everyone can read it # added by Ben Lancaster (be...@st...) chmod (0666, $post_data_file); my $cg = new CGI(); my $qstring="?"; my %vars = $cg->Vars; my $j=0; while(($key,$value) = each %vars) { $file_upload = $cg->param($key); if(defined $value && $value ne '') { my $fh = $cg->upload($key); #print "::".$key."::".$fh."::\n"; if(defined $fh) { #carp $fh; ($tmp_fh, $tmp_filename) = tempfile(); # chmod the file so everyone can read it # added by Ben Lancaster (be...@st...) chmod (0666, $tmp_filename); while(<$fh>) { print $tmp_fh $_; } close($tmp_fh); $fsize =(-s $fh); $fh =~ s/([^a-zA-Z0-9_\-.])/uc sprintf("%%%02x",ord($1))/eg; $tmp_filename =~ s/([^a-zA-Z0-9_\-.])/uc sprintf("%%%02x",ord($1))/eg; $qstring .= "file[$key][name]=$fh&file[$key][size]=$fsize&"; $qstring .= "file[$key][tmp_name]=$tmp_filename&"; $j++; } else { $value =~ s/([^a-zA-Z0-9_\-.])/uc sprintf("%%%02x",ord($1))/eg; $qstring .= "$key=$value&" ; } } } my $url = $php_uploader . $qstring . "&" . $ENV{'QUERY_STRING'}; open (SIGNAL,">", $signal_file); print SIGNAL "\n"; close (SIGNAL); print "Location: $url\n\n"; --- NEW FILE: iconlookup.php --- <?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2005 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: iconlookup.php * (!) * * File Authors: * Grant French (gr...@mc...) */ function iconLookup($mime,$ext) { $mimeIcons=array( "image"=>"image.jpg", "audio"=>"sound.jpg", "video"=>"video.jpg", "text"=>"document2.jpg", "text/html"=>"html.jpg", "application"=>"binary.jpg", "application/pdf"=>"pdf.jpg", "application/msword"=>"document2.jpg", "application/postscript"=>"postscript.jpg", "application/rtf"=>"document2.jpg", "application/vnd.ms-excel"=>"document2.jpg", "application/vnd.ms-powerpoint"=>"document2.jpg", "application/x-tar"=>"tar.jpg", "application/zip"=>"tar.jpg", "message"=>"email.jpg", "message/html"=>"html.jpg", "model"=>"kmplot.jpg", "multipart"=>"kmultiple.jpg" ); $extIcons=array( "pdf"=>"pdf.jpg", "ps"=>"postscript.jpg", "eps"=>"postscript.jpg", "ai"=>"postscript.jpg", "ra"=>"real_doc.jpg", "rm"=>"real_doc.jpg", "ram"=>"real_doc.jpg", "wav"=>"sound.jpg", "mp3"=>"sound.jpg", "ogg"=>"sound.jpg", "eml"=>"email.jpg", "tar"=>"tar.jpg", "zip"=>"tar.jpg", "bz2"=>"tar.jpg", "tgz"=>"tar.jpg", "gz"=>"tar.jpg", "rar"=>"tar.jpg", "avi"=>"video.jpg", "mpg"=>"video.jpg", "mpeg"=>"video.jpg", "jpg"=>"image.jpg", "gif"=>"image.jpg", "png"=>"image.jpg", "jpeg"=>"image.jpg", "nfo"=>"info.jpg", "xls"=>"spreadsheet.jpg", "csv"=>"spreadsheet.jpg", "html"=>"html.jpg", "doc"=>"document2.jpg", "rtf"=>"document2.jpg", "txt"=>"document2.jpg", "xla"=>"document2.jpg", "xlc"=>"document2.jpg", "xlt"=>"document2.jpg", "xlw"=>"document2.jpg", "txt"=>"document2.jpg" ); if ($mime!="text/plain") { //Check specific cases $mimes=array_keys($mimeIcons); if (in_array($mime,$mimes)) { return $_SERVER['DOCUMENT_ROOT'].dirname($_SERVER['PHP_SELF'])."/images/".$mimeIcons[$mime]; } else { //Check for the generic mime type $mimePrefix="text"; $firstSlash=strpos($mime,"/"); if ($firstSlash!==false) $mimePrefix=substr($mime,0,$firstSlash); if (in_array($mimePrefix,$mimes)) { return $_SERVER['DOCUMENT_ROOT'].dirname($_SERVER['PHP_SELF'])."/images/".$mimeIcons[$mimePrefix]; } else { return $_SERVER['DOCUMENT_ROOT'].dirname($_SERVER['PHP_SELF'])."/images/empty.jpg"; } } } else { $extensions=array_keys($extIcons); if (in_array($ext,$extensions)) { return $_SERVER['DOCUMENT_ROOT'].dirname($_SERVER['PHP_SELF'])."/images/".$extIcons[$ext]; } else { return $_SERVER['DOCUMENT_ROOT'].dirname($_SERVER['PHP_SELF'])."/images/empty.jpg"; } } return $_SERVER['DOCUMENT_ROOT'].dirname($_SERVER['PHP_SELF'])."/images/empty.jpg"; } ?> --- NEW FILE: .htaccess --- Options ExecCGI |