Ticket #4980: 4980.patch
File 4980.patch, 3.2 KB (added by , 14 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 ) );