Ticket #4980: 4980_2.patch
File 4980_2.patch, 4.3 KB (added by , 13 years ago) |
---|
-
_source/plugins/dialogui/plugin.js
955 955 */ 956 956 setValue : function( value ) 957 957 { 958 value = value ||'';958 value = ( value != null ) ? value : ''; 959 959 return CKEDITOR.ui.dialog.uiElement.prototype.setValue.call( this, value ); 960 960 }, 961 961 -
_source/plugins/image/dialogs/image.js
800 800 { 801 801 var value, 802 802 borderStyle = element.getStyle( 'border-width' ); 803 804 803 borderStyle = borderStyle && borderStyle.match( /^(\d+px)(?: \1 \1 \1)?$/ ); 805 804 value = borderStyle && parseInt( borderStyle[ 1 ], 10 ); 806 !value && ( value = element.getAttribute( 'border' ) ); 807 805 isNaN ( parseInt( value ) ) && ( value = element.getAttribute( 'border' ) ); 808 806 this.setValue( value ); 809 807 } 810 808 }, … … 813 811 var value = parseInt( this.getValue(), 10 ); 814 812 if ( type == IMAGE || type == PREVIEW ) 815 813 { 816 if ( value)814 if ( !isNaN( value ) ) 817 815 { 818 816 element.setStyle( 'border-width', CKEDITOR.tools.cssLength( value ) ); 819 817 element.setStyle( 'border-style', 'solid' ); … … 873 871 marginRightPx = parseInt( marginRightStyle, 10 ); 874 872 875 873 value = ( marginLeftPx == marginRightPx ) && marginLeftPx; 876 !value&& ( value = element.getAttribute( 'hspace' ) );874 isNaN( parseInt( value ) ) && ( value = element.getAttribute( 'hspace' ) ); 877 875 878 876 this.setValue( value ); 879 877 } … … 883 881 var value = parseInt( this.getValue(), 10 ); 884 882 if ( type == IMAGE || type == PREVIEW ) 885 883 { 886 if ( value)884 if ( !isNaN( value ) ) 887 885 { 888 886 element.setStyle( 'margin-left', CKEDITOR.tools.cssLength( value ) ); 889 887 element.setStyle( 'margin-right', CKEDITOR.tools.cssLength( value ) ); … … 941 939 marginBottomPx = parseInt( marginBottomStyle, 10 ); 942 940 943 941 value = ( marginTopPx == marginBottomPx ) && marginTopPx; 944 !value&& ( value = element.getAttribute( 'vspace' ) );942 isNaN ( parseInt( value ) ) && ( value = element.getAttribute( 'vspace' ) ); 945 943 this.setValue( value ); 946 944 } 947 945 }, … … 950 948 var value = parseInt( this.getValue(), 10 ); 951 949 if ( type == IMAGE || type == PREVIEW ) 952 950 { 953 if ( value)951 if ( !isNaN( value ) ) 954 952 { 955 953 element.setStyle( 'margin-top', CKEDITOR.tools.cssLength( value ) ); 956 954 element.setStyle( 'margin-bottom', CKEDITOR.tools.cssLength( value ) ); -
CHANGES.html
51 51 <li><a href="http://dev.fckeditor.net/ticket/4640">#4640</a> : Small optimizations for the fileBrowser plugin.</li> 52 52 <li><a href="http://dev.fckeditor.net/ticket/4863">#4863</a> : Fixing iframedialog's height doesn't stretch to 100%</li> 53 53 <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> 54 55 <li><a href="http://dev.fckeditor.net/ticket/4773">#4773</a> : The fileBrowser plugin overwrote any onClick function for a fileButton element.</li> 55 56 <li><a href="http://dev.fckeditor.net/ticket/4731">#4731</a> : The clipboard plugin was missing a reference to the dialog plugin.</li> 56 57 <li><a href="http://dev.fckeditor.net/ticket/5051">#5051</a> : The about plugin was missing a reference to the dialog plugin.</li>