Ticket #7351: 7351_2.patch

File 7351_2.patch, 1.7 KB (added by Sa'ar Zac Elias, 14 years ago)
  • _source/plugins/image/dialogs/image.js

     
    638638                                                                                                                        validate : function()
    639639                                                                                                                        {
    640640                                                                                                                                var aMatch  =  this.getValue().match( regexGetSizeOrEmpty ),
    641                                                                                                                                         isValid = !!( aMatch && aMatch[ 1 ] != 0 );
     641                                                                                                                                        isValid = !!( aMatch && parseInt( aMatch[1], 10 ) != 0 );
    642642                                                                                                                                if ( !isValid )
    643643                                                                                                                                        alert( editor.lang.common.invalidWidth );
    644644                                                                                                                                return isValid;
     
    651651                                                                                                                                {
    652652                                                                                                                                        if ( value )
    653653                                                                                                                                                element.setStyle( 'width', CKEDITOR.tools.cssLength( value ) );
    654                                                                                                                                         else if ( !value && this.isChanged( ) )
     654                                                                                                                                        else if ( !value && this.isChanged() )
    655655                                                                                                                                                element.removeStyle( 'width' );
    656656
    657657                                                                                                                                        !internalCommit && element.removeAttribute( 'width' );
     
    687687                                                                                                                        },
    688688                                                                                                                        validate : function()
    689689                                                                                                                        {
    690                                                                                                                                 var aMatch = this.getValue().match( regexGetSizeOrEmpty );
    691                                                                                                                                 if ( !aMatch || aMatch[1] == 0 )
     690                                                                                                                                var aMatch = this.getValue().match( regexGetSizeOrEmpty ),
     691                                                                                                                                        isValid = !!( aMatch && parseInt( aMatch[1], 10 ) != 0 );
     692                                                                                                                                if ( !isValid )
    692693                                                                                                                                        alert( editor.lang.common.invalidHeight );
    693                                                                                                                                 return !!aMatch;
     694                                                                                                                                return isValid;
    694695                                                                                                                        },
    695696                                                                                                                        setup : setupDimension,
    696697                                                                                                                        commit : function( type, element, internalCommit )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy