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 |