X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fflash%2Fdialogs%2Fflash.js;h=fb5ffd85e2b3e0e374f8d1c04e718290eb2b2156;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hp=5634229a65a173e33a2a6306e1fbc3886fe9162a;hpb=059b4c2fef02528bf1af189f7996e80652faddfb;p=ckeditor.git
diff --git a/_source/plugins/flash/dialogs/flash.js b/_source/plugins/flash/dialogs/flash.js
index 5634229..fb5ffd8 100644
--- a/_source/plugins/flash/dialogs/flash.js
+++ b/_source/plugins/flash/dialogs/flash.js
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
@@ -175,8 +175,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
var previewPreloader,
previewAreaHtml = '
' + CKEDITOR.tools.htmlEncode( editor.lang.common.preview ) +'
' +
- '
' +
- '
';
+ '' +
+ '';
return {
title : editor.lang.flash.title,
@@ -186,11 +186,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
{
// Clear previously saved elements.
this.fakeImage = this.objectNode = this.embedNode = null;
- previewPreloader = new CKEDITOR.dom.element( 'embeded', editor.document );
+ previewPreloader = new CKEDITOR.dom.element( 'embed', editor.document );
// Try to detect any embed or object tag that has Flash parameters.
var fakeImage = this.getSelectedElement();
- if ( fakeImage && fakeImage.getAttribute( '_cke_real_element_type' ) && fakeImage.getAttribute( '_cke_real_element_type' ) == 'flash' )
+ if ( fakeImage && fakeImage.data( 'cke-real-element-type' ) && fakeImage.data( 'cke-real-element-type' ) == 'flash' )
{
this.fakeImage = fakeImage;
@@ -265,12 +265,15 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
paramMap[ paramList.getItem( i ).getAttribute( 'name' ) ] = paramList.getItem( i );
}
- // Apply or remove flash parameters.
- var extraStyles = {};
- this.commitContent( objectNode, embedNode, paramMap, extraStyles );
+ // A subset of the specified attributes/styles
+ // should also be applied on the fake element to
+ // have better visual effect. (#5240)
+ var extraStyles = {}, extraAttributes = {};
+ this.commitContent( objectNode, embedNode, paramMap, extraStyles, extraAttributes );
// Refresh the fake image.
var newFakeImage = editor.createFakeElement( objectNode || embedNode, 'cke_flash', 'flash', true );
+ newFakeImage.setAttributes( extraAttributes );
newFakeImage.setStyles( extraStyles );
if ( this.fakeImage )
{
@@ -362,8 +365,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
type : 'text',
id : 'width',
style : 'width:95px',
- label : editor.lang.flash.width,
- validate : CKEDITOR.dialog.validate.integer( editor.lang.flash.validateWidth ),
+ label : editor.lang.common.width,
+ validate : CKEDITOR.dialog.validate.integer( editor.lang.common.invalidWidth ),
setup : function( objectNode, embedNode, paramMap, fakeImage )
{
loadValue.apply( this, arguments );
@@ -385,8 +388,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
type : 'text',
id : 'height',
style : 'width:95px',
- label : editor.lang.flash.height,
- validate : CKEDITOR.dialog.validate.integer( editor.lang.flash.validateHeight ),
+ label : editor.lang.common.height,
+ validate : CKEDITOR.dialog.validate.integer( editor.lang.common.invalidHeight ),
setup : function( objectNode, embedNode, paramMap, fakeImage )
{
loadValue.apply( this, arguments );
@@ -555,24 +558,29 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
{
id : 'align',
type : 'select',
- label : editor.lang.flash.align,
+ label : editor.lang.common.align,
'default' : '',
style : 'width : 100%;',
items :
[
[ editor.lang.common.notSet , ''],
- [ editor.lang.flash.alignLeft , 'left'],
+ [ editor.lang.common.alignLeft , 'left'],
[ editor.lang.flash.alignAbsBottom , 'absBottom'],
[ editor.lang.flash.alignAbsMiddle , 'absMiddle'],
[ editor.lang.flash.alignBaseline , 'baseline'],
- [ editor.lang.flash.alignBottom , 'bottom'],
- [ editor.lang.flash.alignMiddle , 'middle'],
- [ editor.lang.flash.alignRight , 'right'],
+ [ editor.lang.common.alignBottom , 'bottom'],
+ [ editor.lang.common.alignMiddle , 'middle'],
+ [ editor.lang.common.alignRight , 'right'],
[ editor.lang.flash.alignTextTop , 'textTop'],
- [ editor.lang.flash.alignTop , 'top']
+ [ editor.lang.common.alignTop , 'top']
],
setup : loadValue,
- commit : commitValue
+ commit : function( objectNode, embedNode, paramMap, extraStyles, extraAttributes )
+ {
+ var value = this.getValue();
+ commitValue.apply( this, arguments );
+ value && ( extraAttributes.align = value );
+ }
},
{
type : 'html',