[geeklog-cvs] Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses fck_othercommands.js, 1.6, 1.7 fckblockquotecommand.js, 1.1, 1.2 fckcorestylecommand.js, 1.1, 1.2 fckfitwindow.js, 1.3, 1.4 fckindentcommands.js, 1.1, 1.2 fckjustifycommands.js, 1.1, 1.2 fcklistcommands.js, 1.1, 1.2 fcknamedcommand.js, 1.5, 1.6 fckpasteplaintextcommand.js, 1.5, 1.6 fckpastewordcommand.js, 1.6, 1.7 fckremoveformatcommand.js, 1.1, 1.2 fckshowblocks.js, 1.1, 1.2 fckspellcheckcommand_gecko.js, 1.4, 1.5 fckspellcheckcommand_ie.js, 1.4, 1.5 fckstylecommand.js, 1.5, 1.6 fcktablecommand.js, 1.6, 1.7 fcktextcolorcommand.js, 1.5, 1.6

Blaine Lang blaine at qs1489.pair.com
Sun May 4 20:35:27 EDT 2008


Update of /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses
In directory qs1489.pair.com:/tmp/cvs-serv85146/editor/_source/commandclasses

Modified Files:
	fck_othercommands.js fckblockquotecommand.js 
	fckcorestylecommand.js fckfitwindow.js fckindentcommands.js 
	fckjustifycommands.js fcklistcommands.js fcknamedcommand.js 
	fckpasteplaintextcommand.js fckpastewordcommand.js 
	fckremoveformatcommand.js fckshowblocks.js 
	fckspellcheckcommand_gecko.js fckspellcheckcommand_ie.js 
	fckstylecommand.js fcktablecommand.js fcktextcolorcommand.js 
Log Message:
Upgraded the FCKeditor to version 2.6 Final - latest release April 7/08

Index: fcktablecommand.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses/fcktablecommand.js,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** fcktablecommand.js	9 Feb 2008 12:53:57 -0000	1.6
--- fcktablecommand.js	5 May 2008 00:35:23 -0000	1.7
***************
*** 1,5 ****
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
--- 1,5 ----
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
***************
*** 36,40 ****
  		switch ( this.Name )
  		{
! 			case 'TableMergeRight' : 
  				return FCKTableHandler.MergeRight() ;
  			case 'TableMergeDown' :
--- 36,40 ----
  		switch ( this.Name )
  		{
! 			case 'TableMergeRight' :
  				return FCKTableHandler.MergeRight() ;
  			case 'TableMergeDown' :
***************
*** 89,93 ****
  					return FCK_TRISTATE_DISABLED ;
  			case 'TableMergeCells' :
! 				if ( FCKTableHandler.CheckIsSelectionRectangular() 
  						&& FCKTableHandler.GetSelectedCells().length > 1 )
  					return FCK_TRISTATE_OFF ;
--- 89,93 ----
  					return FCK_TRISTATE_DISABLED ;
  			case 'TableMergeCells' :
! 				if ( FCKTableHandler.CheckIsSelectionRectangular()
  						&& FCKTableHandler.GetSelectedCells().length > 1 )
  					return FCK_TRISTATE_OFF ;
***************
*** 103,106 ****
  	}
  	else
! 		return FCK_TRISTATE_DISABLED; 
  }
--- 103,106 ----
  	}
  	else
! 		return FCK_TRISTATE_DISABLED;
  }

Index: fckpastewordcommand.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** fckpastewordcommand.js	9 Feb 2008 12:53:57 -0000	1.6
--- fckpastewordcommand.js	5 May 2008 00:35:23 -0000	1.7
***************
*** 1,5 ****
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
--- 1,5 ----
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
***************
*** 34,38 ****
  FCKPasteWordCommand.prototype.GetState = function()
  {
! 	if ( FCKConfig.ForcePasteAsPlainText )
  		return FCK_TRISTATE_DISABLED ;
  	else
--- 34,38 ----
  FCKPasteWordCommand.prototype.GetState = function()
  {
! 	if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG || FCKConfig.ForcePasteAsPlainText )
  		return FCK_TRISTATE_DISABLED ;
  	else

Index: fckindentcommands.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses/fckindentcommands.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckindentcommands.js	9 Feb 2008 12:53:57 -0000	1.1
--- fckindentcommands.js	5 May 2008 00:35:23 -0000	1.2
***************
*** 1,5 ****
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
--- 1,5 ----
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
***************
*** 58,63 ****
  		// If we're in a list, then the indent/outdent operations would be done on the list nodes.
  		// Otherwise, apply the operation on the nearest block nodes.
! 		var nearestListBlock = FCKDomTools.GetCommonParentNode( range.StartNode || range.StartContainer , 
! 				range.EndNode || range.EndContainer, 
  				['ul', 'ol'] ) ;
  		if ( nearestListBlock )
--- 58,63 ----
  		// If we're in a list, then the indent/outdent operations would be done on the list nodes.
  		// Otherwise, apply the operation on the nearest block nodes.
! 		var nearestListBlock = FCKDomTools.GetCommonParentNode( range.StartNode || range.StartContainer ,
! 				range.EndNode || range.EndContainer,
  				['ul', 'ol'] ) ;
  		if ( nearestListBlock )
***************
*** 134,137 ****
--- 134,139 ----
  	{
  		var iterator = new FCKDomRangeIterator( range ) ;
+ 		iterator.EnforceRealBlocks = true ;
+ 
  		range.Expand( 'block_contents' ) ;
  		var commonParents = FCKDomTools.GetCommonParents( range.StartContainer, range.EndContainer ) ;

Index: fckcorestylecommand.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses/fckcorestylecommand.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckcorestylecommand.js	9 Feb 2008 12:53:57 -0000	1.1
--- fckcorestylecommand.js	5 May 2008 00:35:23 -0000	1.2
***************
*** 1,5 ****
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
--- 1,5 ----
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
***************
*** 50,53 ****
--- 50,55 ----
  	GetState : function()
  	{
+ 		if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+ 			return FCK_TRISTATE_DISABLED ;
  		return this.IsActive ? FCK_TRISTATE_ON : FCK_TRISTATE_OFF ;
  	},

Index: fckfitwindow.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses/fckfitwindow.js,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** fckfitwindow.js	9 Feb 2008 12:53:57 -0000	1.3
--- fckfitwindow.js	5 May 2008 00:35:23 -0000	1.4
***************
*** 1,5 ****
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
--- 1,5 ----
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
***************
*** 156,160 ****
  	//also lost, even if you comment the following line (MakeEditable).
  	// if ( FCKBrowserInfo.IsGecko10 )	// Initially I thought it was a FF 1.0 only problem.
! 	if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ) 
  		FCK.EditingArea.MakeEditable() ;
  
--- 156,160 ----
  	//also lost, even if you comment the following line (MakeEditable).
  	// if ( FCKBrowserInfo.IsGecko10 )	// Initially I thought it was a FF 1.0 only problem.
! 	if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG )
  		FCK.EditingArea.MakeEditable() ;
  

Index: fckspellcheckcommand_ie.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_ie.js,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** fckspellcheckcommand_ie.js	9 Feb 2008 12:53:57 -0000	1.4
--- fckspellcheckcommand_ie.js	5 May 2008 00:35:23 -0000	1.5
***************
*** 1,5 ****
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
--- 1,5 ----
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
***************
*** 64,67 ****
  FCKSpellCheckCommand.prototype.GetState = function()
  {
  	return this.IsEnabled ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
! }
\ No newline at end of file
--- 64,69 ----
  FCKSpellCheckCommand.prototype.GetState = function()
  {
+ 	if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+ 		return FCK_TRISTATE_DISABLED ;
  	return this.IsEnabled ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
! }

Index: fcknamedcommand.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses/fcknamedcommand.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fcknamedcommand.js	9 Feb 2008 12:53:57 -0000	1.5
--- fcknamedcommand.js	5 May 2008 00:35:23 -0000	1.6
***************
*** 1,5 ****
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
--- 1,5 ----
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
***************
*** 34,37 ****
--- 34,39 ----
  FCKNamedCommand.prototype.GetState = function()
  {
+ 	if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+ 		return FCK_TRISTATE_DISABLED ;
  	return FCK.GetNamedCommandState( this.Name ) ;
  }

Index: fckjustifycommands.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses/fckjustifycommands.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckjustifycommands.js	9 Feb 2008 12:53:57 -0000	1.1
--- fckjustifycommands.js	5 May 2008 00:35:23 -0000	1.2
***************
*** 1,5 ****
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
--- 1,5 ----
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
***************
*** 40,50 ****
  			{
  				case 'left' :
! 					return classes[0] ;
  				case 'center' :
! 					return classes[1] ;
  				case 'right' :
! 					return classes[2] ;
  				case 'justify' :
! 					return classes[3] ;
  			}
  		}
--- 40,50 ----
  			{
  				case 'left' :
! 					return classes[0] || null ;
  				case 'center' :
! 					return classes[1] || null ;
  				case 'right' :
! 					return classes[2] || null ;
  				case 'justify' :
! 					return classes[3] || null ;
  			}
  		}
***************
*** 100,104 ****
  		// change the DOM tree and break selections.
  		var bookmark = range.CreateBookmark() ;
! 		
  		var cssClassName = this._CssClassName ;
  
--- 100,104 ----
  		// change the DOM tree and break selections.
  		var bookmark = range.CreateBookmark() ;
! 
  		var cssClassName = this._CssClassName ;
  

Index: fckstylecommand.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses/fckstylecommand.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fckstylecommand.js	9 Feb 2008 12:53:57 -0000	1.5
--- fckstylecommand.js	5 May 2008 00:35:23 -0000	1.6
***************
*** 1,5 ****
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
--- 1,5 ----
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
***************
*** 28,32 ****
  {
  	Name : 'Style',
! 	
  	Execute : function( styleName, styleComboItem )
  	{
--- 28,32 ----
  {
  	Name : 'Style',
! 
  	Execute : function( styleName, styleComboItem )
  	{
***************
*** 46,50 ****
  	GetState : function()
  	{
! 		if ( !FCK.EditorDocument )
  			return FCK_TRISTATE_DISABLED ;
  
--- 46,50 ----
  	GetState : function()
  	{
! 		if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG || !FCK.EditorDocument )
  			return FCK_TRISTATE_DISABLED ;
  

Index: fckblockquotecommand.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses/fckblockquotecommand.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckblockquotecommand.js	9 Feb 2008 12:53:57 -0000	1.1
--- fckblockquotecommand.js	5 May 2008 00:35:23 -0000	1.2
***************
*** 1,5 ****
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
--- 1,5 ----
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
***************
*** 26,30 ****
  }
  
! FCKBlockQuoteCommand.prototype = 
  {
  	Execute : function()
--- 26,30 ----
  }
  
! FCKBlockQuoteCommand.prototype =
  {
  	Execute : function()
***************
*** 46,53 ****
  			var bStart	= range.GetBookmarkNode( bookmark, true ) ;
  			var bEnd	= range.GetBookmarkNode( bookmark, false ) ;
! 			
  			var cursor ;
! 			
! 			if ( bStart 
  					&& bStart.parentNode.nodeName.IEquals( 'blockquote' )
  					&& !bStart.previousSibling )
--- 46,53 ----
  			var bStart	= range.GetBookmarkNode( bookmark, true ) ;
  			var bEnd	= range.GetBookmarkNode( bookmark, false ) ;
! 
  			var cursor ;
! 
! 			if ( bStart
  					&& bStart.parentNode.nodeName.IEquals( 'blockquote' )
  					&& !bStart.previousSibling )
***************
*** 61,65 ****
  			}
  
! 			if ( bEnd 
  					&& bEnd.parentNode.nodeName.IEquals( 'blockquote' )
  					&& !bEnd.previousSibling )
--- 61,65 ----
  			}
  
! 			if ( bEnd
  					&& bEnd.parentNode.nodeName.IEquals( 'blockquote' )
  					&& !bEnd.previousSibling )
***************
*** 127,131 ****
  				if ( block.nodeName.IEquals( 'blockquote' ) )
  				{
! 					var docFrag = block.ownerDocument.createDocumentFragment() ;
  					while ( block.firstChild )
  					{
--- 127,131 ----
  				if ( block.nodeName.IEquals( 'blockquote' ) )
  				{
! 					var docFrag = FCKTools.GetElementDocument( block ).createDocumentFragment() ;
  					while ( block.firstChild )
  					{
***************
*** 204,218 ****
  					if ( node.nodeName.IEquals( 'div' ) )
  					{
! 						var docFrag = node.ownerDocument.createDocumentFragment() ;
! 						var needBeginBr = firstTime && node.previousSibling && 
  							!FCKListsLib.BlockBoundaries[node.previousSibling.nodeName.toLowerCase()] ;
  						if ( firstTime && needBeginBr )
! 							docFrag.appendChild( node.ownerDocument.createElement( 'br' ) ) ;
! 						var needEndBr = node.nextSibling && 
  							!FCKListsLib.BlockBoundaries[node.nextSibling.nodeName.toLowerCase()] ;
  						while ( node.firstChild )
  							docFrag.appendChild( node.removeChild( node.firstChild ) ) ;
  						if ( needEndBr )
! 							docFrag.appendChild( node.ownerDocument.createElement( 'br' ) ) ;
  						node.parentNode.replaceChild( docFrag, node ) ;
  						firstTime = false ;
--- 204,218 ----
  					if ( node.nodeName.IEquals( 'div' ) )
  					{
! 						var docFrag = FCKTools.GetElementDocument( node ).createDocumentFragment() ;
! 						var needBeginBr = firstTime && node.previousSibling &&
  							!FCKListsLib.BlockBoundaries[node.previousSibling.nodeName.toLowerCase()] ;
  						if ( firstTime && needBeginBr )
! 							docFrag.appendChild( FCKTools.GetElementDocument( node ).createElement( 'br' ) ) ;
! 						var needEndBr = node.nextSibling &&
  							!FCKListsLib.BlockBoundaries[node.nextSibling.nodeName.toLowerCase()] ;
  						while ( node.firstChild )
  							docFrag.appendChild( node.removeChild( node.firstChild ) ) ;
  						if ( needEndBr )
! 							docFrag.appendChild( FCKTools.GetElementDocument( node ).createElement( 'br' ) ) ;
  						node.parentNode.replaceChild( docFrag, node ) ;
  						firstTime = false ;

Index: fckspellcheckcommand_gecko.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_gecko.js,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** fckspellcheckcommand_gecko.js	9 Feb 2008 12:53:57 -0000	1.4
--- fckspellcheckcommand_gecko.js	5 May 2008 00:35:23 -0000	1.5
***************
*** 1,5 ****
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
--- 1,5 ----
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
***************
*** 36,39 ****
  FCKSpellCheckCommand.prototype.GetState = function()
  {
  	return this.IsEnabled ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
! }
\ No newline at end of file
--- 36,41 ----
  FCKSpellCheckCommand.prototype.GetState = function()
  {
+ 	if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+ 		return FCK_TRISTATE_DISABLED ;
  	return this.IsEnabled ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
! }

Index: fckpasteplaintextcommand.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fckpasteplaintextcommand.js	9 Feb 2008 12:53:57 -0000	1.5
--- fckpasteplaintextcommand.js	5 May 2008 00:35:23 -0000	1.6
***************
*** 1,5 ****
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
--- 1,5 ----
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
***************
*** 35,38 ****
--- 35,40 ----
  FCKPastePlainTextCommand.prototype.GetState = function()
  {
+ 	if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+ 		return FCK_TRISTATE_DISABLED ;
  	return FCK.GetNamedCommandState( 'Paste' ) ;
  }

Index: fckshowblocks.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses/fckshowblocks.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckshowblocks.js	9 Feb 2008 12:53:57 -0000	1.1
--- fckshowblocks.js	5 May 2008 00:35:23 -0000	1.2
***************
*** 1,5 ****
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
--- 1,5 ----
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==

Index: fckremoveformatcommand.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses/fckremoveformatcommand.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckremoveformatcommand.js	9 Feb 2008 12:53:57 -0000	1.1
--- fckremoveformatcommand.js	5 May 2008 00:35:23 -0000	1.2
***************
*** 1,5 ****
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
--- 1,5 ----
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
***************
*** 43,45 ****
  		return FCK.EditorWindow ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
  	}
!  };
\ No newline at end of file
--- 43,45 ----
  		return FCK.EditorWindow ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
  	}
!  };

Index: fcklistcommands.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses/fcklistcommands.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fcklistcommands.js	9 Feb 2008 12:53:57 -0000	1.1
--- fcklistcommands.js	5 May 2008 00:35:23 -0000	1.2
***************
*** 1,5 ****
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
--- 1,5 ----
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
***************
*** 146,150 ****
  				{
  					rangeQueue = [] ;
! 					var selectionObject = FCK.EditorWindow.getSelection() ;
  					if ( selectionObject && listGroups.length == 0 )
  						rangeQueue.push( selectionObject.getRangeAt( 0 ) ) ;
--- 146,150 ----
  				{
  					rangeQueue = [] ;
! 					var selectionObject = FCKSelection.GetSelection() ;
  					if ( selectionObject && listGroups.length == 0 )
  						rangeQueue.push( selectionObject.getRangeAt( 0 ) ) ;
***************
*** 253,257 ****
  			FCKDomTools.SetElementMarker( markerObj, itemNode, '_FCK_ListItem_Processed', true ) ;
  		}
! 		var fakeParent = groupObj.root.ownerDocument.createElement( this.TagName ) ;
  		for ( var i = 0 ; i < selectedListItems.length ; i++ )
  		{
--- 253,257 ----
  			FCKDomTools.SetElementMarker( markerObj, itemNode, '_FCK_ListItem_Processed', true ) ;
  		}
! 		var fakeParent = FCKTools.GetElementDocument( groupObj.root ).createElement( this.TagName ) ;
  		for ( var i = 0 ; i < selectedListItems.length ; i++ )
  		{
***************
*** 271,275 ****
  	{
  		var contents = groupObj.contents ;
! 		var doc = groupObj.root.ownerDocument ;
  		var listContents = [] ;
  
--- 271,275 ----
  	{
  		var contents = groupObj.contents ;
! 		var doc = FCKTools.GetElementDocument( groupObj.root ) ;
  		var listContents = [] ;
  

Index: fck_othercommands.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses/fck_othercommands.js,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** fck_othercommands.js	9 Feb 2008 12:53:57 -0000	1.6
--- fck_othercommands.js	5 May 2008 00:35:23 -0000	1.7
***************
*** 1,5 ****
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
--- 1,5 ----
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
***************
*** 24,28 ****
  
  // ### General Dialog Box Commands.
! var FCKDialogCommand = function( name, title, url, width, height, getStateFunction, getStateParam )
  {
  	this.Name	= name ;
--- 24,28 ----
  
  // ### General Dialog Box Commands.
! var FCKDialogCommand = function( name, title, url, width, height, getStateFunction, getStateParam, customValue )
  {
  	this.Name	= name ;
***************
*** 31,34 ****
--- 31,35 ----
  	this.Width	= width ;
  	this.Height	= height ;
+ 	this.CustomValue = customValue ;
  
  	this.GetStateFunction	= getStateFunction ;
***************
*** 40,44 ****
  FCKDialogCommand.prototype.Execute = function()
  {
! 	FCKDialog.OpenDialog( 'FCKDialog_' + this.Name , this.Title, this.Url, this.Width, this.Height, null, null, this.Resizable ) ;
  }
  
--- 41,45 ----
  FCKDialogCommand.prototype.Execute = function()
  {
! 	FCKDialog.OpenDialog( 'FCKDialog_' + this.Name , this.Title, this.Url, this.Width, this.Height, this.CustomValue, null, this.Resizable ) ;
  }
  
***************
*** 48,52 ****
  		return this.GetStateFunction( this.GetStateParam ) ;
  	else
! 		return FCK_TRISTATE_OFF ;
  }
  
--- 49,53 ----
  		return this.GetStateFunction( this.GetStateParam ) ;
  	else
! 		return FCK.EditMode == FCK_EDITMODE_WYSIWYG ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
  }
  
***************
*** 72,81 ****
  {}
  
! FCKFormatBlockCommand.prototype = 
  {
  	Name : 'FormatBlock',
! 	
  	Execute : FCKStyleCommand.prototype.Execute,
! 	
  	GetState : function()
  	{
--- 73,82 ----
  {}
  
! FCKFormatBlockCommand.prototype =
  {
  	Name : 'FormatBlock',
! 
  	Execute : FCKStyleCommand.prototype.Execute,
! 
  	GetState : function()
  	{
***************
*** 89,93 ****
  {}
  
! FCKFontNameCommand.prototype = 
  {
  	Name		: 'FontName',
--- 90,94 ----
  {}
  
! FCKFontNameCommand.prototype =
  {
  	Name		: 'FontName',
***************
*** 100,104 ****
  {}
  
! FCKFontSizeCommand.prototype = 
  {
  	Name		: 'FontSize',
--- 101,105 ----
  {}
  
! FCKFontSizeCommand.prototype =
  {
  	Name		: 'FontSize',
***************
*** 210,213 ****
--- 211,216 ----
  FCKUndoCommand.prototype.GetState = function()
  {
+ 	if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+ 		return FCK_TRISTATE_DISABLED ;
  	return ( FCKUndo.CheckUndoState() ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ) ;
  }
***************
*** 226,229 ****
--- 229,234 ----
  FCKRedoCommand.prototype.GetState = function()
  {
+ 	if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+ 		return FCK_TRISTATE_DISABLED ;
  	return ( FCKUndo.CheckRedoState() ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ) ;
  }
***************
*** 253,260 ****
  	oRange.MoveToSelection() ;
  	var oSplitInfo = oRange.SplitBlock() ;
! 	if ( oSplitInfo.NextBlock )
! 		oSplitInfo.NextBlock.parentNode.insertBefore( oFakeImage, oSplitInfo.NextBlock ) ;
! 	else
! 		oSplitInfo.PreviousBlock.parentNode.insertBefore( oFakeImage, oSplitInfo.PreviousBlock.nextSibling ) ;
  
  	FCK.Events.FireEvent( 'OnSelectionChange' ) ;
--- 258,262 ----
  	oRange.MoveToSelection() ;
  	var oSplitInfo = oRange.SplitBlock() ;
! 	oRange.InsertNode( oFakeImage ) ;
  
  	FCK.Events.FireEvent( 'OnSelectionChange' ) ;
***************
*** 263,266 ****
--- 265,270 ----
  FCKPageBreakCommand.prototype.GetState = function()
  {
+ 	if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+ 		return FCK_TRISTATE_DISABLED ;
  	return 0 ; // FCK_TRISTATE_OFF
  }
***************
*** 286,290 ****
  		return ;
  	}
! 	
  	FCK.ExecuteNamedCommand( this.Name ) ;
  }
--- 290,294 ----
  		return ;
  	}
! 
  	FCK.ExecuteNamedCommand( this.Name ) ;
  }
***************
*** 292,295 ****
--- 296,301 ----
  FCKUnlinkCommand.prototype.GetState = function()
  {
+ 	if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+ 		return FCK_TRISTATE_DISABLED ;
  	var state = FCK.GetNamedCommandState( this.Name ) ;
  
***************
*** 337,340 ****
--- 343,348 ----
  FCKSelectAllCommand.prototype.GetState = function()
  {
+ 	if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+ 		return FCK_TRISTATE_DISABLED ;
  	return FCK_TRISTATE_OFF ;
  }
***************
*** 358,361 ****
--- 366,371 ----
  	GetState : function()
  	{
+ 		if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+ 			return FCK_TRISTATE_DISABLED ;
  		return FCK.GetNamedCommandState( 'Paste' ) ;
  	}
***************
*** 378,402 ****
  	GetState : function()
  	{
  		return FCK.GetNamedCommandState( 'InsertHorizontalRule' ) ;
  	}
  } ;
  
! // FCKCopyCommand
! var FCKCopyCommand = function()
  {
! 	this.Name = 'Copy' ;
  }
  
! FCKCopyCommand.prototype = 
  {
  	Execute : function()
  	{
! 		FCK.ExecuteNamedCommand( this.Name ) ;
  	},
  
  	GetState : function()
  	{
! 		// Strangely, the cut command happens to have the correct states for both Copy and Cut in all browsers.
! 		return FCK.GetNamedCommandState( 'Cut' ) ;
  	}
  };
--- 388,448 ----
  	GetState : function()
  	{
+ 		if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+ 			return FCK_TRISTATE_DISABLED ;
  		return FCK.GetNamedCommandState( 'InsertHorizontalRule' ) ;
  	}
  } ;
  
! // FCKCutCopyCommand
! var FCKCutCopyCommand = function( isCut )
  {
! 	this.Name = isCut ? 'Cut' : 'Copy' ;
  }
  
! FCKCutCopyCommand.prototype =
  {
  	Execute : function()
  	{
! 		var enabled = false ;
! 
! 		if ( FCKBrowserInfo.IsIE )
! 		{
! 			// The following seems to be the only reliable way to detect that
! 			// cut/copy is enabled in IE. It will fire the oncut/oncopy event
! 			// only if the security settings enabled the command to execute.
! 
! 			var onEvent = function()
! 			{
! 				enabled = true ;
! 			} ;
! 
! 			var eventName = 'on' + this.Name.toLowerCase() ;
! 
! 			FCK.EditorDocument.body.attachEvent( eventName, onEvent ) ;
! 			FCK.ExecuteNamedCommand( this.Name ) ;
! 			FCK.EditorDocument.body.detachEvent( eventName, onEvent ) ;
! 		}
! 		else
! 		{
! 			try
! 			{
! 				// Other browsers throw an error if the command is disabled.
! 				FCK.ExecuteNamedCommand( this.Name ) ;
! 				enabled = true ;
! 			}
! 			catch(e){}
! 		}
! 
! 		if ( !enabled )
! 			alert( FCKLang[ 'PasteError' + this.Name ] ) ;
  	},
  
  	GetState : function()
  	{
! 		// Strangely, the Cut command happens to have the correct states for
! 		// both Copy and Cut in all browsers.
! 		return FCK.EditMode != FCK_EDITMODE_WYSIWYG ?
! 				FCK_TRISTATE_DISABLED :
! 				FCK.GetNamedCommandState( 'Cut' ) ;
  	}
  };
***************
*** 407,411 ****
  }
  
! FCKAnchorDeleteCommand.prototype = 
  {
  	Execute : function()
--- 453,457 ----
  }
  
! FCKAnchorDeleteCommand.prototype =
  {
  	Execute : function()
***************
*** 466,469 ****
--- 512,517 ----
  	GetState : function()
  	{
+ 		if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+ 			return FCK_TRISTATE_DISABLED ;
  		return FCK.GetNamedCommandState( 'Unlink') ;
  	}

Index: fcktextcolorcommand.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fcktextcolorcommand.js	9 Feb 2008 12:53:57 -0000	1.5
--- fcktextcolorcommand.js	5 May 2008 00:35:23 -0000	1.6
***************
*** 1,5 ****
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
--- 1,5 ----
  /*
   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
!  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
   *
   * == BEGIN LICENSE ==
***************
*** 40,46 ****
  
  	this._Panel = new FCKPanel( oWindow ) ;
! 	this._Panel.AppendStyleSheet( FCKConfig.SkinPath + 'fck_editor.css' ) ;
  	this._Panel.MainNode.className = 'FCK_Panel' ;
  	this._CreatePanelBody( this._Panel.Document, this._Panel.MainNode ) ;
  
  	FCKTools.DisableSelection( this._Panel.Document.body ) ;
--- 40,47 ----
  
  	this._Panel = new FCKPanel( oWindow ) ;
! 	this._Panel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ;
  	this._Panel.MainNode.className = 'FCK_Panel' ;
  	this._CreatePanelBody( this._Panel.Document, this._Panel.MainNode ) ;
+ 	FCK.ToolbarSet.ToolbarItems.GetItem( this.Name ).RegisterPanel( this._Panel ) ;
  
  	FCKTools.DisableSelection( this._Panel.Document.body ) ;
***************
*** 76,79 ****
--- 77,82 ----
  FCKTextColorCommand.prototype.GetState = function()
  {
+ 	if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+ 		return FCK_TRISTATE_DISABLED ;
  	return FCK_TRISTATE_OFF ;
  }
***************
*** 107,111 ****
  	this.className = 'ColorDeselected' ;
  	command._Panel.Hide() ;
! 	FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, FCKTools.Hitch(command, 'SetColor') ) ;
  }
  
--- 110,115 ----
  	this.className = 'ColorDeselected' ;
  	command._Panel.Hide() ;
! 	FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320,
! 			FCKTools.Bind( command, command.SetColor ) ) ;
  }
  




More information about the geeklog-cvs mailing list