Ticket #7457: 7457.patch
File 7457.patch, 2.5 KB (added by , 13 years ago) |
---|
-
_source/plugins/image/dialogs/image.js
421 421 //Insert a new Link. 422 422 if ( !this.linkEditMode ) 423 423 { 424 editor.insertElement( this.linkElement);425 this.linkElement.append( this.imageElement, false);424 editor.insertElement( this.linkElement ); 425 this.linkElement.append( this.imageElement, false ); 426 426 } 427 427 else //Link already exists, image not. 428 editor.insertElement( this.imageElement );428 editor.insertElement( this.imageElement ); 429 429 } 430 430 else 431 431 editor.insertElement( this.imageElement ); … … 649 649 var value = this.getValue(); 650 650 if ( type == IMAGE ) 651 651 { 652 if ( value )652 if ( value !== '' ) 653 653 element.setStyle( 'width', CKEDITOR.tools.cssLength( value ) ); 654 else if ( !value && this.isChanged() )654 else 655 655 element.removeStyle( 'width' ); 656 656 657 657 !internalCommit && element.removeAttribute( 'width' ); … … 699 699 var value = this.getValue(); 700 700 if ( type == IMAGE ) 701 701 { 702 if ( value )702 if ( value !== '' ) 703 703 element.setStyle( 'height', CKEDITOR.tools.cssLength( value ) ); 704 else if ( !value && this.isChanged( ) )704 else 705 705 element.removeStyle( 'height' ); 706 706 707 if ( !internalCommit && type == IMAGE ) 708 element.removeAttribute( 'height' ); 707 !internalCommit && element.removeAttribute( 'height' ); 709 708 } 710 709 else if ( type == PREVIEW ) 711 710 { … … 738 737 ratioButton = CKEDITOR.document.getById( btnLockSizesId ); 739 738 if ( resetButton ) 740 739 { 741 resetButton.on( 'click', function( evt)740 resetButton.on( 'click', function( evt ) 742 741 { 743 742 resetSize( this ); 744 evt.data .preventDefault();743 evt.data && evt.data.preventDefault(); 745 744 }, this.getDialog() ); 746 745 resetButton.on( 'mouseover', function() 747 746 {