Ticket #7351: 7351_2.patch
File 7351_2.patch, 1.7 KB (added by , 13 years ago) |
---|
-
_source/plugins/image/dialogs/image.js
638 638 validate : function() 639 639 { 640 640 var aMatch = this.getValue().match( regexGetSizeOrEmpty ), 641 isValid = !!( aMatch && aMatch[ 1 ]!= 0 );641 isValid = !!( aMatch && parseInt( aMatch[1], 10 ) != 0 ); 642 642 if ( !isValid ) 643 643 alert( editor.lang.common.invalidWidth ); 644 644 return isValid; … … 651 651 { 652 652 if ( value ) 653 653 element.setStyle( 'width', CKEDITOR.tools.cssLength( value ) ); 654 else if ( !value && this.isChanged( 654 else if ( !value && this.isChanged() ) 655 655 element.removeStyle( 'width' ); 656 656 657 657 !internalCommit && element.removeAttribute( 'width' ); … … 687 687 }, 688 688 validate : function() 689 689 { 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 ) 692 693 alert( editor.lang.common.invalidHeight ); 693 return !!aMatch;694 return isValid; 694 695 }, 695 696 setup : setupDimension, 696 697 commit : function( type, element, internalCommit )