Skip to content
Permalink
Browse files

Merge branch 't/8024' into major

  • Loading branch information...
Reinmar committed Jan 9, 2015
2 parents e75f82a + c63a75d commit e4ad44144b61384fd4eeb0402c288bed2cacc89e
@@ -28,6 +28,7 @@ Fixed Issues:

Other Changes:

* [#8024](http://dev.ckeditor.com/ticket/8024): Swapped behavior of the Split Table Cell Vertically and Horizontally features to be more intuitive. Thanks to [kevinisagit](https://github.com/kevinisagit)!
* [#10903](http://dev.ckeditor.com/ticket/10903): Performance improvements for [`addClass`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-addClass), [`removeClass`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-removeClass) and [`hasClass`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-hasClass) methods.
* [#11856](http://dev.ckeditor.com/ticket/11856): jQuery adapter throw an meaningful error if CKEditor or jQuery is not loaded.
* [#12150](http://dev.ckeditor.com/ticket/12150): Expose [`getNestedEditable`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-static-method-getNestedEditable) and `is*` [widget helper](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget) functions.
@@ -537,7 +537,7 @@
}
}

function verticalSplitCell( selection, isDetect ) {
function horizontalSplitCell( selection, isDetect ) {
var cells = getSelectedCells( selection );
if ( cells.length > 1 )
return false;
@@ -602,7 +602,7 @@
return newCell;
}

function horizontalSplitCell( selection, isDetect ) {
function verticalSplitCell( selection, isDetect ) {
var cells = getSelectedCells( selection );
if ( cells.length > 1 )
return false;
@@ -0,0 +1,13 @@
<div id="editor">
<table border="1" cellpadding="1" cellspacing="1" style="width: 500px">
<tbody>
<tr>
<td>he^re</td>
</tr>
</tbody>
</table>
</div>

<script>
CKEDITOR.replace( 'editor' );
</script>
@@ -0,0 +1,15 @@
@bender-tags: 4.5.0, tc
@bender-ui: collapsed
@bender-ckeditor-plugins: wysiwygarea, toolbar, table, tabletools

1. Place caret in the table cell.
1. Open the context menu.
1. Choose:
1. "Cell".
1. "Split Cell **Horizontally**".

Expected:

1. New cell is created below the original one.
1. Table has two rows, one column.
1. Caret is located in the bottom cell.
@@ -0,0 +1,13 @@
<div id="editor">
<table border="1" cellpadding="1" cellspacing="1" style="width: 500px">
<tbody>
<tr>
<td>he^re</td>
</tr>
</tbody>
</table>
</div>

<script>
CKEDITOR.replace( 'editor' );
</script>
@@ -0,0 +1,15 @@
@bender-tags: 4.5.0, tc
@bender-ui: collapsed
@bender-ckeditor-plugins: wysiwygarea, toolbar, table, tabletools

1. Place caret in the table cell.
1. Open the context menu.
1. Choose:
1. "Cell".
1. "Split Cell **Vertically**".

Expected:

1. New cell is created on the right hand side of the original one.
1. Table has one row, two columns.
1. Caret is located in the right cell.
@@ -87,51 +87,51 @@
},

'test split cells': function() {
this.doTest( 'split-cells', 'cellVerticalSplit' );
this.doTest( 'split-cells', 'cellHorizontalSplit' );
},

'test split cells (2)': function() {
this.doTest( 'split-cells-2', 'cellVerticalSplit' );
this.doTest( 'split-cells-2', 'cellHorizontalSplit' );
},

'test split cells (3)': function() {
this.doTest( 'split-cells-3', 'cellVerticalSplit' );
this.doTest( 'split-cells-3', 'cellHorizontalSplit' );
},

'test split cells (4)': function() {
this.doTest( 'split-cells-4', 'cellHorizontalSplit' );
this.doTest( 'split-cells-4', 'cellVerticalSplit' );
},

'test split cells (5)': function() {
this.doTest( 'split-cells-5', 'cellHorizontalSplit' );
this.doTest( 'split-cells-5', 'cellVerticalSplit' );
},

'test split cells (6)': function() {
this.doTest( 'split-cells-6', 'cellHorizontalSplit' );
this.doTest( 'split-cells-6', 'cellVerticalSplit' );
},

'test split cells (7)': function() {
var bot = this.editorBot;
bender.tools.testInputOut( 'split-cells-7', function( source, expected ) {
bot.setHtmlWithSelection( source );
bot.execCommand( 'cellVerticalSplit' );
bot.execCommand( 'cellHorizontalSplit' );

var range = new CKEDITOR.dom.range( bot.editor.document );
range.moveToPosition( bot.editor.document.getById( 'cursor' ), CKEDITOR.POSITION_AFTER_START );
range.select();

bot.execCommand( 'cellHorizontalSplit' );
bot.execCommand( 'cellVerticalSplit' );
assert.areSame( bender.tools.compatHtml( expected ), bot.getData( true ) );
} );
},

// (#11438)
'test split cells (8)': function() {
this.doTest( 'split-cells-8', 'cellVerticalSplit' );
this.doTest( 'split-cells-8', 'cellHorizontalSplit' );
},

'test split cells (9)': function() {
this.doTest( 'split-cells-9', 'cellVerticalSplit' );
this.doTest( 'split-cells-9', 'cellHorizontalSplit' );
},

// (#6111)

0 comments on commit e4ad441

Please sign in to comment.
You can’t perform that action at this time.