Ticket #4676: 4676.patch

File 4676.patch, 1.0 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/table/dialogs/table.js

     
    174174                                        // Set the width and height.
    175175                                        var styles = [];
    176176                                        if ( info.txtHeight )
    177                                                 styles.push( 'height:' + info.txtHeight + 'px' );
     177                                                table.setStyle( 'height', CKEDITOR.tools.cssLength( info.txtHeight ) );
     178                                        else
     179                                                table.removeStyle( 'height' );
     180
    178181                                        if ( info.txtWidth )
    179182                                        {
    180183                                                var type = info.cmbWidthType || 'pixels';
    181                                                 styles.push( 'width:' + info.txtWidth + ( type == 'pixels' ? 'px' : '%' ) );
     184                                                table.setStyle( 'width', info.txtWidth + ( type == 'pixels' ? 'px' : '%' ) );
    182185                                        }
    183                                         styles = styles.join( ';' );
    184                                         if ( styles )
    185                                                 table.$.style.cssText = styles;
    186186                                        else
     187                                                table.removeStyle( 'width' );
     188
     189                                        if( !table.getAttribute( 'style' ) )
    187190                                                table.removeAttribute( 'style' );
    188191                                }
    189192
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy