Ticket #7073: 7073.patch

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

     
    196196
    197197                        var dialog = this.getDialog(),
    198198                                value = '',
    199                                 dimension = (( this.id == 'txtWidth' )? 'width' : 'height' ),
     199                                dimension = this.id == 'txtWidth' ? 'width' : 'height',
    200200                                size = element.getAttribute( dimension );
    201201
    202202                        if ( size )
     
    636636                                                                                                                        validate : function()
    637637                                                                                                                        {
    638638                                                                                                                                var aMatch  =  this.getValue().match( regexGetSizeOrEmpty );
    639                                                                                                                                 if ( !aMatch )
     639                                                                                                                                if ( !aMatch || aMatch[1] == 0 )
    640640                                                                                                                                        alert( editor.lang.common.invalidWidth );
    641641                                                                                                                                return !!aMatch;
    642642                                                                                                                        },
     
    685685                                                                                                                        validate : function()
    686686                                                                                                                        {
    687687                                                                                                                                var aMatch = this.getValue().match( regexGetSizeOrEmpty );
    688                                                                                                                                 if ( !aMatch )
     688                                                                                                                                if ( !aMatch || aMatch[1] == 0 )
    689689                                                                                                                                        alert( editor.lang.common.invalidHeight );
    690690                                                                                                                                return !!aMatch;
    691691                                                                                                                        },
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy