Ticket #4980: 4980_2.patch

File 4980_2.patch, 4.3 KB (added by Minh Nguyen, 14 years ago)
  • _source/plugins/dialogui/plugin.js

     
    955955                                 */
    956956                                setValue : function( value )
    957957                                {
    958                                         value = value || '';
     958                                        value = ( value != null ) ? value : '';
    959959                                        return CKEDITOR.ui.dialog.uiElement.prototype.setValue.call( this, value );
    960960                                },
    961961
  • _source/plugins/image/dialogs/image.js

     
    800800                                                                                                                {
    801801                                                                                                                        var value,
    802802                                                                                                                                borderStyle = element.getStyle( 'border-width' );
    803 
    804803                                                                                                                        borderStyle = borderStyle && borderStyle.match( /^(\d+px)(?: \1 \1 \1)?$/ );
    805804                                                                                                                        value = borderStyle && parseInt( borderStyle[ 1 ], 10 );
    806                                                                                                                         !value && ( value = element.getAttribute( 'border' ) );
    807 
     805                                                                                                                        isNaN ( parseInt( value ) ) && ( value = element.getAttribute( 'border' ) );
    808806                                                                                                                        this.setValue( value );
    809807                                                                                                                }
    810808                                                                                                        },
     
    813811                                                                                                                var value = parseInt( this.getValue(), 10 );
    814812                                                                                                                if ( type == IMAGE || type == PREVIEW )
    815813                                                                                                                {
    816                                                                                                                         if ( value )
     814                                                                                                                        if ( !isNaN( value ) )
    817815                                                                                                                        {
    818816                                                                                                                                element.setStyle( 'border-width', CKEDITOR.tools.cssLength( value ) );
    819817                                                                                                                                element.setStyle( 'border-style', 'solid' );
     
    873871                                                                                                                        marginRightPx = parseInt( marginRightStyle, 10 );
    874872
    875873                                                                                                                        value = ( marginLeftPx == marginRightPx ) && marginLeftPx;
    876                                                                                                                         !value && ( value = element.getAttribute( 'hspace' ) );
     874                                                                                                                        isNaN( parseInt( value ) ) && ( value = element.getAttribute( 'hspace' ) );
    877875
    878876                                                                                                                        this.setValue( value );
    879877                                                                                                                }
     
    883881                                                                                                                var value = parseInt( this.getValue(), 10 );
    884882                                                                                                                if ( type == IMAGE || type == PREVIEW )
    885883                                                                                                                {
    886                                                                                                                         if ( value )
     884                                                                                                                        if ( !isNaN( value ) )
    887885                                                                                                                        {
    888886                                                                                                                                element.setStyle( 'margin-left', CKEDITOR.tools.cssLength( value ) );
    889887                                                                                                                                element.setStyle( 'margin-right', CKEDITOR.tools.cssLength( value ) );
     
    941939                                                                                                                        marginBottomPx = parseInt( marginBottomStyle, 10 );
    942940
    943941                                                                                                                        value = ( marginTopPx == marginBottomPx ) && marginTopPx;
    944                                                                                                                         !value && ( value = element.getAttribute( 'vspace' ) );
     942                                                                                                                        isNaN ( parseInt( value ) ) && ( value = element.getAttribute( 'vspace' ) );
    945943                                                                                                                        this.setValue( value );
    946944                                                                                                                }
    947945                                                                                                        },
     
    950948                                                                                                                var value = parseInt( this.getValue(), 10 );
    951949                                                                                                                if ( type == IMAGE || type == PREVIEW )
    952950                                                                                                                {
    953                                                                                                                         if ( value )
     951                                                                                                                        if ( !isNaN( value ) )
    954952                                                                                                                        {
    955953                                                                                                                                element.setStyle( 'margin-top', CKEDITOR.tools.cssLength( value ) );
    956954                                                                                                                                element.setStyle( 'margin-bottom', CKEDITOR.tools.cssLength( value ) );
  • CHANGES.html

     
    5151                <li><a href="http://dev.fckeditor.net/ticket/4640">#4640</a> : Small optimizations for the fileBrowser plugin.</li>
    5252                <li><a href="http://dev.fckeditor.net/ticket/4863">#4863</a> : Fixing iframedialog's height doesn't stretch to 100%</li>
    5353                <li><a href="http://dev.fckeditor.net/ticket/4964">#4964</a> : The BACKSPACE key positioning was not correct in some cases with Firefox.</li>
     54                <li><a href="http://dev.fckeditor.net/ticket/4980">#4980</a> : The border, vspace, hspace of img are zero not working.</li>
    5455                <li><a href="http://dev.fckeditor.net/ticket/4773">#4773</a> : The fileBrowser plugin overwrote any onClick function for a fileButton element.</li>
    5556                <li><a href="http://dev.fckeditor.net/ticket/4731">#4731</a> : The clipboard plugin was missing a reference to the dialog plugin.</li>
    5657                <li><a href="http://dev.fckeditor.net/ticket/5051">#5051</a> : The about plugin was missing a reference to the dialog plugin.</li>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy