[geeklog-cvs] Geeklog-1.x/public_html/fckeditor/editor/dialog/common fck_dialog_common.css, 1.7, 1.8 fck_dialog_common.js, 1.5, 1.6
Blaine Lang
blaine at qs1489.pair.com
Sun May 4 20:35:27 EDT 2008
- Previous message (by thread): [geeklog-cvs] Geeklog-1.x/public_html/fckeditor/editor/_source fckconstants.js, 1.3, 1.4 fckeditorapi.js, 1.4, 1.5 fckjscoreextensions.js, 1.3, 1.4 fckscriptloader.js, 1.1, 1.2
- Next message (by thread): [geeklog-cvs] Geeklog-1.x/public_html/fckeditor/editor/_source/classes fckhtmliterator.js, NONE, 1.1 fckcontextmenu.js, 1.3, 1.4 fckdataprocessor.js, 1.1, 1.2 fckdocumentfragment_gecko.js, 1.1, 1.2 fckdocumentfragment_ie.js, 1.1, 1.2 fckdomrange.js, 1.1, 1.2 fckdomrange_gecko.js, 1.1, 1.2 fckdomrange_ie.js, 1.1, 1.2 fckdomrangeiterator.js, 1.1, 1.2 fckeditingarea.js, 1.4, 1.5 fckelementpath.js, 1.1, 1.2 fckenterkey.js, 1.1, 1.2 fckevents.js, 1.5, 1.6 fckicon.js, 1.3, 1.4 fckiecleanup.js, 1.3, 1.4 fckimagepreloader.js, 1.1, 1.2 fckkeystrokehandler.js, 1.1, 1.2 fckmenublock.js, 1.4, 1.5 fckmenublockpanel.js, 1.3, 1.4 fckmenuitem.js, 1.4, 1.5 fckpanel.js, 1.4, 1.5 fckplugin.js, 1.5, 1.6 fckspecialcombo.js, 1.6, 1.7 fckstyle.js, 1.1, 1.2 fcktoolbar.js, 1.6, 1.7 fcktoolbarbreak_gecko.js, 1.5, 1.6 fcktoolbarbreak_ie.js, 1.6, 1.7 fcktoolbarbutton.js, 1.5, 1.6 fcktoolbarbuttonui.js, 1.4, 1.5 fcktoolbarfontformatcombo.js, 1.5, 1.6 fcktoolbarfontscombo.js, 1.5, 1.6 fcktoolbarfontsizecombo.js, 1.5, 1.6 fcktoolbarpanelbutton.js, 1.5, 1.6 fcktoolbarspecialco mbo.js, 1.5, 1.6 fcktoolbarstylecombo.js, 1.5, 1.6 fckw3crange.js, 1.1, 1.2 fckxml.js, 1.1, 1.2 fckxml_gecko.js, 1.5, 1.6 fckxml_ie.js, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/dialog/common
In directory qs1489.pair.com:/tmp/cvs-serv85146/editor/dialog/common
Modified Files:
fck_dialog_common.css fck_dialog_common.js
Log Message:
Upgraded the FCKeditor to version 2.6 Final - latest release April 7/08
Index: fck_dialog_common.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/dialog/common/fck_dialog_common.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fck_dialog_common.js 9 Feb 2008 12:53:57 -0000 1.5
--- fck_dialog_common.js 5 May 2008 00:35:24 -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 ==
***************
*** 20,25 ****
--- 20,65 ----
*
* Useful functions used by almost all dialog window pages.
+ * Dialogs should link to this file as the very first script on the page.
*/
+ // Automatically detect the correct document.domain (#123).
+ (function()
+ {
+ var d = document.domain ;
+
+ while ( true )
+ {
+ // Test if we can access a parent property.
+ try
+ {
+ var test = window.parent.document.domain ;
+ break ;
+ }
+ catch( e ) {}
+
+ // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
+ d = d.replace( /.*?(?:\.|$)/, '' ) ;
+
+ if ( d.length == 0 )
+ break ; // It was not able to detect the domain.
+
+ try
+ {
+ document.domain = d ;
+ }
+ catch (e)
+ {
+ break ;
+ }
+ }
+ })() ;
+
+ // Attention: FCKConfig must be available in the page.
+ function GetCommonDialogCss( prefix )
+ {
+ // CSS minified by http://iceyboard.no-ip.org/projects/css_compressor
+ return FCKConfig.BasePath + 'dialog/common/' + '|.ImagePreviewArea{border:#000 1px solid;overflow:auto;width:100%;height:170px;background-color:#fff}.FlashPreviewArea{border:#000 1px solid;padding:5px;overflow:auto;width:100%;height:170px;background-color:#fff}.BtnReset{float:left;background-position:center center;background-image:url(images/reset.gif);width:16px;height:16px;background-repeat:no-repeat;border:1px none;font-size:1px}.BtnLocked,.BtnUnlocked{float:left;background-position:center center;background-image:url(images/locked.gif);width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.BtnUnlocked{background-image:url(images/unlocked.gif)}.BtnOver{border:outset 1px;cursor:pointer;cursor:hand}' ;
+ }
+
// Gets a element by its Id. Used for shorter coding.
function GetE( elementId )
***************
*** 58,89 ****
}
! var KeyIdentifierMap =
{
! End : 35,
! Home : 36,
! Left : 37,
! Right : 39,
! 'U+00007F' : 46 // Delete
! }
// Functions used by text fields to accept numbers only.
! function IsDigit( e )
! {
! if ( !e )
! e = event ;
! var iCode = ( e.keyCode || e.charCode ) ;
!
! if ( !iCode && e.keyIdentifier && ( e.keyIdentifier in KeyIdentifierMap ) )
! iCode = KeyIdentifierMap[ e.keyIdentifier ] ;
! return (
! ( iCode >= 48 && iCode <= 57 ) // Numbers
! || (iCode >= 35 && iCode <= 40) // Arrows, Home, End
! || iCode == 8 // Backspace
! || iCode == 46 // Delete
! || iCode == 9 // Tab
! ) ;
! }
String.prototype.Trim = function()
--- 98,142 ----
}
! function SelectField( elementId )
{
! var element = GetE( elementId ) ;
! element.focus() ;
!
! // element.select may not be available for some fields (like <select>).
! if ( element.select )
! element.select() ;
! }
// Functions used by text fields to accept numbers only.
! var IsDigit = ( function()
! {
! var KeyIdentifierMap =
! {
! End : 35,
! Home : 36,
! Left : 37,
! Right : 39,
! 'U+00007F' : 46 // Delete
! } ;
! return function ( e )
! {
! if ( !e )
! e = event ;
! var iCode = ( e.keyCode || e.charCode ) ;
!
! if ( !iCode && e.keyIdentifier && ( e.keyIdentifier in KeyIdentifierMap ) )
! iCode = KeyIdentifierMap[ e.keyIdentifier ] ;
!
! return (
! ( iCode >= 48 && iCode <= 57 ) // Numbers
! || (iCode >= 35 && iCode <= 40) // Arrows, Home, End
! || iCode == 8 // Backspace
! || iCode == 46 // Delete
! || iCode == 9 // Tab
! ) ;
! }
! } )() ;
String.prototype.Trim = function()
***************
*** 163,165 ****
--- 216,338 ----
else
window.open( url, 'FCKBrowseWindow', sOptions ) ;
+ }
+
+ /**
+ Utility function to create/update an element with a name attribute in IE, so it behaves properly when moved around
+ It also allows to change the name or other special attributes in an existing node
+ oEditor : instance of FCKeditor where the element will be created
+ oOriginal : current element being edited or null if it has to be created
+ nodeName : string with the name of the element to create
+ oAttributes : Hash object with the attributes that must be set at creation time in IE
+ Those attributes will be set also after the element has been
+ created for any other browser to avoid redudant code
+ */
+ function CreateNamedElement( oEditor, oOriginal, nodeName, oAttributes )
+ {
+ var oNewNode ;
+
+ // IE doesn't allow easily to change properties of an existing object,
+ // so remove the old and force the creation of a new one.
+ var oldNode = null ;
+ if ( oOriginal && oEditor.FCKBrowserInfo.IsIE )
+ {
+ // Force the creation only if some of the special attributes have changed:
+ var bChanged = false;
+ for( var attName in oAttributes )
+ bChanged |= ( oOriginal.getAttribute( attName, 2) != oAttributes[attName] ) ;
+
+ if ( bChanged )
+ {
+ oldNode = oOriginal ;
+ oOriginal = null ;
+ }
+ }
+
+ // If the node existed (and it's not IE), then we just have to update its attributes
+ if ( oOriginal )
+ {
+ oNewNode = oOriginal ;
+ }
+ else
+ {
+ // #676, IE doesn't play nice with the name or type attribute
+ if ( oEditor.FCKBrowserInfo.IsIE )
+ {
+ var sbHTML = [] ;
+ sbHTML.push( '<' + nodeName ) ;
+ for( var prop in oAttributes )
+ {
+ sbHTML.push( ' ' + prop + '="' + oAttributes[prop] + '"' ) ;
+ }
+ sbHTML.push( '>' ) ;
+ if ( !oEditor.FCKListsLib.EmptyElements[nodeName.toLowerCase()] )
+ sbHTML.push( '</' + nodeName + '>' ) ;
+
+ oNewNode = oEditor.FCK.EditorDocument.createElement( sbHTML.join('') ) ;
+ // Check if we are just changing the properties of an existing node: copy its properties
+ if ( oldNode )
+ {
+ CopyAttributes( oldNode, oNewNode, oAttributes ) ;
+ oEditor.FCKDomTools.MoveChildren( oldNode, oNewNode ) ;
+ oldNode.parentNode.removeChild( oldNode ) ;
+ oldNode = null ;
+
+ if ( oEditor.FCK.Selection.SelectionData )
+ {
+ // Trick to refresh the selection object and avoid error in
+ // fckdialog.html Selection.EnsureSelection
+ var oSel = oEditor.FCK.EditorDocument.selection ;
+ oEditor.FCK.Selection.SelectionData = oSel.createRange() ; // Now oSel.type will be 'None' reflecting the real situation
+ }
+ }
+ oNewNode = oEditor.FCK.InsertElement( oNewNode ) ;
+
+ // FCK.Selection.SelectionData is broken by now since we've
+ // deleted the previously selected element. So we need to reassign it.
+ if ( oEditor.FCK.Selection.SelectionData )
+ {
+ var range = oEditor.FCK.EditorDocument.body.createControlRange() ;
+ range.add( oNewNode ) ;
+ oEditor.FCK.Selection.SelectionData = range ;
+ }
+ }
+ else
+ {
+ oNewNode = oEditor.FCK.InsertElement( nodeName ) ;
+ }
+ }
+
+ // Set the basic attributes
+ for( var attName in oAttributes )
+ oNewNode.setAttribute( attName, oAttributes[attName], 0 ) ; // 0 : Case Insensitive
+
+ return oNewNode ;
+ }
+
+ // Copy all the attributes from one node to the other, kinda like a clone
+ // But oSkipAttributes is an object with the attributes that must NOT be copied
+ function CopyAttributes( oSource, oDest, oSkipAttributes )
+ {
+ var aAttributes = oSource.attributes ;
+
+ for ( var n = 0 ; n < aAttributes.length ; n++ )
+ {
+ var oAttribute = aAttributes[n] ;
+
+ if ( oAttribute.specified )
+ {
+ var sAttName = oAttribute.nodeName ;
+ // We can set the type only once, so do it with the proper value, not copying it.
+ if ( sAttName in oSkipAttributes )
+ continue ;
+
+ var sAttValue = oSource.getAttribute( sAttName, 2 ) ;
+ if ( sAttValue == null )
+ sAttValue = oAttribute.nodeValue ;
+
+ oDest.setAttribute( sAttName, sAttValue, 0 ) ; // 0 : Case Insensitive
+ }
+ }
+ // The style:
+ oDest.style.cssText = oSource.style.cssText ;
}
Index: fck_dialog_common.css
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/dialog/common/fck_dialog_common.css,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** fck_dialog_common.css 9 Feb 2008 12:53:57 -0000 1.7
--- fck_dialog_common.css 5 May 2008 00:35:24 -0000 1.8
***************
*** 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 ==
***************
*** 21,24 ****
--- 21,31 ----
* This is the CSS file used for interface details in some dialog
* windows.
+ */
+
+ /* #########
+ * WARNING
+ * #########
+ * When changing this file, the minified version of it must be updated in the
+ * fck_dialog_common.js file (see GetCommonDialogCss).
*/
- Previous message (by thread): [geeklog-cvs] Geeklog-1.x/public_html/fckeditor/editor/_source fckconstants.js, 1.3, 1.4 fckeditorapi.js, 1.4, 1.5 fckjscoreextensions.js, 1.3, 1.4 fckscriptloader.js, 1.1, 1.2
- Next message (by thread): [geeklog-cvs] Geeklog-1.x/public_html/fckeditor/editor/_source/classes fckhtmliterator.js, NONE, 1.1 fckcontextmenu.js, 1.3, 1.4 fckdataprocessor.js, 1.1, 1.2 fckdocumentfragment_gecko.js, 1.1, 1.2 fckdocumentfragment_ie.js, 1.1, 1.2 fckdomrange.js, 1.1, 1.2 fckdomrange_gecko.js, 1.1, 1.2 fckdomrange_ie.js, 1.1, 1.2 fckdomrangeiterator.js, 1.1, 1.2 fckeditingarea.js, 1.4, 1.5 fckelementpath.js, 1.1, 1.2 fckenterkey.js, 1.1, 1.2 fckevents.js, 1.5, 1.6 fckicon.js, 1.3, 1.4 fckiecleanup.js, 1.3, 1.4 fckimagepreloader.js, 1.1, 1.2 fckkeystrokehandler.js, 1.1, 1.2 fckmenublock.js, 1.4, 1.5 fckmenublockpanel.js, 1.3, 1.4 fckmenuitem.js, 1.4, 1.5 fckpanel.js, 1.4, 1.5 fckplugin.js, 1.5, 1.6 fckspecialcombo.js, 1.6, 1.7 fckstyle.js, 1.1, 1.2 fcktoolbar.js, 1.6, 1.7 fcktoolbarbreak_gecko.js, 1.5, 1.6 fcktoolbarbreak_ie.js, 1.6, 1.7 fcktoolbarbutton.js, 1.5, 1.6 fcktoolbarbuttonui.js, 1.4, 1.5 fcktoolbarfontformatcombo.js, 1.5, 1.6 fcktoolbarfontscombo.js, 1.5, 1.6 fcktoolbarfontsizecombo.js, 1.5, 1.6 fcktoolbarpanelbutton.js, 1.5, 1.6 fcktoolbarspecialco mbo.js, 1.5, 1.6 fcktoolbarstylecombo.js, 1.5, 1.6 fckw3crange.js, 1.1, 1.2 fckxml.js, 1.1, 1.2 fckxml_gecko.js, 1.5, 1.6 fckxml_ie.js, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the geeklog-cvs
mailing list