Ticket #7457: 7457.patch

File 7457.patch, 2.5 KB (added by Sa'ar Zac Elias, 13 years ago)
  • _source/plugins/image/dialogs/image.js

     
    421421                                                //Insert a new Link.
    422422                                                if ( !this.linkEditMode )
    423423                                                {
    424                                                         editor.insertElement(this.linkElement);
    425                                                         this.linkElement.append(this.imageElement, false);
     424                                                        editor.insertElement( this.linkElement );
     425                                                        this.linkElement.append( this.imageElement, false );
    426426                                                }
    427427                                                else     //Link already exists, image not.
    428                                                         editor.insertElement(this.imageElement );
     428                                                        editor.insertElement( this.imageElement );
    429429                                        }
    430430                                        else
    431431                                                editor.insertElement( this.imageElement );
     
    649649                                                                                                                                var value = this.getValue();
    650650                                                                                                                                if ( type == IMAGE )
    651651                                                                                                                                {
    652                                                                                                                                         if ( value )
     652                                                                                                                                        if ( value !== '' )
    653653                                                                                                                                                element.setStyle( 'width', CKEDITOR.tools.cssLength( value ) );
    654                                                                                                                                         else if ( !value && this.isChanged() )
     654                                                                                                                                        else
    655655                                                                                                                                                element.removeStyle( 'width' );
    656656
    657657                                                                                                                                        !internalCommit && element.removeAttribute( 'width' );
     
    699699                                                                                                                                var value = this.getValue();
    700700                                                                                                                                if ( type == IMAGE )
    701701                                                                                                                                {
    702                                                                                                                                         if ( value )
     702                                                                                                                                        if ( value !== '' )
    703703                                                                                                                                                element.setStyle( 'height', CKEDITOR.tools.cssLength( value ) );
    704                                                                                                                                         else if ( !value && this.isChanged( ) )
     704                                                                                                                                        else
    705705                                                                                                                                                element.removeStyle( 'height' );
    706706
    707                                                                                                                                         if ( !internalCommit && type == IMAGE )
    708                                                                                                                                                 element.removeAttribute( 'height' );
     707                                                                                                                                        !internalCommit && element.removeAttribute( 'height' );
    709708                                                                                                                                }
    710709                                                                                                                                else if ( type == PREVIEW )
    711710                                                                                                                                {
     
    738737                                                                                                                        ratioButton = CKEDITOR.document.getById( btnLockSizesId );
    739738                                                                                                                if ( resetButton )
    740739                                                                                                                {
    741                                                                                                                         resetButton.on( 'click', function(evt)
     740                                                                                                                        resetButton.on( 'click', function( evt )
    742741                                                                                                                                {
    743742                                                                                                                                        resetSize( this );
    744                                                                                                                                         evt.data.preventDefault();
     743                                                                                                                                        evt.data && evt.data.preventDefault();
    745744                                                                                                                                }, this.getDialog() );
    746745                                                                                                                        resetButton.on( 'mouseover', function()
    747746                                                                                                                                {
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy