[freeside-commits] freeside/httemplate/elements/fckeditor/editor/dialog/fck_flash fck_flash.js, 1.1, 1.2 fck_flash_preview.html, 1.1, 1.2
Mark Wells
mark at wavetail.420.am
Tue Mar 16 00:49:25 PDT 2010
Update of /home/cvs/cvsroot/freeside/httemplate/elements/fckeditor/editor/dialog/fck_flash
In directory wavetail.420.am:/tmp/cvs-serv19732/fckeditor/editor/dialog/fck_flash
Modified Files:
fck_flash.js fck_flash_preview.html
Log Message:
FCKeditor 2.6.6
Index: fck_flash_preview.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- fck_flash_preview.html 1 Aug 2007 22:25:17 -0000 1.1
+++ fck_flash_preview.html 16 Mar 2010 07:49:23 -0000 1.2
@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ * Copyright (C) 2003-2010 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
@@ -26,11 +26,15 @@
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
- <link href="../common/fck_dialog_common.css" rel="stylesheet" type="text/css" />
+ <script src="../common/fck_dialog_common.js" type="text/javascript"></script>
<script language="javascript">
+var FCKTools = window.parent.FCKTools ;
+var FCKConfig = window.parent.FCKConfig ;
+
// Sets the Skin CSS
-document.write( '<link href="' + window.parent.FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ;
+document.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ;
+document.write( FCKTools.GetStyleHtml( GetCommonDialogCss( '../' ) ) ) ;
if ( window.parent.FCKConfig.BaseHref.length > 0 )
document.write( '<base href="' + window.parent.FCKConfig.BaseHref + '">' ) ;
Index: fck_flash.js
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/fckeditor/editor/dialog/fck_flash/fck_flash.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- fck_flash.js 1 Aug 2007 22:25:17 -0000 1.1
+++ fck_flash.js 16 Mar 2010 07:49:23 -0000 1.2
@@ -1,6 +1,6 @@
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ * Copyright (C) 2003-2010 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
@@ -21,21 +21,23 @@
* Scripts related to the Flash dialog window (see fck_flash.html).
*/
-var oEditor = window.parent.InnerDialogLoaded() ;
+var dialog = window.parent ;
+var oEditor = dialog.InnerDialogLoaded() ;
var FCK = oEditor.FCK ;
var FCKLang = oEditor.FCKLang ;
var FCKConfig = oEditor.FCKConfig ;
+var FCKTools = oEditor.FCKTools ;
//#### Dialog Tabs
// Set the dialog tabs.
-window.parent.AddTab( 'Info', oEditor.FCKLang.DlgInfoTab ) ;
+dialog.AddTab( 'Info', oEditor.FCKLang.DlgInfoTab ) ;
if ( FCKConfig.FlashUpload )
- window.parent.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ;
+ dialog.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ;
if ( !FCKConfig.FlashDlgHideAdvanced )
- window.parent.AddTab( 'Advanced', oEditor.FCKLang.DlgAdvancedTag ) ;
+ dialog.AddTab( 'Advanced', oEditor.FCKLang.DlgAdvancedTag ) ;
// Function called when a dialog tag is selected.
function OnDialogTabChange( tabCode )
@@ -46,7 +48,7 @@
}
// Get the selected flash embed (if available).
-var oFakeImage = FCK.Selection.GetSelectedElement() ;
+var oFakeImage = dialog.Selection.GetSelectedElement() ;
var oEmbed ;
if ( oFakeImage )
@@ -72,10 +74,12 @@
if ( FCKConfig.FlashUpload )
GetE('frmUpload').action = FCKConfig.FlashUploadURL ;
- window.parent.SetAutoSize( true ) ;
+ dialog.SetAutoSize( true ) ;
// Activate the "OK" button.
- window.parent.SetOkButton( true ) ;
+ dialog.SetOkButton( true ) ;
+
+ SelectField( 'txtUrl' ) ;
}
function LoadSelection()
@@ -114,7 +118,7 @@
{
if ( GetE('txtUrl').value.length == 0 )
{
- window.parent.SetSelectedTab( 'Info' ) ;
+ dialog.SetSelectedTab( 'Info' ) ;
GetE('txtUrl').focus() ;
alert( oEditor.FCKLang.DlgAlertUrl ) ;
@@ -122,6 +126,7 @@
return false ;
}
+ oEditor.FCKUndo.SaveUndoStep() ;
if ( !oEmbed )
{
oEmbed = FCK.EditorDocument.createElement( 'EMBED' ) ;
@@ -133,12 +138,10 @@
{
oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__Flash', oEmbed ) ;
oFakeImage.setAttribute( '_fckflash', 'true', 0 ) ;
- oFakeImage = FCK.InsertElementAndGetIt( oFakeImage ) ;
+ oFakeImage = FCK.InsertElement( oFakeImage ) ;
}
- else
- oEditor.FCKUndo.SaveUndoStep() ;
- oEditor.FCKFlashProcessor.RefreshView( oFakeImage, oEmbed ) ;
+ oEditor.FCKEmbedAndObjectProcessor.RefreshView( oFakeImage, oEmbed ) ;
return true ;
}
@@ -228,11 +231,15 @@
UpdatePreview() ;
- window.parent.SetSelectedTab( 'Info' ) ;
+ dialog.SetSelectedTab( 'Info' ) ;
}
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
{
+ // Remove animation
+ window.parent.Throbber.Hide() ;
+ GetE( 'divUpload' ).style.display = '' ;
+
switch ( errorNumber )
{
case 0 : // No errors
@@ -253,6 +260,9 @@
case 203 :
alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ;
return ;
+ case 500 :
+ alert( 'The connector is disabled' ) ;
+ break ;
default :
alert( 'Error on file upload. Error number: ' + errorNumber ) ;
return ;
@@ -282,5 +292,9 @@
return false ;
}
+ // Show animation
+ window.parent.Throbber.Show( 100 ) ;
+ GetE( 'divUpload' ).style.display = 'none' ;
+
return true ;
}
\ No newline at end of file
More information about the freeside-commits
mailing list