[geeklog-cvs] Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses fck_othercommands.js, 1.7, 1.8 fckfitwindow.js, 1.4, 1.5 fckshowblocks.js, 1.2, 1.3

Blaine Lang blaine at qs1489.pair.com
Sun Aug 10 12:46:28 EDT 2008


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

Modified Files:
fck_othercommands.js fckfitwindow.js fckshowblocks.js
Log Message:
Upgrade to FCKeditor ver 2.6.3

Index: fckshowblocks.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses/fckshowblocks.js,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** fckshowblocks.js 5 May 2008 00:35:23 -0000 1.2
--- fckshowblocks.js 10 Aug 2008 16:46:26 -0000 1.3
***************
*** 45,48 ****
--- 45,65 ----
body.className += ' FCK__ShowBlocks' ;

+ if ( FCKBrowserInfo.IsIE )
+ {
+ try
+ {
+ FCK.EditorDocument.selection.createRange().select() ;
+ }
+ catch ( e )
+ {}
+ }
+ else
+ {
+ var focus = FCK.EditorWindow.getSelection().focusNode ;
+ if ( focus.nodeType != 1 )
+ focus = focus.parentNode ;
+ FCKDomTools.ScrollIntoView( focus, false ) ;
+ }
+
FCK.Events.FireEvent( 'OnSelectionChange' ) ;
}

Index: fck_othercommands.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/commandclasses/fck_othercommands.js,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** fck_othercommands.js 5 May 2008 00:35:23 -0000 1.7
--- fck_othercommands.js 10 Aug 2008 16:46:26 -0000 1.8
***************
*** 312,315 ****
--- 312,374 ----
}

+ FCKVisitLinkCommand = function()
+ {
+ this.Name = 'VisitLink';
+ }
+ FCKVisitLinkCommand.prototype =
+ {
+ GetState : function()
+ {
+ if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+ return FCK_TRISTATE_DISABLED ;
+ var state = FCK.GetNamedCommandState( 'Unlink' ) ;
+
+ if ( state == FCK_TRISTATE_OFF )
+ {
+ var el = FCKSelection.MoveToAncestorNode( 'A' ) ;
+ if ( !el.href )
+ state = FCK_TRISTATE_DISABLED ;
+ }
+
+ return state ;
+ },
+
+ Execute : function()
+ {
+ var el = FCKSelection.MoveToAncestorNode( 'A' ) ;
+ var url = el.getAttribute( '_fcksavedurl' ) || el.getAttribute( 'href', 2 ) ;
+
+ // Check if it's a full URL.
+ // If not full URL, we'll need to apply the BaseHref setting.
+ if ( ! /:\/\//.test( url ) )
+ {
+ var baseHref = FCKConfig.BaseHref ;
+ var parentWindow = FCK.GetInstanceObject( 'parent' ) ;
+ if ( !baseHref )
+ {
+ baseHref = parentWindow.document.location.href ;
+ baseHref = baseHref.substring( 0, baseHref.lastIndexOf( '/' ) + 1 ) ;
+ }
+
+ if ( /^\//.test( url ) )
+ {
+ try
+ {
+ baseHref = baseHref.match( /^.*:\/\/+[^\/]+/ )[0] ;
+ }
+ catch ( e )
+ {
+ baseHref = parentWindow.document.location.protocol + '://' + parentWindow.parent.document.location.host ;
+ }
+ }
+
+ url = baseHref + url ;
+ }
+
+ if ( !window.open( url, '_blank' ) )
+ alert( FCKLang.VisitLinkBlocked ) ;
+ }
+ } ;
+
// FCKSelectAllCommand
var FCKSelectAllCommand = function()
***************
*** 517,518 ****
--- 576,634 ----
}
};
+
+ var FCKDeleteDivCommand = function()
+ {
+ }
+ FCKDeleteDivCommand.prototype =
+ {
+ GetState : function()
+ {
+ if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+ return FCK_TRISTATE_DISABLED ;
+
+ var node = FCKSelection.GetParentElement() ;
+ var path = new FCKElementPath( node ) ;
+ return path.BlockLimit && path.BlockLimit.nodeName.IEquals( 'div' ) ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
+ },
+
+ Execute : function()
+ {
+ // Create an undo snapshot before doing anything.
+ FCKUndo.SaveUndoStep() ;
+
+ // Find out the nodes to delete.
+ var nodes = FCKDomTools.GetSelectedDivContainers() ;
+
+ // Remember the current selection position.
+ var range = new FCKDomRange( FCK.EditorWindow ) ;
+ range.MoveToSelection() ;
+ var bookmark = range.CreateBookmark() ;
+
+ // Delete the container DIV node.
+ for ( var i = 0 ; i < nodes.length ; i++)
+ FCKDomTools.RemoveNode( nodes[i], true ) ;
+
+ // Restore selection.
+ range.MoveToBookmark( bookmark ) ;
+ range.Select() ;
+ }
+ } ;
+
+ // FCKRuleCommand
+ var FCKNbsp = function()
+ {
+ this.Name = 'Non Breaking Space' ;
+ }
+
+ FCKNbsp.prototype =
+ {
+ Execute : function()
+ {
+ FCK.InsertHtml( '&nbsp;' ) ;
+ },
+
+ GetState : function()
+ {
+ return ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ? FCK_TRISTATE_DISABLED : 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.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** fckfitwindow.js 5 May 2008 00:35:23 -0000 1.4
--- fckfitwindow.js 10 Aug 2008 16:46:26 -0000 1.5
***************
*** 38,41 ****
--- 38,46 ----
var eParent ;

+ // Save the current selection and scroll position.
+ var oRange = new FCKDomRange( FCK.EditorWindow ) ;
+ oRange.MoveToSelection() ;
+ var oEditorScrollPos = FCKTools.GetScrollPosition( FCK.EditorWindow ) ;
+
// No original style properties known? Go fullscreen.
if ( !this.IsMaximized )
***************
*** 84,87 ****
--- 89,93 ----

eEditorFrameStyle.position = "absolute";
+ eEditorFrame.offsetLeft ; // Kludge for Safari 3.1 browser bug, do not remove. See #2066.
eEditorFrameStyle.zIndex = FCKConfig.FloatingPanelsZIndex - 1;
eEditorFrameStyle.left = "0px";
***************
*** 160,163 ****
--- 166,173 ----

FCK.Focus() ;
+
+ // Restore the selection and scroll position of inside the document.
+ oRange.Select() ;
+ FCK.EditorWindow.scrollTo( oEditorScrollPos.X, oEditorScrollPos.Y ) ;
}





More information about the geeklog-cvs mailing list