Vlad Kurkin (b_vladi) wrote in changelog,
Vlad Kurkin
b_vladi
changelog

[livejournal] r20131: LJSV-1801: Restore automatic border=0 wh...

Committer: vkurkin
LJSV-1801: Restore automatic border=0 when inserting image via the Rich Text editor
U   trunk/htdocs/js/ck/plugins/image/dialogs/image.js
Modified: trunk/htdocs/js/ck/plugins/image/dialogs/image.js
===================================================================
--- trunk/htdocs/js/ck/plugins/image/dialogs/image.js	2011-09-26 10:49:11 UTC (rev 20130)
+++ trunk/htdocs/js/ck/plugins/image/dialogs/image.js	2011-09-27 04:05:09 UTC (rev 20131)
@@ -841,17 +841,8 @@
 														var value = parseInt( this.getValue(), 10 );
 														if ( type == IMAGE || type == PREVIEW )
 														{
-															if ( !isNaN( value ) )
-															{
-																element.setStyle( 'border-width', CKEDITOR.tools.cssLength( value ) );
-																element.setStyle( 'border-style', 'solid' );
-															}
-															else if ( !value && this.isChanged() )
-															{
-																element.removeStyle( 'border-width' );
-																element.removeStyle( 'border-style' );
-																element.removeStyle( 'border-color' );
-															}
+															element.setStyle('border-width', !isNaN(value) && this.isChanged() ? CKEDITOR.tools.cssLength(value) : 0);
+															element.setStyle('border-style', 'solid');
 
 															if ( !internalCommit && type == IMAGE )
 																element.removeAttribute( 'border' );

Tags: b_vladi, js, livejournal
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments