Ticket #3830: 3830_2.patch

File 3830_2.patch, 3.1 KB (added by Garry Yao, 15 years ago)
  • _source/plugins/tabletools/dialogs/tableCell.js

     
    314314                        ],
    315315                        onShow : function()
    316316                        {
    317                                 // Get the selected table cell.
    318                                 var startElement = editor.getSelection().getStartElement();
    319                                 this.cell = startElement.getAscendant( 'td', true ) || startElement.getAscendant( 'th', true );
    320 
    321                                 // Call setupContent().
    322                                 this.setupContent( this.cell );
     317                                this.cells = CKEDITOR.plugins.tabletools.getSelectedCells(
     318                                        this._.editor.getSelection() );
     319                                this.setupContent( this.cells[ 0 ] );
    323320                        },
    324321                        onOk : function()
    325322                        {
    326                                 // Call commitContent().
    327                                 this.commitContent( this.cell );
     323                                var cells = this.cells
     324                                for ( var i = 0 ; i < cells.length ; i++ )
     325                                        this.commitContent( cells[ i ] );
    328326                        }
    329327                };
    330328        } );
  • _source/plugins/tabletools/plugin.js

     
    416416                }
    417417        }
    418418
    419         CKEDITOR.plugins.add( 'tabletools',
     419        CKEDITOR.plugins.tabletools =
    420420        {
    421421                init : function( editor )
    422422                {
     
    544544                                                        getItems : function()
    545545                                                        {
    546546                                                                var cells = getSelectedCells( editor.getSelection() );
    547 
    548547                                                                return {
    549548                                                                        tablecell_insertBefore : CKEDITOR.TRISTATE_OFF,
    550549                                                                        tablecell_insertAfter : CKEDITOR.TRISTATE_OFF,
    551550                                                                        tablecell_delete : CKEDITOR.TRISTATE_OFF,
    552                                                                         tablecell_properties : cells.length == 1 ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED
     551                                                                        tablecell_properties : cells.length > 0 ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED
    553552                                                                };
    554553                                                        }
    555554                                                },
     
    688687                                                        return null;
    689688                                        } );
    690689                        }
    691                 }
    692         } );
     690                },
     691
     692                getSelectedCells : getSelectedCells
     693
     694        };
     695        CKEDITOR.plugins.add( 'tabletools', CKEDITOR.plugins.tabletools );
    693696})();
  • CHANGES.html

     
    1 ?<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    22<!--
    33Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
    44For licensing, see LICENSE.html or http://ckeditor.com/license
     
    4646        <ul>
    4747                <li><a href="http://dev.fckeditor.net/ticket/3819">#3819</a> : The cursor was not visible
    4848                        when applying style to collapsed selections in Firefox 2.</li>
     49                <li><a href="http://dev.fckeditor.net/ticket/3830">#3830</a> : Table cell properties dialog
     50                        doesn't apply to all selected cells.</li>
    4951        </ul>
    5052        <h3>
    5153                CKEditor 3.0 RC</h3>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy