X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Ftable%2Fdialogs%2Ftable.js;h=b6e7405bded80187e53732f20388c9dbdeab1db4;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hp=7b06606adcac387ce190ff5e5ac580fa075367d5;hpb=9873d66421922c7aef8be0f5d2ab51e547b19e66;p=ckeditor.git diff --git a/_source/plugins/table/dialogs/table.js b/_source/plugins/table/dialogs/table.js index 7b06606..b6e7405 100644 --- a/_source/plugins/table/dialogs/table.js +++ b/_source/plugins/table/dialogs/table.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -79,11 +79,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( command == 'tableProperties' ) { - if ( ( selectedTable = editor.getSelection().getSelectedElement() ) ) - { - if ( selectedTable.getName() != 'table' ) - selectedTable = null; - } + if ( ( selectedTable = selection.getSelectedElement() ) ) + selectedTable = selectedTable.getAscendant( 'table', true ); else if ( ranges.length > 0 ) { // Webkit could report the following range on cell selection (#4948): @@ -122,7 +119,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( this._.selectedElement ) { var selection = editor.getSelection(), - bms = editor.getSelection().createBookmarks(); + bms = selection.createBookmarks(); } var table = this._.selectedElement || makeElement( 'table' ), @@ -169,7 +166,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license for ( i = 0 ; i < theRow.getChildCount() ; i++ ) { var th = theRow.getChild( i ); - if ( th.type == CKEDITOR.NODE_ELEMENT ) + // Skip bookmark nodes. (#6155) + if ( th.type == CKEDITOR.NODE_ELEMENT && !th.data( 'cke-bookmark' ) ) { th.renameNode( 'th' ); th.setAttribute( 'scope', 'col' ); @@ -389,13 +387,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license id : 'cmbAlign', type : 'select', 'default' : '', - label : editor.lang.table.align, + label : editor.lang.common.align, items : [ [ editor.lang.common.notSet , ''], - [ editor.lang.table.alignLeft , 'left'], - [ editor.lang.table.alignCenter , 'center'], - [ editor.lang.table.alignRight , 'right'] + [ editor.lang.common.alignLeft , 'left'], + [ editor.lang.common.alignCenter , 'center'], + [ editor.lang.common.alignRight , 'right'] ], setup : function( selectedTable ) { @@ -425,7 +423,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license type : 'text', id : 'txtWidth', style : 'width:5em', - label : editor.lang.table.width, + label : editor.lang.common.width, 'default' : 500, validate : CKEDITOR.dialog.validate['number']( editor.lang.table.invalidWidth ), @@ -499,7 +497,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license type : 'text', id : 'txtHeight', style : 'width:5em', - label : editor.lang.table.height, + label : editor.lang.common.height, 'default' : '', validate : CKEDITOR.dialog.validate['number']( editor.lang.table.invalidHeight ), @@ -606,8 +604,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( nodeList.count() > 0 ) { var caption = nodeList.getItem( 0 ); - caption = ( caption.getChild( 0 ) && caption.getChild( 0 ).getText() ) || ''; - caption = CKEDITOR.tools.trim( caption ); + caption = CKEDITOR.tools.trim( caption.getText() ); this.setValue( caption ); } },