X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=_source%2Fplugins%2Fimage%2Fdialogs%2Fimage.js;h=496827bc190d4646e14620450d789e60c6d47be5;hb=fb481ba0a7d298e3e7b9034fcb9f2afdc6e8e796;hp=e793a898ecc68c5b2e6c2ee07184c1541aeb5fe4;hpb=f0610347140239143439a511ee2bd48cb784f470;p=ckeditor.git
diff --git a/_source/plugins/image/dialogs/image.js b/_source/plugins/image/dialogs/image.js
index e793a89..496827b 100644
--- a/_source/plugins/image/dialogs/image.js
+++ b/_source/plugins/image/dialogs/image.js
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
@@ -266,7 +266,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
btnLockSizesId = numbering( 'btnLockSizes' ),
btnResetSizeId = numbering( 'btnResetSize' ),
imagePreviewLoaderId = numbering( 'ImagePreviewLoader' ),
- imagePreviewBoxId = numbering( 'ImagePreviewBox' ),
previewLinkId = numbering( 'previewLink' ),
previewImageId = numbering( 'previewImage' );
@@ -290,8 +289,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
this.addLink = false;
var editor = this.getParentEditor(),
- sel = this.getParentEditor().getSelection(),
- element = sel.getSelectedElement(),
+ sel = editor.getSelection(),
+ element = sel && sel.getSelectedElement(),
link = element && element.getAscendant( 'a' );
//Hide loader.
@@ -847,11 +846,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
element.setStyle( 'border-style', 'solid' );
}
else if ( !value && this.isChanged() )
- {
- element.removeStyle( 'border-width' );
- element.removeStyle( 'border-style' );
- element.removeStyle( 'border-color' );
- }
+ element.removeStyle( 'border' );
if ( !internalCommit && type == IMAGE )
element.removeAttribute( 'border' );
@@ -1077,7 +1072,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
style : 'width:95%;',
html : '
' + CKEDITOR.tools.htmlEncode( editor.lang.common.preview ) +'
'+
'
'+
- '
'+
+ ''+
''+
'' +
( editor.config.image_previewText ||
@@ -1349,6 +1344,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
type : 'text',
id : 'txtdlgGenStyle',
label : editor.lang.common.cssStyle,
+ validate : CKEDITOR.dialog.validate.inlineStyle( editor.lang.common.invalidInlineStyle ),
'default' : '',
setup : function( type, element )
{
|
|