Skip to content

Commit

Permalink
Merge branch 't/13300' into major
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed May 20, 2015
2 parents ca891bb + b3370ac commit 10a7105
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -11,6 +11,7 @@ Fixed Issues:
* [#13199](http://dev.ckeditor.com/ticket/13199): Fixed: Embedsemantic does not support widget classes.
* [#13003](http://dev.ckeditor.com/ticket/13003): Fixed: Anchors are uploaded when moving them by drag and drop.
* [#13032](http://dev.ckeditor.com/ticket/13032): Fixed: When upload is done notification update should be marked as important.
* [#13300](http://dev.ckeditor.com/ticket/13300): Fixed: The `internalCommit` argument in the image dialog seems to be never used.
* [#13036](http://dev.ckeditor.com/ticket/13036): Fixed: Notifications are 10px more to the right.
* Toolbar configurators:
* [#13185](http://dev.ckeditor.com/ticket/13185): Fixed: Wrong position of the suggestion box if there is not enough space below the caret.
Expand Down
24 changes: 12 additions & 12 deletions plugins/image/dialogs/image.js
Expand Up @@ -609,15 +609,15 @@
return isValid;
},
setup: setupDimension,
commit: function( type, element, internalCommit ) {
commit: function( type, element ) {
var value = this.getValue();
if ( type == IMAGE ) {
if ( value && editor.activeFilter.check( 'img{width,height}' ) )
element.setStyle( 'width', CKEDITOR.tools.cssLength( value ) );
else
element.removeStyle( 'width' );

!internalCommit && element.removeAttribute( 'width' );
element.removeAttribute( 'width' );
} else if ( type == PREVIEW ) {
var aMatch = value.match( regexGetSize );
if ( !aMatch ) {
Expand Down Expand Up @@ -650,15 +650,15 @@
return isValid;
},
setup: setupDimension,
commit: function( type, element, internalCommit ) {
commit: function( type, element ) {
var value = this.getValue();
if ( type == IMAGE ) {
if ( value && editor.activeFilter.check( 'img{width,height}' ) )
element.setStyle( 'height', CKEDITOR.tools.cssLength( value ) );
else
element.removeStyle( 'height' );

!internalCommit && element.removeAttribute( 'height' );
element.removeAttribute( 'height' );
} else if ( type == PREVIEW ) {
var aMatch = value.match( regexGetSize );
if ( !aMatch ) {
Expand Down Expand Up @@ -755,7 +755,7 @@
this.setValue( value );
}
},
commit: function( type, element, internalCommit ) {
commit: function( type, element ) {
var value = parseInt( this.getValue(), 10 );
if ( type == IMAGE || type == PREVIEW ) {
if ( !isNaN( value ) ) {
Expand All @@ -765,7 +765,7 @@
element.removeStyle( 'border' );
}

if ( !internalCommit && type == IMAGE )
if ( type == IMAGE )
element.removeAttribute( 'border' );
} else if ( type == CLEANUP ) {
element.removeAttribute( 'border' );
Expand Down Expand Up @@ -806,7 +806,7 @@
this.setValue( value );
}
},
commit: function( type, element, internalCommit ) {
commit: function( type, element ) {
var value = parseInt( this.getValue(), 10 );
if ( type == IMAGE || type == PREVIEW ) {
if ( !isNaN( value ) ) {
Expand All @@ -817,7 +817,7 @@
element.removeStyle( 'margin-right' );
}

if ( !internalCommit && type == IMAGE )
if ( type == IMAGE )
element.removeAttribute( 'hspace' );
} else if ( type == CLEANUP ) {
element.removeAttribute( 'hspace' );
Expand Down Expand Up @@ -856,7 +856,7 @@
this.setValue( value );
}
},
commit: function( type, element, internalCommit ) {
commit: function( type, element ) {
var value = parseInt( this.getValue(), 10 );
if ( type == IMAGE || type == PREVIEW ) {
if ( !isNaN( value ) ) {
Expand All @@ -867,7 +867,7 @@
element.removeStyle( 'margin-bottom' );
}

if ( !internalCommit && type == IMAGE )
if ( type == IMAGE )
element.removeAttribute( 'vspace' );
} else if ( type == CLEANUP ) {
element.removeAttribute( 'vspace' );
Expand Down Expand Up @@ -916,15 +916,15 @@
this.setValue( value );
}
},
commit: function( type, element, internalCommit ) {
commit: function( type, element ) {
var value = this.getValue();
if ( type == IMAGE || type == PREVIEW ) {
if ( value )
element.setStyle( 'float', value );
else
element.removeStyle( 'float' );

if ( !internalCommit && type == IMAGE ) {
if ( type == IMAGE ) {
value = ( element.getAttribute( 'align' ) || '' ).toLowerCase();
switch ( value ) {
// we should remove it only if it matches "left" or "right",
Expand Down

0 comments on commit 10a7105

Please sign in to comment.