From ceddb4d925bc7a4217687071b4ae73e7030f9c05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Wed, 24 Apr 2019 13:26:31 +0200 Subject: [PATCH 01/32] Mimic the solution used for cell width. --- plugins/tabletools/dialogs/tableCell.js | 42 +++++++++++++++++-------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/plugins/tabletools/dialogs/tableCell.js b/plugins/tabletools/dialogs/tableCell.js index fbb96a0b0c8..ea549602090 100644 --- a/plugins/tabletools/dialogs/tableCell.js +++ b/plugins/tabletools/dialogs/tableCell.js @@ -76,9 +76,8 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) { children: [ { type: 'text', id: 'height', - label: langCommon.height, width: '100px', - 'default': '', + label: langCommon.height, validate: validate.number( langCell.invalidHeight ), // Extra labelling of height unit type. @@ -88,11 +87,6 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) { inputElement = this.getInputElement(), ariaLabelledByAttr = inputElement.getAttribute( 'aria-labelledby' ); - if ( this.getDialog().getContentElement( 'info', 'height' ).isVisible() ) { - labelElement.setHtml( '
' + langTable.widthPx ); - labelElement.setStyle( 'display', 'block' ); - } - inputElement.setAttribute( 'aria-labelledby', [ ariaLabelledByAttr, labelElement.$.id ].join( ' ' ) ); }, @@ -103,22 +97,31 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) { return !isNaN( heightStyle ) ? heightStyle : !isNaN( heightAttr ) ? heightAttr : ''; } ), + commit: function( element ) { - var value = parseInt( this.getValue(), 10 ); + var value = parseInt( this.getValue(), 10 ), + unit = this.getDialog().getValueOf( 'info', 'htmlHeightType' ) || getCellHeightType( element ); if ( !isNaN( value ) ) { - element.setStyle( 'height', CKEDITOR.tools.cssLength( value ) ); + element.setStyle( 'height', value + unit ); } else { element.removeStyle( 'height' ); } element.removeAttribute( 'height' ); - } + }, + 'default': '' }, { + type: 'select', id: 'htmlHeightType', - type: 'html', - html: '', - style: 'display: none' + label: editor.lang.table.heightUnit, + labelStyle: 'visibility:hidden', + 'default': 'px', + items: [ + [ langTable.widthPx, 'px' ], + [ langTable.widthPc, '%' ] + ], + setup: setupCells( getCellHeightType ) } ] }, createSpacer( [ 'td{width}', 'td{height}' ] ), @@ -566,4 +569,17 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) { return match[ 2 ]; } } + + // Reads the unit of height property of the table cell. + // + // * @param {CKEDITOR.dom.element} cell An element representing the table cell. + // * @returns {String} A unit of width: 'px', '%' or undefined if none. + function getCellHeightType( cell ) { + var match = widthPattern.exec( + cell.getStyle( 'height' ) || cell.getAttribute( 'height' ) ); + + if ( match ) { + return match[ 2 ]; + } + } } ); From 6aca1aa2230ee30b778cb7c0c35819fe8105a833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Wed, 24 Apr 2019 17:23:06 +0200 Subject: [PATCH 02/32] Add unit tests. --- tests/plugins/tabletools/cellproperties.html | 116 +++++++++++++++++++ tests/plugins/tabletools/cellproperties.js | 42 +++++++ 2 files changed, 158 insertions(+) diff --git a/tests/plugins/tabletools/cellproperties.html b/tests/plugins/tabletools/cellproperties.html index 994921a6da2..9befaf25d0e 100644 --- a/tests/plugins/tabletools/cellproperties.html +++ b/tests/plugins/tabletools/cellproperties.html @@ -290,4 +290,120 @@ + + + + + + + + + + + + diff --git a/tests/plugins/tabletools/cellproperties.js b/tests/plugins/tabletools/cellproperties.js index 36b315c6dca..0752073ec0e 100644 --- a/tests/plugins/tabletools/cellproperties.js +++ b/tests/plugins/tabletools/cellproperties.js @@ -139,6 +139,48 @@ } ); }, + // (#2084) + 'test load and update field values (#11)': function() { + this.doTest( 'table-12', function( dialog ) { + assert.areSame( '60', dialog.getValueOf( 'info', 'height' ) ); + assert.areSame( '%', dialog.getValueOf( 'info', 'htmlHeightType' ) ); + + dialog.setValueOf( 'info', 'height', 20 ); + dialog.setValueOf( 'info', 'htmlHeightType', '%' ); + } ); + }, + + // (#2084) + 'test load and update field values (#12)': function() { + this.doTest( 'table-13', function( dialog ) { + assert.areSame( '60', dialog.getValueOf( 'info', 'height' ) ); + assert.areSame( '', dialog.getValueOf( 'info', 'htmlHeightType' ) ); + + dialog.setValueOf( 'info', 'height', 20 ); + } ); + }, + + // (#2084) + 'test load and update field values (#13)': function() { + this.doTest( 'table-14', function( dialog ) { + assert.areSame( '', dialog.getValueOf( 'info', 'height' ) ); + assert.areSame( '', dialog.getValueOf( 'info', 'htmlHeightType' ) ); + + dialog.setValueOf( 'info', 'height', 20 ); + } ); + }, + + // (#2084) + 'test load and update field values (#14)': function() { + this.doTest( 'table-15', function( dialog ) { + assert.areSame( '', dialog.getValueOf( 'info', 'height' ) ); + assert.areSame( '', dialog.getValueOf( 'info', 'htmlHeightType' ) ); + + dialog.setValueOf( 'info', 'height', 20 ); + dialog.setValueOf( 'info', 'htmlHeightType', 'px' ); + } ); + }, + // https://dev.ckeditor.com/ticket/16893 'test allowedContent rule': function() { bender.editorBot.create( { From e695a0474ac80fdf1bdd13b7accdbd26f7c26ad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Wed, 24 Apr 2019 17:28:18 +0200 Subject: [PATCH 03/32] Add changelog entry. --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 32aa12c6b3c..3eb8534e61b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,7 @@ New Features: * [#2639](https://github.com/ckeditor/ckeditor-dev/issues/2639): [Color Dialog](https://ckeditor.com/cke4/addon/colordialog) plugin now shows current selection's color when opened. * [#1490](https://github.com/ckeditor/ckeditor-dev/issues/1490): Improved [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin to retain table cell borders. * [#2870](https://github.com/ckeditor/ckeditor-dev/issues/2870): Added support for preserving positive `margin-left` values in list items for lists pasted with [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#2084](https://github.com/ckeditor/ckeditor-dev/issues/2084): [Table](https://ckeditor.com/cke4/addon/table) cells' height can now be set in either pixels or percents. Fixed Issues: From 8b69ac49215dcbf256cabf85409b4810b282bc83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Thu, 25 Apr 2019 11:26:37 +0200 Subject: [PATCH 04/32] Add comment and add missing braces in files. --- plugins/tabletools/dialogs/tableCell.js | 8 +++++++- tests/plugins/tabletools/cellproperties.js | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/tabletools/dialogs/tableCell.js b/plugins/tabletools/dialogs/tableCell.js index ea549602090..004aed6279e 100644 --- a/plugins/tabletools/dialogs/tableCell.js +++ b/plugins/tabletools/dialogs/tableCell.js @@ -100,6 +100,11 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) { commit: function( element ) { var value = parseInt( this.getValue(), 10 ), + + // There might be no htmlHeightType value, i.e. when multiple cells are + // selected but some of them have width expressed in pixels and some + // of them in percent. Try to re-read the unit from the cell in such + // case. unit = this.getDialog().getValueOf( 'info', 'htmlHeightType' ) || getCellHeightType( element ); if ( !isNaN( value ) ) { @@ -466,8 +471,9 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) { bookmarks = selection.createBookmarks(); var cells = this.cells; - for ( var i = 0; i < cells.length; i++ ) + for ( var i = 0; i < cells.length; i++ ) { this.commitContent( cells[ i ] ); + } this._.editor.forceNextSelectionCheck(); selection.selectBookmarks( bookmarks ); diff --git a/tests/plugins/tabletools/cellproperties.js b/tests/plugins/tabletools/cellproperties.js index 0752073ec0e..497ae61837c 100644 --- a/tests/plugins/tabletools/cellproperties.js +++ b/tests/plugins/tabletools/cellproperties.js @@ -15,8 +15,9 @@ bot.dialog( 'cellProperties', function( dialog ) { try { - if ( dialogCallback ) + if ( dialogCallback ) { dialogCallback( dialog ); + } dialog.getButton( 'ok' ).click(); } catch ( e ) { From 8fecfa462d595f840fb36bdd7f4ae15cfeffb20e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Mon, 29 Apr 2019 10:56:24 +0200 Subject: [PATCH 05/32] Add 'tableselection' plugin to tests as it breaks them in full preset build. --- tests/plugins/tabletools/cellproperties.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/plugins/tabletools/cellproperties.js b/tests/plugins/tabletools/cellproperties.js index 497ae61837c..c1a6d720530 100644 --- a/tests/plugins/tabletools/cellproperties.js +++ b/tests/plugins/tabletools/cellproperties.js @@ -1,5 +1,5 @@ /* bender-tags: editor */ -/* bender-ckeditor-plugins: entities,dialog,tabletools,toolbar */ +/* bender-ckeditor-plugins: entities,dialog,tabletools,toolbar,tableselection */ ( function() { 'use strict'; From 3131713b31105b5def97901e34329833f25eefd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Mon, 29 Apr 2019 10:57:03 +0200 Subject: [PATCH 06/32] Fix tests by changing html selections. --- tests/plugins/tabletools/cellproperties.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/plugins/tabletools/cellproperties.html b/tests/plugins/tabletools/cellproperties.html index 9befaf25d0e..cffc1b9bc1e 100644 --- a/tests/plugins/tabletools/cellproperties.html +++ b/tests/plugins/tabletools/cellproperties.html @@ -299,8 +299,8 @@ b]b - a[a - b]b + aa + bb @@ -328,8 +328,8 @@ b]b - a[a - b]b + aa + bb @@ -357,8 +357,8 @@ b]b - a[a - b]b + aa + bb @@ -386,8 +386,8 @@ b]b - a[a - b]b + aa + bb From a074fa928c73707a296dfefc0c6aaa35b88beb41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Mon, 13 May 2019 12:24:18 +0200 Subject: [PATCH 07/32] Delete trailing space. --- tests/plugins/tabletools/manual/cellproperties.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/plugins/tabletools/manual/cellproperties.md b/tests/plugins/tabletools/manual/cellproperties.md index 219b096e90e..298bc7e56c0 100644 --- a/tests/plugins/tabletools/manual/cellproperties.md +++ b/tests/plugins/tabletools/manual/cellproperties.md @@ -12,7 +12,7 @@ All dialog elements are properly aligned (no gap at the top in one of the column #### Editor 1: -Cell width and height fields are not visible. +Cell width and height fields are not visible. #### Editor 2: From a59c405f4eb7eb5a725fc8149cd0d5d18cb76a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Mon, 13 May 2019 12:42:43 +0200 Subject: [PATCH 08/32] Add manual test. --- .../plugins/tabletools/manual/cellheight.html | 18 +++++++++++++++ tests/plugins/tabletools/manual/cellheight.md | 23 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 tests/plugins/tabletools/manual/cellheight.html create mode 100644 tests/plugins/tabletools/manual/cellheight.md diff --git a/tests/plugins/tabletools/manual/cellheight.html b/tests/plugins/tabletools/manual/cellheight.html new file mode 100644 index 00000000000..b6746ad609d --- /dev/null +++ b/tests/plugins/tabletools/manual/cellheight.html @@ -0,0 +1,18 @@ +
+ + + + + + + + + + + +
Each time right click here1.2
2.12.2
+
+ + diff --git a/tests/plugins/tabletools/manual/cellheight.md b/tests/plugins/tabletools/manual/cellheight.md new file mode 100644 index 00000000000..49abc1653a1 --- /dev/null +++ b/tests/plugins/tabletools/manual/cellheight.md @@ -0,0 +1,23 @@ +@bender-tags: 4.12.0 +@bender-ui: collapsed +@bender-ckeditor-plugins: wysiwygarea, toolbar, table, tabletools, undo + +## Test scenario + +1. Open the cell properties dialog. + +#### Expected: + +Cell height unit is changeable (pixels or percents). + +2. Change cell height to 20px. + +#### Expected: + +First row is lower than second one. + +3. Change cell height to 70 percent. + +#### Expected: + +First row is higher than second one. From d6c3688157722e706d042536ae90e38462608436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Mon, 13 May 2019 12:47:01 +0200 Subject: [PATCH 09/32] Specify changelog entry. --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 3eb8534e61b..5d2046bfc4b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,7 +10,7 @@ New Features: * [#2639](https://github.com/ckeditor/ckeditor-dev/issues/2639): [Color Dialog](https://ckeditor.com/cke4/addon/colordialog) plugin now shows current selection's color when opened. * [#1490](https://github.com/ckeditor/ckeditor-dev/issues/1490): Improved [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin to retain table cell borders. * [#2870](https://github.com/ckeditor/ckeditor-dev/issues/2870): Added support for preserving positive `margin-left` values in list items for lists pasted with [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. -* [#2084](https://github.com/ckeditor/ckeditor-dev/issues/2084): [Table](https://ckeditor.com/cke4/addon/table) cells' height can now be set in either pixels or percents. +* [#2084](https://github.com/ckeditor/ckeditor-dev/issues/2084): [Table Tools plugin](https://ckeditor.com/cke4/addon/table) now allows to change cell height unit type to either pixels or percents. Fixed Issues: From cea5ca3d1ca08fce4d7cd3dac263acac34a998cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Mon, 13 May 2019 12:58:56 +0200 Subject: [PATCH 10/32] Add descriptions to test cases. --- tests/plugins/tabletools/cellproperties.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/plugins/tabletools/cellproperties.js b/tests/plugins/tabletools/cellproperties.js index c1a6d720530..8a1ee7e0d7c 100644 --- a/tests/plugins/tabletools/cellproperties.js +++ b/tests/plugins/tabletools/cellproperties.js @@ -141,7 +141,7 @@ }, // (#2084) - 'test load and update field values (#11)': function() { + 'test load and update field values - same unit and value, change value (#11)': function() { this.doTest( 'table-12', function( dialog ) { assert.areSame( '60', dialog.getValueOf( 'info', 'height' ) ); assert.areSame( '%', dialog.getValueOf( 'info', 'htmlHeightType' ) ); @@ -152,7 +152,7 @@ }, // (#2084) - 'test load and update field values (#12)': function() { + 'test load and update field values - different unit, same value, change value (#12)': function() { this.doTest( 'table-13', function( dialog ) { assert.areSame( '60', dialog.getValueOf( 'info', 'height' ) ); assert.areSame( '', dialog.getValueOf( 'info', 'htmlHeightType' ) ); @@ -162,7 +162,7 @@ }, // (#2084) - 'test load and update field values (#13)': function() { + 'test load and update field values - different unit and value, change value (#13)': function() { this.doTest( 'table-14', function( dialog ) { assert.areSame( '', dialog.getValueOf( 'info', 'height' ) ); assert.areSame( '', dialog.getValueOf( 'info', 'htmlHeightType' ) ); @@ -172,7 +172,7 @@ }, // (#2084) - 'test load and update field values (#14)': function() { + 'test load and update field values - different unit and value, change unit and value (#14)': function() { this.doTest( 'table-15', function( dialog ) { assert.areSame( '', dialog.getValueOf( 'info', 'height' ) ); assert.areSame( '', dialog.getValueOf( 'info', 'htmlHeightType' ) ); From 7507f7af0c0de03d9bf9aad8f604847f687c0501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Mon, 13 May 2019 13:05:51 +0200 Subject: [PATCH 11/32] Remove 'tableselection' plugin from test as it is no longer needed. --- tests/plugins/tabletools/cellproperties.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/plugins/tabletools/cellproperties.js b/tests/plugins/tabletools/cellproperties.js index 8a1ee7e0d7c..51dfe404bd7 100644 --- a/tests/plugins/tabletools/cellproperties.js +++ b/tests/plugins/tabletools/cellproperties.js @@ -1,5 +1,5 @@ /* bender-tags: editor */ -/* bender-ckeditor-plugins: entities,dialog,tabletools,toolbar,tableselection */ +/* bender-ckeditor-plugins: entities,dialog,tabletools,toolbar */ ( function() { 'use strict'; From 12c42b07ce46c4b4f48353d01558e83afff53b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Tue, 14 May 2019 08:54:56 +0200 Subject: [PATCH 12/32] Refactor width and height fields definition into a function. --- plugins/tabletools/dialogs/tableCell.js | 664 ++++++++++----------- tests/plugins/tabletools/cellproperties.js | 16 +- 2 files changed, 315 insertions(+), 365 deletions(-) diff --git a/plugins/tabletools/dialogs/tableCell.js b/plugins/tabletools/dialogs/tableCell.js index 004aed6279e..22ddfcdbc3d 100644 --- a/plugins/tabletools/dialogs/tableCell.js +++ b/plugins/tabletools/dialogs/tableCell.js @@ -11,396 +11,282 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) { widthPattern = /^(\d+(?:\.\d+)?)(px|%)$/, rtl = editor.lang.dir == 'rtl', colorDialog = editor.plugins.colordialog, - items = [ { - requiredContent: 'td{width}', - type: 'hbox', - widths: [ '70%', '30%' ], - children: [ { - type: 'text', - id: 'width', - width: '100px', - label: langCommon.width, - validate: validate.number( langCell.invalidWidth ), - - // Extra labelling of width unit type. - onLoad: function() { - var widthType = this.getDialog().getContentElement( 'info', 'widthType' ), - labelElement = widthType.getElement(), - inputElement = this.getInputElement(), - ariaLabelledByAttr = inputElement.getAttribute( 'aria-labelledby' ); - - inputElement.setAttribute( 'aria-labelledby', [ ariaLabelledByAttr, labelElement.$.id ].join( ' ' ) ); - }, - + items = [ + getCellSizeFieldDefinition( 'width' ), + getCellSizeFieldDefinition( 'height' ), + createSpacer( [ 'td{width}', 'td{height}' ] ), + { + type: 'select', + id: 'wordWrap', + requiredContent: 'td{white-space}', + label: langCell.wordWrap, + 'default': 'yes', + items: [ + [ langCell.yes, 'yes' ], + [ langCell.no, 'no' ] + ], setup: setupCells( function( element ) { - var widthAttr = parseInt( element.getAttribute( 'width' ), 10 ), - widthStyle = parseInt( element.getStyle( 'width' ), 10 ); + var wordWrapAttr = element.getAttribute( 'noWrap' ), + wordWrapStyle = element.getStyle( 'white-space' ); - return !isNaN( widthStyle ) ? widthStyle : - !isNaN( widthAttr ) ? widthAttr : ''; + if ( wordWrapStyle == 'nowrap' || wordWrapAttr ) { + return 'no'; + } } ), commit: function( element ) { - var value = parseInt( this.getValue(), 10 ), - - // There might be no widthType value, i.e. when multiple cells are - // selected but some of them have width expressed in pixels and some - // of them in percent. Try to re-read the unit from the cell in such - // case (https://dev.ckeditor.com/ticket/11439). - unit = this.getDialog().getValueOf( 'info', 'widthType' ) || getCellWidthType( element ); - - if ( !isNaN( value ) ) { - element.setStyle( 'width', value + unit ); + if ( this.getValue() == 'no' ) { + element.setStyle( 'white-space', 'nowrap' ); } else { - element.removeStyle( 'width' ); + element.removeStyle( 'white-space' ); } - element.removeAttribute( 'width' ); - }, - 'default': '' - }, { + element.removeAttribute( 'noWrap' ); + } + }, + createSpacer( 'td{white-space}' ), + { type: 'select', - id: 'widthType', - label: editor.lang.table.widthUnit, - labelStyle: 'visibility:hidden', - 'default': 'px', + id: 'hAlign', + requiredContent: 'td{text-align}', + label: langCell.hAlign, + 'default': '', items: [ - [ langTable.widthPx, 'px' ], - [ langTable.widthPc, '%' ] + [ langCommon.notSet, '' ], + [ langCommon.left, 'left' ], + [ langCommon.center, 'center' ], + [ langCommon.right, 'right' ], + [ langCommon.justify, 'justify' ] ], - setup: setupCells( getCellWidthType ) - } ] - }, { - requiredContent: 'td{height}', - type: 'hbox', - widths: [ '70%', '30%' ], - children: [ { - type: 'text', - id: 'height', - width: '100px', - label: langCommon.height, - validate: validate.number( langCell.invalidHeight ), - - // Extra labelling of height unit type. - onLoad: function() { - var heightType = this.getDialog().getContentElement( 'info', 'htmlHeightType' ), - labelElement = heightType.getElement(), - inputElement = this.getInputElement(), - ariaLabelledByAttr = inputElement.getAttribute( 'aria-labelledby' ); - - inputElement.setAttribute( 'aria-labelledby', [ ariaLabelledByAttr, labelElement.$.id ].join( ' ' ) ); - }, - setup: setupCells( function( element ) { - var heightAttr = parseInt( element.getAttribute( 'height' ), 10 ), - heightStyle = parseInt( element.getStyle( 'height' ), 10 ); + var alignAttr = element.getAttribute( 'align' ), + textAlignStyle = element.getStyle( 'text-align' ); - return !isNaN( heightStyle ) ? heightStyle : - !isNaN( heightAttr ) ? heightAttr : ''; + return textAlignStyle || alignAttr || ''; } ), + commit: function( selectedCell ) { + var value = this.getValue(); - commit: function( element ) { - var value = parseInt( this.getValue(), 10 ), - - // There might be no htmlHeightType value, i.e. when multiple cells are - // selected but some of them have width expressed in pixels and some - // of them in percent. Try to re-read the unit from the cell in such - // case. - unit = this.getDialog().getValueOf( 'info', 'htmlHeightType' ) || getCellHeightType( element ); - - if ( !isNaN( value ) ) { - element.setStyle( 'height', value + unit ); + if ( value ) { + selectedCell.setStyle( 'text-align', value ); } else { - element.removeStyle( 'height' ); + selectedCell.removeStyle( 'text-align' ); } - element.removeAttribute( 'height' ); - }, - 'default': '' + selectedCell.removeAttribute( 'align' ); + } }, { type: 'select', - id: 'htmlHeightType', - label: editor.lang.table.heightUnit, - labelStyle: 'visibility:hidden', - 'default': 'px', + id: 'vAlign', + requiredContent: 'td{vertical-align}', + label: langCell.vAlign, + 'default': '', items: [ - [ langTable.widthPx, 'px' ], - [ langTable.widthPc, '%' ] + [ langCommon.notSet, '' ], + [ langCommon.alignTop, 'top' ], + [ langCommon.alignMiddle, 'middle' ], + [ langCommon.alignBottom, 'bottom' ], + [ langCell.alignBaseline, 'baseline' ] ], - setup: setupCells( getCellHeightType ) - } ] - }, - createSpacer( [ 'td{width}', 'td{height}' ] ), - { - type: 'select', - id: 'wordWrap', - requiredContent: 'td{white-space}', - label: langCell.wordWrap, - 'default': 'yes', - items: [ - [ langCell.yes, 'yes' ], - [ langCell.no, 'no' ] - ], - setup: setupCells( function( element ) { - var wordWrapAttr = element.getAttribute( 'noWrap' ), - wordWrapStyle = element.getStyle( 'white-space' ); - - if ( wordWrapStyle == 'nowrap' || wordWrapAttr ) { - return 'no'; - } - } ), - commit: function( element ) { - if ( this.getValue() == 'no' ) { - element.setStyle( 'white-space', 'nowrap' ); - } else { - element.removeStyle( 'white-space' ); - } - - element.removeAttribute( 'noWrap' ); - } - }, - createSpacer( 'td{white-space}' ), - { - type: 'select', - id: 'hAlign', - requiredContent: 'td{text-align}', - label: langCell.hAlign, - 'default': '', - items: [ - [ langCommon.notSet, '' ], - [ langCommon.left, 'left' ], - [ langCommon.center, 'center' ], - [ langCommon.right, 'right' ], - [ langCommon.justify, 'justify' ] - ], - setup: setupCells( function( element ) { - var alignAttr = element.getAttribute( 'align' ), - textAlignStyle = element.getStyle( 'text-align' ); - - return textAlignStyle || alignAttr || ''; - } ), - commit: function( selectedCell ) { - var value = this.getValue(); - - if ( value ) { - selectedCell.setStyle( 'text-align', value ); - } else { - selectedCell.removeStyle( 'text-align' ); - } + setup: setupCells( function( element ) { + var vAlignAttr = element.getAttribute( 'vAlign' ), + vAlignStyle = element.getStyle( 'vertical-align' ); + + switch ( vAlignStyle ) { + // Ignore all other unrelated style values.. + case 'top': + case 'middle': + case 'bottom': + case 'baseline': + break; + default: + vAlignStyle = ''; + } - selectedCell.removeAttribute( 'align' ); - } - }, { - type: 'select', - id: 'vAlign', - requiredContent: 'td{vertical-align}', - label: langCell.vAlign, - 'default': '', - items: [ - [ langCommon.notSet, '' ], - [ langCommon.alignTop, 'top' ], - [ langCommon.alignMiddle, 'middle' ], - [ langCommon.alignBottom, 'bottom' ], - [ langCell.alignBaseline, 'baseline' ] - ], - setup: setupCells( function( element ) { - var vAlignAttr = element.getAttribute( 'vAlign' ), - vAlignStyle = element.getStyle( 'vertical-align' ); - - switch ( vAlignStyle ) { - // Ignore all other unrelated style values.. - case 'top': - case 'middle': - case 'bottom': - case 'baseline': - break; - default: - vAlignStyle = ''; - } + return vAlignStyle || vAlignAttr || ''; + } ), + commit: function( element ) { + var value = this.getValue(); - return vAlignStyle || vAlignAttr || ''; - } ), - commit: function( element ) { - var value = this.getValue(); + if ( value ) { + element.setStyle( 'vertical-align', value ); + } else { + element.removeStyle( 'vertical-align' ); + } - if ( value ) { - element.setStyle( 'vertical-align', value ); - } else { - element.removeStyle( 'vertical-align' ); + element.removeAttribute( 'vAlign' ); } - - element.removeAttribute( 'vAlign' ); - } - }, - createSpacer( [ 'td{text-align}', 'td{vertical-align}' ] ), - { - type: 'select', - id: 'cellType', - requiredContent: 'th', - label: langCell.cellType, - 'default': 'td', - items: [ - [ langCell.data, 'td' ], - [ langCell.header, 'th' ] - ], - setup: setupCells( function( selectedCell ) { - return selectedCell.getName(); - } ), - commit: function( selectedCell ) { - selectedCell.renameNode( this.getValue() ); - } - }, - createSpacer( 'th' ), - { - type: 'text', - id: 'rowSpan', - requiredContent: 'td[rowspan]', - label: langCell.rowSpan, - 'default': '', - validate: validate.integer( langCell.invalidRowSpan ), - setup: setupCells( function( selectedCell ) { - var attrVal = parseInt( selectedCell.getAttribute( 'rowSpan' ), 10 ); - if ( attrVal && attrVal != 1 ) { - return attrVal; - } - } ), - commit: function( selectedCell ) { - var value = parseInt( this.getValue(), 10 ); - if ( value && value != 1 ) { - selectedCell.setAttribute( 'rowSpan', this.getValue() ); - } else { - selectedCell.removeAttribute( 'rowSpan' ); - } - } - }, { - type: 'text', - id: 'colSpan', - requiredContent: 'td[colspan]', - label: langCell.colSpan, - 'default': '', - validate: validate.integer( langCell.invalidColSpan ), - setup: setupCells( function( element ) { - var attrVal = parseInt( element.getAttribute( 'colSpan' ), 10 ); - if ( attrVal && attrVal != 1 ) { - return attrVal; + }, + createSpacer( [ 'td{text-align}', 'td{vertical-align}' ] ), + { + type: 'select', + id: 'cellType', + requiredContent: 'th', + label: langCell.cellType, + 'default': 'td', + items: [ + [ langCell.data, 'td' ], + [ langCell.header, 'th' ] + ], + setup: setupCells( function( selectedCell ) { + return selectedCell.getName(); + } ), + commit: function( selectedCell ) { + selectedCell.renameNode( this.getValue() ); } - } ), - commit: function( selectedCell ) { - var value = parseInt( this.getValue(), 10 ); - if ( value && value != 1 ) { - selectedCell.setAttribute( 'colSpan', this.getValue() ); - } else { - selectedCell.removeAttribute( 'colSpan' ); + }, + createSpacer( 'th' ), + { + type: 'text', + id: 'rowSpan', + requiredContent: 'td[rowspan]', + label: langCell.rowSpan, + 'default': '', + validate: validate.integer( langCell.invalidRowSpan ), + setup: setupCells( function( selectedCell ) { + var attrVal = parseInt( selectedCell.getAttribute( 'rowSpan' ), 10 ); + if ( attrVal && attrVal != 1 ) { + return attrVal; + } + } ), + commit: function( selectedCell ) { + var value = parseInt( this.getValue(), 10 ); + if ( value && value != 1 ) { + selectedCell.setAttribute( 'rowSpan', this.getValue() ); + } else { + selectedCell.removeAttribute( 'rowSpan' ); + } } - } - }, - createSpacer( [ 'td[colspan]', 'td[rowspan]' ] ), - { - type: 'hbox', - padding: 0, - widths: colorDialog ? [ '60%', '40%' ] : [ '100%' ], - requiredContent: 'td{background-color}', - children: ( function() { - var children = [ { - type: 'text', - id: 'bgColor', - label: langCell.bgColor, - 'default': '', - setup: setupCells( function( element ) { - var bgColorAttr = element.getAttribute( 'bgColor' ), - bgColorStyle = element.getStyle( 'background-color' ); - - return bgColorStyle || bgColorAttr; - } ), - commit: function( selectedCell ) { - var value = this.getValue(); - - if ( value ) { - selectedCell.setStyle( 'background-color', this.getValue() ); - } else { - selectedCell.removeStyle( 'background-color' ); - } - - selectedCell.removeAttribute( 'bgColor' ); + }, { + type: 'text', + id: 'colSpan', + requiredContent: 'td[colspan]', + label: langCell.colSpan, + 'default': '', + validate: validate.integer( langCell.invalidColSpan ), + setup: setupCells( function( element ) { + var attrVal = parseInt( element.getAttribute( 'colSpan' ), 10 ); + if ( attrVal && attrVal != 1 ) { + return attrVal; + } + } ), + commit: function( selectedCell ) { + var value = parseInt( this.getValue(), 10 ); + if ( value && value != 1 ) { + selectedCell.setAttribute( 'colSpan', this.getValue() ); + } else { + selectedCell.removeAttribute( 'colSpan' ); } - } ]; - - if ( colorDialog ) { - children.push( { - type: 'button', - id: 'bgColorChoose', - 'class': 'colorChooser', // jshint ignore:line - label: langCell.chooseColor, - onLoad: function() { - // Stick the element to the bottom (https://dev.ckeditor.com/ticket/5587) - this.getElement().getParent().setStyle( 'vertical-align', 'bottom' ); - }, - onClick: function() { - editor.getColorFromDialog( function( color ) { - if ( color ) { - this.getDialog().getContentElement( 'info', 'bgColor' ).setValue( color ); - } - this.focus(); - }, this ); - } - } ); } - return children; - } )() - }, - { - type: 'hbox', - padding: 0, - widths: colorDialog ? [ '60%', '40%' ] : [ '100%' ], - requiredContent: 'td{border-color}', - children: ( function() { - var children = [ { - type: 'text', - id: 'borderColor', - label: langCell.borderColor, - 'default': '', - setup: setupCells( function( element ) { - var borderColorAttr = element.getAttribute( 'borderColor' ), - borderColorStyle = element.getStyle( 'border-color' ); - - return borderColorStyle || borderColorAttr; - } ), - commit: function( selectedCell ) { - var value = this.getValue(); - if ( value ) { - selectedCell.setStyle( 'border-color', this.getValue() ); - } else { - selectedCell.removeStyle( 'border-color' ); + }, + createSpacer( [ 'td[colspan]', 'td[rowspan]' ] ), + { + type: 'hbox', + padding: 0, + widths: colorDialog ? [ '60%', '40%' ] : [ '100%' ], + requiredContent: 'td{background-color}', + children: ( function() { + var children = [ { + type: 'text', + id: 'bgColor', + label: langCell.bgColor, + 'default': '', + setup: setupCells( function( element ) { + var bgColorAttr = element.getAttribute( 'bgColor' ), + bgColorStyle = element.getStyle( 'background-color' ); + + return bgColorStyle || bgColorAttr; + } ), + commit: function( selectedCell ) { + var value = this.getValue(); + + if ( value ) { + selectedCell.setStyle( 'background-color', this.getValue() ); + } else { + selectedCell.removeStyle( 'background-color' ); + } + + selectedCell.removeAttribute( 'bgColor' ); } - - selectedCell.removeAttribute( 'borderColor' ); + } ]; + + if ( colorDialog ) { + children.push( { + type: 'button', + id: 'bgColorChoose', + 'class': 'colorChooser', // jshint ignore:line + label: langCell.chooseColor, + onLoad: function() { + // Stick the element to the bottom (https://dev.ckeditor.com/ticket/5587) + this.getElement().getParent().setStyle( 'vertical-align', 'bottom' ); + }, + onClick: function() { + editor.getColorFromDialog( function( color ) { + if ( color ) { + this.getDialog().getContentElement( 'info', 'bgColor' ).setValue( color ); + } + this.focus(); + }, this ); + } + } ); } - } ]; - - if ( colorDialog ) { - children.push( { - type: 'button', - id: 'borderColorChoose', - 'class': 'colorChooser', // jshint ignore:line - label: langCell.chooseColor, - style: ( rtl ? 'margin-right' : 'margin-left' ) + ': 10px', - onLoad: function() { - // Stick the element to the bottom (https://dev.ckeditor.com/ticket/5587) - this.getElement().getParent().setStyle( 'vertical-align', 'bottom' ); - }, - onClick: function() { - editor.getColorFromDialog( function( color ) { - if ( color ) { - this.getDialog().getContentElement( 'info', 'borderColor' ).setValue( color ); - } - this.focus(); - }, this ); + return children; + } )() + }, + { + type: 'hbox', + padding: 0, + widths: colorDialog ? [ '60%', '40%' ] : [ '100%' ], + requiredContent: 'td{border-color}', + children: ( function() { + var children = [ { + type: 'text', + id: 'borderColor', + label: langCell.borderColor, + 'default': '', + setup: setupCells( function( element ) { + var borderColorAttr = element.getAttribute( 'borderColor' ), + borderColorStyle = element.getStyle( 'border-color' ); + + return borderColorStyle || borderColorAttr; + } ), + commit: function( selectedCell ) { + var value = this.getValue(); + if ( value ) { + selectedCell.setStyle( 'border-color', this.getValue() ); + } else { + selectedCell.removeStyle( 'border-color' ); + } + + selectedCell.removeAttribute( 'borderColor' ); } - } ); - } + } ]; + + if ( colorDialog ) { + children.push( { + type: 'button', + id: 'borderColorChoose', + 'class': 'colorChooser', // jshint ignore:line + label: langCell.chooseColor, + style: ( rtl ? 'margin-right' : 'margin-left' ) + ': 10px', + onLoad: function() { + // Stick the element to the bottom (https://dev.ckeditor.com/ticket/5587) + this.getElement().getParent().setStyle( 'vertical-align', 'bottom' ); + }, + onClick: function() { + editor.getColorFromDialog( function( color ) { + if ( color ) { + this.getDialog().getContentElement( 'info', 'borderColor' ).setValue( color ); + } + this.focus(); + }, this ); + } + } ); + } - return children; - } )() - } ], + return children; + } )() + } + ], itemsCount = 0, index = -1, children = [ createColumn() ]; @@ -527,6 +413,70 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) { }; } + function getCellSizeFieldDefinition( fieldName ) { + return { + requiredContent: 'td{' + fieldName + '}', + type: 'hbox', + widths: [ '70%', '30%' ], + children: [ { + type: 'text', + id: fieldName, + width: '100px', + label: langCommon[ fieldName ], + validate: validate.number( langCell[ 'invalid' + CKEDITOR.tools.capitalize( fieldName ) ] ), + + // Extra labelling of unit type. + onLoad: function() { + var unitType = this.getDialog().getContentElement( 'info', fieldName + 'Type' ), + labelElement = unitType.getElement(), + inputElement = this.getInputElement(), + ariaLabelledByAttr = inputElement.getAttribute( 'aria-labelledby' ); + + inputElement.setAttribute( 'aria-labelledby', [ ariaLabelledByAttr, labelElement.$.id ].join( ' ' ) ); + }, + + setup: setupCells( function( element ) { + var attr = parseInt( element.getAttribute( fieldName ), 10 ), + style = parseInt( element.getStyle( fieldName ), 10 ); + + return !isNaN( style ) ? style : + !isNaN( attr ) ? attr : ''; + } ), + commit: function( element ) { + var value = parseInt( this.getValue(), 10 ), + + // There might be no unit type, i.e. when multiple cells are + // selected but some of them have size expressed in pixels and some + // of them in percent. Try to re-read the unit from the cell in such + // case (https://dev.ckeditor.com/ticket/11439). + unit = this.getDialog().getValueOf( 'info', fieldName + 'Type' ) || + ( fieldName == 'width' ? getCellWidthType( element ) : getCellHeightType( element ) ); + + if ( !isNaN( value ) ) { + element.setStyle( fieldName, value + unit ); + } else { + element.removeStyle( fieldName ); + } + + element.removeAttribute( fieldName ); + }, + 'default': '' + }, { + type: 'select', + id: fieldName + 'Type', + label: editor.lang.table[ fieldName + 'Unit' ], + labelStyle: 'visibility:hidden', + 'default': 'px', + items: [ + // 'widthPx' and 'widthPc' are also used for height to avoid additional translations. + [ langTable.widthPx, 'px' ], + [ langTable.widthPc, '%' ] + ], + setup: setupCells( fieldName == 'width' ? getCellWidthType : getCellHeightType ) + } ] + }; + } + // Returns a function that runs a regular "setup" for all selected cells to find out // whether the initial value of the field would be the same for all cells. If so, // the value is displayed just as if a regular "setup" was executed. Otherwise, diff --git a/tests/plugins/tabletools/cellproperties.js b/tests/plugins/tabletools/cellproperties.js index 51dfe404bd7..5f74e834ee9 100644 --- a/tests/plugins/tabletools/cellproperties.js +++ b/tests/plugins/tabletools/cellproperties.js @@ -144,10 +144,10 @@ 'test load and update field values - same unit and value, change value (#11)': function() { this.doTest( 'table-12', function( dialog ) { assert.areSame( '60', dialog.getValueOf( 'info', 'height' ) ); - assert.areSame( '%', dialog.getValueOf( 'info', 'htmlHeightType' ) ); + assert.areSame( '%', dialog.getValueOf( 'info', 'heightType' ) ); dialog.setValueOf( 'info', 'height', 20 ); - dialog.setValueOf( 'info', 'htmlHeightType', '%' ); + dialog.setValueOf( 'info', 'heightType', '%' ); } ); }, @@ -155,7 +155,7 @@ 'test load and update field values - different unit, same value, change value (#12)': function() { this.doTest( 'table-13', function( dialog ) { assert.areSame( '60', dialog.getValueOf( 'info', 'height' ) ); - assert.areSame( '', dialog.getValueOf( 'info', 'htmlHeightType' ) ); + assert.areSame( '', dialog.getValueOf( 'info', 'heightType' ) ); dialog.setValueOf( 'info', 'height', 20 ); } ); @@ -165,7 +165,7 @@ 'test load and update field values - different unit and value, change value (#13)': function() { this.doTest( 'table-14', function( dialog ) { assert.areSame( '', dialog.getValueOf( 'info', 'height' ) ); - assert.areSame( '', dialog.getValueOf( 'info', 'htmlHeightType' ) ); + assert.areSame( '', dialog.getValueOf( 'info', 'heightType' ) ); dialog.setValueOf( 'info', 'height', 20 ); } ); @@ -175,10 +175,10 @@ 'test load and update field values - different unit and value, change unit and value (#14)': function() { this.doTest( 'table-15', function( dialog ) { assert.areSame( '', dialog.getValueOf( 'info', 'height' ) ); - assert.areSame( '', dialog.getValueOf( 'info', 'htmlHeightType' ) ); + assert.areSame( '', dialog.getValueOf( 'info', 'heightType' ) ); dialog.setValueOf( 'info', 'height', 20 ); - dialog.setValueOf( 'info', 'htmlHeightType', 'px' ); + dialog.setValueOf( 'info', 'heightType', 'px' ); } ); }, @@ -194,7 +194,7 @@ bot.dialog( 'cellProperties', function( dialog ) { assert.isUndefined( dialog.getContentElement( 'info', 'width' ) ); assert.isUndefined( dialog.getContentElement( 'info', 'height' ) ); - assert.isUndefined( dialog.getContentElement( 'info', 'htmlHeightType' ) ); + assert.isUndefined( dialog.getContentElement( 'info', 'heightType' ) ); } ); } ); }, @@ -208,7 +208,7 @@ bot.dialog( 'cellProperties', function( dialog ) { assert.isTrue( dialog.getContentElement( 'info', 'width' ).isVisible() ); assert.isTrue( dialog.getContentElement( 'info', 'height' ).isVisible() ); - assert.isTrue( dialog.getContentElement( 'info', 'htmlHeightType' ).isVisible() ); + assert.isTrue( dialog.getContentElement( 'info', 'heightType' ).isVisible() ); } ); } ); }, From 455ecd5023cbbb428473d61369941bf21ae9114c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Tue, 14 May 2019 08:58:33 +0200 Subject: [PATCH 13/32] Allow floating point width and height values. --- plugins/tabletools/dialogs/tableCell.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/tabletools/dialogs/tableCell.js b/plugins/tabletools/dialogs/tableCell.js index 22ddfcdbc3d..4fb4fd509ab 100644 --- a/plugins/tabletools/dialogs/tableCell.js +++ b/plugins/tabletools/dialogs/tableCell.js @@ -436,14 +436,14 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) { }, setup: setupCells( function( element ) { - var attr = parseInt( element.getAttribute( fieldName ), 10 ), - style = parseInt( element.getStyle( fieldName ), 10 ); + var attr = parseFloat( element.getAttribute( fieldName ), 10 ), + style = parseFloat( element.getStyle( fieldName ), 10 ); return !isNaN( style ) ? style : !isNaN( attr ) ? attr : ''; } ), commit: function( element ) { - var value = parseInt( this.getValue(), 10 ), + var value = parseFloat( this.getValue(), 10 ), // There might be no unit type, i.e. when multiple cells are // selected but some of them have size expressed in pixels and some From 60ad687689661153e7079362da43a676aa151403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Tue, 14 May 2019 09:17:41 +0200 Subject: [PATCH 14/32] Refactor two attribute reading functions into one. --- plugins/tabletools/dialogs/tableCell.js | 33 +++++++++---------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/plugins/tabletools/dialogs/tableCell.js b/plugins/tabletools/dialogs/tableCell.js index 4fb4fd509ab..45b7416f9f8 100644 --- a/plugins/tabletools/dialogs/tableCell.js +++ b/plugins/tabletools/dialogs/tableCell.js @@ -8,7 +8,6 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) { langCell = langTable.cell, langCommon = editor.lang.common, validate = CKEDITOR.dialog.validate, - widthPattern = /^(\d+(?:\.\d+)?)(px|%)$/, rtl = editor.lang.dir == 'rtl', colorDialog = editor.plugins.colordialog, items = [ @@ -449,8 +448,7 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) { // selected but some of them have size expressed in pixels and some // of them in percent. Try to re-read the unit from the cell in such // case (https://dev.ckeditor.com/ticket/11439). - unit = this.getDialog().getValueOf( 'info', fieldName + 'Type' ) || - ( fieldName == 'width' ? getCellWidthType( element ) : getCellHeightType( element ) ); + unit = this.getDialog().getValueOf( 'info', fieldName + 'Type' ) || getCellSizeUnitType( element, fieldName ); if ( !isNaN( value ) ) { element.setStyle( fieldName, value + unit ); @@ -472,7 +470,9 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) { [ langTable.widthPx, 'px' ], [ langTable.widthPc, '%' ] ], - setup: setupCells( fieldName == 'width' ? getCellWidthType : getCellHeightType ) + setup: setupCells( function( element ) { + return getCellSizeUnitType( element, fieldName ); + } ) } ] }; } @@ -513,26 +513,15 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) { }; } - // Reads the unit of width property of the table cell. - // - // * @param {CKEDITOR.dom.element} cell An element representing the table cell. - // * @returns {String} A unit of width: 'px', '%' or undefined if none. - function getCellWidthType( cell ) { - var match = widthPattern.exec( - cell.getStyle( 'width' ) || cell.getAttribute( 'width' ) ); - - if ( match ) { - return match[ 2 ]; - } - } - - // Reads the unit of height property of the table cell. + // Reads the unit of target property of the table cell. // // * @param {CKEDITOR.dom.element} cell An element representing the table cell. - // * @returns {String} A unit of width: 'px', '%' or undefined if none. - function getCellHeightType( cell ) { - var match = widthPattern.exec( - cell.getStyle( 'height' ) || cell.getAttribute( 'height' ) ); + // * @returns {String} Current unit: 'px', '%' or undefined if none. + function getCellSizeUnitType( cell, field ) { + var unitPattern = /^(\d+(?:\.\d+)?)(px|%)$/, + match = unitPattern.exec( + cell.getStyle( field ) || cell.getAttribute( field ) + ); if ( match ) { return match[ 2 ]; From feca523370143214dd07786bc0cf3ad2c64abb15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Tue, 14 May 2019 09:54:34 +0200 Subject: [PATCH 15/32] Refactor unit tests. --- .../tabletools/_helpers/cellproperties.js | 37 +++++ tests/plugins/tabletools/cellproperties.js | 147 ++++++------------ 2 files changed, 84 insertions(+), 100 deletions(-) create mode 100644 tests/plugins/tabletools/_helpers/cellproperties.js diff --git a/tests/plugins/tabletools/_helpers/cellproperties.js b/tests/plugins/tabletools/_helpers/cellproperties.js new file mode 100644 index 00000000000..bb8292b7604 --- /dev/null +++ b/tests/plugins/tabletools/_helpers/cellproperties.js @@ -0,0 +1,37 @@ +/* exported doTest, assertChildren */ + +function doTest( name, dialogCallback ) { + return function() { + var bot = this.editorBot; + + bender.tools.testInputOut( name, function( source, expected ) { + bot.setHtmlWithSelection( source ); + + bot.dialog( 'cellProperties', function( dialog ) { + try { + if ( dialogCallback ) { + dialogCallback( dialog ); + } + + dialog.getButton( 'ok' ).click(); + } catch ( e ) { + throw e; + } finally { + dialog.hide(); + } + + assert.areSame( bender.tools.compatHtml( expected ), bot.getData( true ) ); + } ); + } ); + }; +} + +function assertChildren( children ) { + CKEDITOR.tools.array.forEach( children, function( item ) { + if ( item && item.children ) { + assertChildren( item.children ); + } else { + assert.isObject( item ); + } + } ); +} diff --git a/tests/plugins/tabletools/cellproperties.js b/tests/plugins/tabletools/cellproperties.js index 5f74e834ee9..88188c0938c 100644 --- a/tests/plugins/tabletools/cellproperties.js +++ b/tests/plugins/tabletools/cellproperties.js @@ -1,5 +1,7 @@ /* bender-tags: editor */ /* bender-ckeditor-plugins: entities,dialog,tabletools,toolbar */ +/* bender-include: ./_helpers/cellproperties.js */ +/* global doTest, assertChildren */ ( function() { 'use strict'; @@ -7,76 +9,39 @@ bender.editor = true; bender.test( { - doTest: function( name, dialogCallback ) { - var bot = this.editorBot; - bender.tools.testInputOut( name, function( source, expected ) { - bot.setHtmlWithSelection( source ); - - bot.dialog( 'cellProperties', function( dialog ) { - try { - if ( dialogCallback ) { - dialogCallback( dialog ); - } - - dialog.getButton( 'ok' ).click(); - } catch ( e ) { - throw e; - } finally { - dialog.hide(); - } - - assert.areSame( bender.tools.compatHtml( expected ), bot.getData( true ) ); - } ); - } ); - }, - - tearDown: function() { - var dialog = CKEDITOR.dialog.getCurrent(); - - if ( dialog ) { - dialog.hide(); - } - }, - - 'test cell properties dialog (text selection)': function() { - this.doTest( 'table-1', function( dialog ) { + 'test cell properties dialog (text selection)': doTest( 'table-1', function( dialog ) { dialog.setValueOf( 'info', 'width', 100 ); dialog.setValueOf( 'info', 'height', 50 ); - } ); - }, + } + ), // https://dev.ckeditor.com/ticket/11439 - 'test load and update field values (#1)': function() { - this.doTest( 'table-2', function( dialog ) { + 'test load and update field values (#1)': doTest( 'table-2', function( dialog ) { assert.areSame( '', dialog.getValueOf( 'info', 'rowSpan' ) ); - } ); - }, + } + ), // https://dev.ckeditor.com/ticket/11439 - 'test load and update field values (#2)': function() { - this.doTest( 'table-3', function( dialog ) { + 'test load and update field values (#2)': doTest( 'table-3', function( dialog ) { assert.areSame( '', dialog.getValueOf( 'info', 'rowSpan' ) ); - } ); - }, + } + ), // https://dev.ckeditor.com/ticket/11439 - 'test load and update field values (#3)': function() { - this.doTest( 'table-4', function( dialog ) { + 'test load and update field values (#3)': doTest( 'table-4', function( dialog ) { assert.areSame( '', dialog.getValueOf( 'info', 'colSpan' ) ); - } ); - }, + } + ), // https://dev.ckeditor.com/ticket/11439 - 'test load and update field values (#4)': function() { - this.doTest( 'table-5', function( dialog ) { + 'test load and update field values (#4)': doTest( 'table-5', function( dialog ) { assert.areSame( '', dialog.getValueOf( 'info', 'colSpan' ) ); - } ); - }, + } + ), // https://dev.ckeditor.com/ticket/11439 - 'test load and update field values (#5)': function() { - this.doTest( 'table-6', function( dialog ) { + 'test load and update field values (#5)': doTest( 'table-6', function( dialog ) { assert.areSame( '', dialog.getValueOf( 'info', 'height' ) ); assert.areSame( 'px', dialog.getValueOf( 'info', 'widthType' ) ); assert.areSame( '', dialog.getValueOf( 'info', 'wordWrap' ) ); @@ -85,102 +50,93 @@ dialog.setValueOf( 'info', 'width', 100 ); dialog.setValueOf( 'info', 'bgColor', 'red' ); dialog.setValueOf( 'info', 'hAlign', 'right' ); - } ); - }, + } + ), // https://dev.ckeditor.com/ticket/11439 - 'test load and update field values (#6)': function() { - this.doTest( 'table-7', function( dialog ) { + 'test load and update field values (#6)': doTest( 'table-7', function( dialog ) { assert.areSame( '50', dialog.getValueOf( 'info', 'width' ) ); assert.areSame( 'px', dialog.getValueOf( 'info', 'widthType' ) ); dialog.setValueOf( 'info', 'width', 20 ); - } ); - }, + } + ), // https://dev.ckeditor.com/ticket/11439 - 'test load and update field values (#7)': function() { - this.doTest( 'table-8', function( dialog ) { + 'test load and update field values (#7)': doTest( 'table-8', function( dialog ) { assert.areSame( '50', dialog.getValueOf( 'info', 'width' ) ); assert.areSame( '', dialog.getValueOf( 'info', 'widthType' ) ); dialog.setValueOf( 'info', 'width', 20 ); - } ); - }, + } + ), // https://dev.ckeditor.com/ticket/11439 - 'test load and update field values (#8)': function() { - this.doTest( 'table-9', function( dialog ) { + 'test load and update field values (#8)': doTest( 'table-9', function( dialog ) { assert.areSame( '', dialog.getValueOf( 'info', 'cellType' ) ); assert.areSame( 'red', dialog.getValueOf( 'info', 'bgColor' ) ); dialog.setValueOf( 'info', 'cellType', 'td' ); dialog.setValueOf( 'info', 'bgColor', 'green' ); - } ); - }, + } + ), // https://dev.ckeditor.com/ticket/11439 - 'test load and update field values (#9)': function() { - this.doTest( 'table-10', function( dialog ) { + 'test load and update field values (#9)': doTest( 'table-10', function( dialog ) { assert.areSame( '', dialog.getValueOf( 'info', 'width' ) ); assert.areSame( '', dialog.getValueOf( 'info', 'widthType' ) ); dialog.setValueOf( 'info', 'width', 10 ); - } ); - }, + } + ), // https://dev.ckeditor.com/ticket/11439 - 'test load and update field values (#10)': function() { - this.doTest( 'table-11', function( dialog ) { + 'test load and update field values (#10)': doTest( 'table-11', function( dialog ) { assert.areSame( '', dialog.getValueOf( 'info', 'width' ) ); assert.areSame( '', dialog.getValueOf( 'info', 'widthType' ) ); dialog.setValueOf( 'info', 'width', 10 ); dialog.setValueOf( 'info', 'widthType', 'px' ); - } ); - }, + } + ), // (#2084) - 'test load and update field values - same unit and value, change value (#11)': function() { - this.doTest( 'table-12', function( dialog ) { + 'test load and update field values - same unit and value, change value (#11)': doTest( 'table-12', function( dialog ) { assert.areSame( '60', dialog.getValueOf( 'info', 'height' ) ); assert.areSame( '%', dialog.getValueOf( 'info', 'heightType' ) ); dialog.setValueOf( 'info', 'height', 20 ); dialog.setValueOf( 'info', 'heightType', '%' ); - } ); - }, + } + ), // (#2084) - 'test load and update field values - different unit, same value, change value (#12)': function() { - this.doTest( 'table-13', function( dialog ) { + 'test load and update field values - different unit, same value, change value (#12)': doTest( 'table-13', function( dialog ) { assert.areSame( '60', dialog.getValueOf( 'info', 'height' ) ); assert.areSame( '', dialog.getValueOf( 'info', 'heightType' ) ); dialog.setValueOf( 'info', 'height', 20 ); - } ); - }, + } + ), // (#2084) - 'test load and update field values - different unit and value, change value (#13)': function() { - this.doTest( 'table-14', function( dialog ) { + 'test load and update field values - different unit and value, change value (#13)': doTest( 'table-14', function( dialog ) { assert.areSame( '', dialog.getValueOf( 'info', 'height' ) ); assert.areSame( '', dialog.getValueOf( 'info', 'heightType' ) ); dialog.setValueOf( 'info', 'height', 20 ); - } ); - }, + } + ), // (#2084) - 'test load and update field values - different unit and value, change unit and value (#14)': function() { - this.doTest( 'table-15', function( dialog ) { + 'test load and update field values - different unit and value, change unit and value (#14)': doTest( 'table-15', function( dialog ) { assert.areSame( '', dialog.getValueOf( 'info', 'height' ) ); assert.areSame( '', dialog.getValueOf( 'info', 'heightType' ) ); dialog.setValueOf( 'info', 'height', 20 ); dialog.setValueOf( 'info', 'heightType', 'px' ); - } ); - }, + } + ), // https://dev.ckeditor.com/ticket/16893 'test allowedContent rule': function() { @@ -271,13 +227,4 @@ } } ); - function assertChildren( children ) { - CKEDITOR.tools.array.forEach( children, function( item ) { - if ( item && item.children ) { - assertChildren( item.children ); - } else { - assert.isObject( item ); - } - } ); - } } )(); From 9b49ddf94ff1198cf831079c6bb0852938c65dc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Tue, 14 May 2019 09:59:23 +0200 Subject: [PATCH 16/32] Correct changelog entry. --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 5d2046bfc4b..0182bd46932 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,7 +10,7 @@ New Features: * [#2639](https://github.com/ckeditor/ckeditor-dev/issues/2639): [Color Dialog](https://ckeditor.com/cke4/addon/colordialog) plugin now shows current selection's color when opened. * [#1490](https://github.com/ckeditor/ckeditor-dev/issues/1490): Improved [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin to retain table cell borders. * [#2870](https://github.com/ckeditor/ckeditor-dev/issues/2870): Added support for preserving positive `margin-left` values in list items for lists pasted with [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. -* [#2084](https://github.com/ckeditor/ckeditor-dev/issues/2084): [Table Tools plugin](https://ckeditor.com/cke4/addon/table) now allows to change cell height unit type to either pixels or percents. +* [#2084](https://github.com/ckeditor/ckeditor-dev/issues/2084): [Table Tools plugin](https://ckeditor.com/cke4/addon/tabletools) now allows to change cell height unit type to either pixels or percents. Fixed Issues: From 1f9f2c2044558e62af26dc03e997c9d0a3923c48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Mon, 20 May 2019 13:23:29 +0200 Subject: [PATCH 17/32] Refactor ternary for readability. --- plugins/tabletools/dialogs/tableCell.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/tabletools/dialogs/tableCell.js b/plugins/tabletools/dialogs/tableCell.js index 45b7416f9f8..8a176998800 100644 --- a/plugins/tabletools/dialogs/tableCell.js +++ b/plugins/tabletools/dialogs/tableCell.js @@ -438,8 +438,13 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) { var attr = parseFloat( element.getAttribute( fieldName ), 10 ), style = parseFloat( element.getStyle( fieldName ), 10 ); - return !isNaN( style ) ? style : - !isNaN( attr ) ? attr : ''; + if ( !isNaN( style ) ) { + return style; + } else if ( !isNaN( attr ) ) { + return attr; + } else { + return; + } } ), commit: function( element ) { var value = parseFloat( this.getValue(), 10 ), From 9366782dd63e02ffadf6ad864252fbf6e806b27b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Mon, 20 May 2019 13:32:20 +0200 Subject: [PATCH 18/32] Change manual test formatting for readability. --- tests/plugins/tabletools/manual/cellheight.md | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/tests/plugins/tabletools/manual/cellheight.md b/tests/plugins/tabletools/manual/cellheight.md index 49abc1653a1..f1881642c3a 100644 --- a/tests/plugins/tabletools/manual/cellheight.md +++ b/tests/plugins/tabletools/manual/cellheight.md @@ -2,22 +2,32 @@ @bender-ui: collapsed @bender-ckeditor-plugins: wysiwygarea, toolbar, table, tabletools, undo -## Test scenario - 1. Open the cell properties dialog. -#### Expected: + #### Expected: + + Cell height unit is changeable (pixels or percents). -Cell height unit is changeable (pixels or percents). + #### Unexpected: + + Cell height unit is not changeable. 2. Change cell height to 20px. -#### Expected: + #### Expected: + + First row is lower than second one. -First row is lower than second one. + #### Unexpected: + + Row height didn't change. 3. Change cell height to 70 percent. -#### Expected: + #### Expected: + + First row is higher than second one. + + #### Unexpected: -First row is higher than second one. + Row height didn't change. From b797a79ba65950e023f17d457c30e06bcce07f73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Mon, 20 May 2019 13:37:33 +0200 Subject: [PATCH 19/32] Ignore manual test for mobile devices as it uses context menu. --- tests/plugins/tabletools/manual/cellheight.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/plugins/tabletools/manual/cellheight.html b/tests/plugins/tabletools/manual/cellheight.html index b6746ad609d..5cca4be25aa 100644 --- a/tests/plugins/tabletools/manual/cellheight.html +++ b/tests/plugins/tabletools/manual/cellheight.html @@ -14,5 +14,8 @@ From f9ace0419fb114e2088cedcff8759e7395db0882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Mon, 20 May 2019 13:48:06 +0200 Subject: [PATCH 20/32] Add 'heightUnit' label to language files. --- plugins/table/lang/af.js | 1 + plugins/table/lang/ar.js | 1 + plugins/table/lang/az.js | 1 + plugins/table/lang/bg.js | 1 + plugins/table/lang/bn.js | 1 + plugins/table/lang/bs.js | 1 + plugins/table/lang/ca.js | 1 + plugins/table/lang/cs.js | 1 + plugins/table/lang/cy.js | 1 + plugins/table/lang/da.js | 1 + plugins/table/lang/de-ch.js | 1 + plugins/table/lang/de.js | 1 + plugins/table/lang/el.js | 1 + plugins/table/lang/en-au.js | 1 + plugins/table/lang/en-ca.js | 1 + plugins/table/lang/en-gb.js | 1 + plugins/table/lang/en.js | 1 + plugins/table/lang/eo.js | 1 + plugins/table/lang/es-mx.js | 1 + plugins/table/lang/es.js | 1 + plugins/table/lang/et.js | 1 + plugins/table/lang/eu.js | 1 + plugins/table/lang/fa.js | 1 + plugins/table/lang/fi.js | 1 + plugins/table/lang/fo.js | 1 + plugins/table/lang/fr-ca.js | 1 + plugins/table/lang/fr.js | 1 + plugins/table/lang/gl.js | 1 + plugins/table/lang/gu.js | 1 + plugins/table/lang/he.js | 1 + plugins/table/lang/hi.js | 1 + plugins/table/lang/hr.js | 1 + plugins/table/lang/hu.js | 1 + plugins/table/lang/id.js | 1 + plugins/table/lang/is.js | 1 + plugins/table/lang/it.js | 1 + plugins/table/lang/ja.js | 1 + plugins/table/lang/ka.js | 1 + plugins/table/lang/km.js | 1 + plugins/table/lang/ko.js | 1 + plugins/table/lang/ku.js | 1 + plugins/table/lang/lt.js | 1 + plugins/table/lang/lv.js | 1 + plugins/table/lang/mk.js | 1 + plugins/table/lang/mn.js | 1 + plugins/table/lang/ms.js | 1 + plugins/table/lang/nb.js | 1 + plugins/table/lang/nl.js | 1 + plugins/table/lang/no.js | 1 + plugins/table/lang/oc.js | 1 + plugins/table/lang/pl.js | 1 + plugins/table/lang/pt-br.js | 1 + plugins/table/lang/pt.js | 1 + plugins/table/lang/ro.js | 1 + plugins/table/lang/ru.js | 1 + plugins/table/lang/si.js | 1 + plugins/table/lang/sk.js | 1 + plugins/table/lang/sl.js | 1 + plugins/table/lang/sq.js | 1 + plugins/table/lang/sr-latn.js | 1 + plugins/table/lang/sr.js | 1 + plugins/table/lang/sv.js | 1 + plugins/table/lang/th.js | 1 + plugins/table/lang/tr.js | 1 + plugins/table/lang/tt.js | 1 + plugins/table/lang/ug.js | 1 + plugins/table/lang/uk.js | 1 + plugins/table/lang/vi.js | 1 + plugins/table/lang/zh-cn.js | 1 + plugins/table/lang/zh.js | 1 + 70 files changed, 70 insertions(+) diff --git a/plugins/table/lang/af.js b/plugins/table/lang/af.js index 1b943e476b6..39015322911 100644 --- a/plugins/table/lang/af.js +++ b/plugins/table/lang/af.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'af', { headersColumn: 'Eerste kolom', headersNone: 'Geen', headersRow: 'Eerste ry', + heightUnit: 'height unit', // MISSING invalidBorder: 'Randbreedte moet \'n getal wees.', invalidCellPadding: 'Sel-spasie moet \'n getal wees.', invalidCellSpacing: 'Sel-afstand moet \'n getal wees.', diff --git a/plugins/table/lang/ar.js b/plugins/table/lang/ar.js index e9218cebb5d..bdb5fba8fd9 100644 --- a/plugins/table/lang/ar.js +++ b/plugins/table/lang/ar.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'ar', { headersColumn: 'العمود الأول', headersNone: 'بدون', headersRow: 'الصف الأول', + heightUnit: 'height unit', // MISSING invalidBorder: 'حجم الحد يجب أن يكون عدداً.', invalidCellPadding: 'المسافة البادئة يجب أن تكون عدداً', invalidCellSpacing: 'المسافة بين الخلايا يجب أن تكون عدداً.', diff --git a/plugins/table/lang/az.js b/plugins/table/lang/az.js index 65581a94248..b014705e4bc 100644 --- a/plugins/table/lang/az.js +++ b/plugins/table/lang/az.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'az', { headersColumn: 'Birinci sütun', headersNone: 'yox', headersRow: 'Birinci sətir', + heightUnit: 'height unit', // MISSING invalidBorder: 'Sərhədlərin eni müsbət rəqəm olmalıdır.', invalidCellPadding: 'Xanalardakı kənar boşluqlar müsbət rəqəm olmalıdır.', invalidCellSpacing: 'Xanalararası interval müsbət rəqəm olmalıdır.', diff --git a/plugins/table/lang/bg.js b/plugins/table/lang/bg.js index e4c19c33913..adc77f0261a 100644 --- a/plugins/table/lang/bg.js +++ b/plugins/table/lang/bg.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'bg', { headersColumn: 'Първа колона', headersNone: 'Няма', headersRow: 'Първи ред', + heightUnit: 'height unit', // MISSING invalidBorder: 'Размерът на рамката трябва да е число.', invalidCellPadding: 'Отстоянието на клетките трябва да е положително число.', invalidCellSpacing: 'Интервалът в клетките трябва да е положително число.', diff --git a/plugins/table/lang/bn.js b/plugins/table/lang/bn.js index 886224fd81c..4702d7b7c9e 100644 --- a/plugins/table/lang/bn.js +++ b/plugins/table/lang/bn.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'bn', { headersColumn: 'First column', // MISSING headersNone: 'None', headersRow: 'First Row', // MISSING + heightUnit: 'height unit', // MISSING invalidBorder: 'Border size must be a number.', // MISSING invalidCellPadding: 'Cell padding must be a positive number.', // MISSING invalidCellSpacing: 'Cell spacing must be a positive number.', // MISSING diff --git a/plugins/table/lang/bs.js b/plugins/table/lang/bs.js index 59c8ba3e837..4b8886f483c 100644 --- a/plugins/table/lang/bs.js +++ b/plugins/table/lang/bs.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'bs', { headersColumn: 'First column', // MISSING headersNone: 'None', headersRow: 'First Row', // MISSING + heightUnit: 'height unit', // MISSING invalidBorder: 'Border size must be a number.', // MISSING invalidCellPadding: 'Cell padding must be a positive number.', // MISSING invalidCellSpacing: 'Cell spacing must be a positive number.', // MISSING diff --git a/plugins/table/lang/ca.js b/plugins/table/lang/ca.js index d8d3a58a920..2920e3bc320 100644 --- a/plugins/table/lang/ca.js +++ b/plugins/table/lang/ca.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'ca', { headersColumn: 'Primera columna', headersNone: 'Cap', headersRow: 'Primera fila', + heightUnit: 'height unit', // MISSING invalidBorder: 'El gruix de la vora ha de ser un nombre.', invalidCellPadding: 'L\'encoixinament de cel·la ha de ser un nombre.', invalidCellSpacing: 'L\'espaiat de cel·la ha de ser un nombre.', diff --git a/plugins/table/lang/cs.js b/plugins/table/lang/cs.js index 843e34d3d99..b10c77050be 100644 --- a/plugins/table/lang/cs.js +++ b/plugins/table/lang/cs.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'cs', { headersColumn: 'První sloupec', headersNone: 'Žádné', headersRow: 'První řádek', + heightUnit: 'height unit', // MISSING invalidBorder: 'Zdaná velikost okraje musí být číselná.', invalidCellPadding: 'Zadané odsazení obsahu v buňce musí být číselné.', invalidCellSpacing: 'Zadaná vzdálenost buněk musí být číselná.', diff --git a/plugins/table/lang/cy.js b/plugins/table/lang/cy.js index b6e7670ef7d..0eb00fdfa6d 100644 --- a/plugins/table/lang/cy.js +++ b/plugins/table/lang/cy.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'cy', { headersColumn: 'Colofn gyntaf', headersNone: 'Dim', headersRow: 'Rhes gyntaf', + heightUnit: 'height unit', // MISSING invalidBorder: 'Mae\'n rhaid i faint yr ymyl fod yn rhif.', invalidCellPadding: 'Mae\'n rhaid i badiad y gell fod yn rhif positif.', invalidCellSpacing: 'Mae\'n rhaid i fylchiad y gell fod yn rhif positif.', diff --git a/plugins/table/lang/da.js b/plugins/table/lang/da.js index 90fdf72dd6c..ecd5b7d96b0 100644 --- a/plugins/table/lang/da.js +++ b/plugins/table/lang/da.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'da', { headersColumn: 'Første kolonne', headersNone: 'Ingen', headersRow: 'Første række', + heightUnit: 'height unit', // MISSING invalidBorder: 'Rammetykkelse skal være et tal.', invalidCellPadding: 'Cellemargen skal være et tal.', invalidCellSpacing: 'Celleafstand skal være et tal.', diff --git a/plugins/table/lang/de-ch.js b/plugins/table/lang/de-ch.js index 639a35ade77..7a1f5b955c3 100644 --- a/plugins/table/lang/de-ch.js +++ b/plugins/table/lang/de-ch.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'de-ch', { headersColumn: 'Erste Spalte', headersNone: 'Keine', headersRow: 'Erste Zeile', + heightUnit: 'height unit', // MISSING invalidBorder: 'Die Rahmenbreite muss eine Zahl sein.', invalidCellPadding: 'Der Zellenabstand innen muss eine positive Zahl sein.', invalidCellSpacing: 'Der Zellenabstand aussen muss eine positive Zahl sein.', diff --git a/plugins/table/lang/de.js b/plugins/table/lang/de.js index a8967687bef..f9d221dbb75 100644 --- a/plugins/table/lang/de.js +++ b/plugins/table/lang/de.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'de', { headersColumn: 'Erste Spalte', headersNone: 'Keine', headersRow: 'Erste Zeile', + heightUnit: 'height unit', // MISSING invalidBorder: 'Die Rahmenbreite muß eine Zahl sein.', invalidCellPadding: 'Der Zellenabstand innen muß eine positive Zahl sein.', invalidCellSpacing: 'Der Zellenabstand außen muß eine positive Zahl sein.', diff --git a/plugins/table/lang/el.js b/plugins/table/lang/el.js index 51c31452ae4..0d8d6144d20 100644 --- a/plugins/table/lang/el.js +++ b/plugins/table/lang/el.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'el', { headersColumn: 'Πρώτη στήλη', headersNone: 'Κανένα', headersRow: 'Πρώτη Γραμμή', + heightUnit: 'height unit', // MISSING invalidBorder: 'Το πάχος του περιγράμματος πρέπει να είναι ένας αριθμός.', invalidCellPadding: 'Η αναπλήρωση των κελιών πρέπει να είναι θετικός αριθμός.', invalidCellSpacing: 'Η απόσταση μεταξύ των κελιών πρέπει να είναι ένας θετικός αριθμός.', diff --git a/plugins/table/lang/en-au.js b/plugins/table/lang/en-au.js index de461da7f8a..10f4a9d9678 100644 --- a/plugins/table/lang/en-au.js +++ b/plugins/table/lang/en-au.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'en-au', { headersColumn: 'First column', headersNone: 'None', headersRow: 'First Row', + heightUnit: 'height unit', // MISSING invalidBorder: 'Border size must be a number.', invalidCellPadding: 'Cell padding must be a number.', invalidCellSpacing: 'Cell spacing must be a number.', diff --git a/plugins/table/lang/en-ca.js b/plugins/table/lang/en-ca.js index 258d330f0bc..20f4cfa1b04 100644 --- a/plugins/table/lang/en-ca.js +++ b/plugins/table/lang/en-ca.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'en-ca', { headersColumn: 'First column', headersNone: 'None', headersRow: 'First Row', + heightUnit: 'height unit', // MISSING invalidBorder: 'Border size must be a number.', invalidCellPadding: 'Cell padding must be a number.', invalidCellSpacing: 'Cell spacing must be a number.', diff --git a/plugins/table/lang/en-gb.js b/plugins/table/lang/en-gb.js index 2b4d3aa097d..f06fff4652d 100644 --- a/plugins/table/lang/en-gb.js +++ b/plugins/table/lang/en-gb.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'en-gb', { headersColumn: 'First column', headersNone: 'None', headersRow: 'First Row', + heightUnit: 'height unit', // MISSING invalidBorder: 'Border size must be a number.', invalidCellPadding: 'Cell padding must be a number.', invalidCellSpacing: 'Cell spacing must be a number.', diff --git a/plugins/table/lang/en.js b/plugins/table/lang/en.js index 0281b7ea3ac..8645721f0bb 100644 --- a/plugins/table/lang/en.js +++ b/plugins/table/lang/en.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'en', { headersColumn: 'First column', headersNone: 'None', headersRow: 'First Row', + heightUnit: 'height unit', invalidBorder: 'Border size must be a number.', invalidCellPadding: 'Cell padding must be a positive number.', invalidCellSpacing: 'Cell spacing must be a positive number.', diff --git a/plugins/table/lang/eo.js b/plugins/table/lang/eo.js index 936036096cc..a5241f0670c 100644 --- a/plugins/table/lang/eo.js +++ b/plugins/table/lang/eo.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'eo', { headersColumn: 'Unua kolumno', headersNone: 'Neniu', headersRow: 'Unua linio', + heightUnit: 'height unit', // MISSING invalidBorder: 'La bordergrando devas esti nombro.', invalidCellPadding: 'La interna marĝeno en la ĉeloj devas esti pozitiva nombro.', invalidCellSpacing: 'La spaco inter la ĉeloj devas esti pozitiva nombro.', diff --git a/plugins/table/lang/es-mx.js b/plugins/table/lang/es-mx.js index a9675d45e00..6f9f0cb0799 100644 --- a/plugins/table/lang/es-mx.js +++ b/plugins/table/lang/es-mx.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'es-mx', { headersColumn: 'Primera columna', headersNone: 'Ninguna', headersRow: 'Primera fila', + heightUnit: 'height unit', // MISSING invalidBorder: 'El tamaño del borde debe ser un número entero.', invalidCellPadding: 'El relleno de la celda debe ser un número positivo.', invalidCellSpacing: 'El espacio de la celda debe ser un número positivo.', diff --git a/plugins/table/lang/es.js b/plugins/table/lang/es.js index c58fa48b955..b2b962eb89e 100644 --- a/plugins/table/lang/es.js +++ b/plugins/table/lang/es.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'es', { headersColumn: 'Primera columna', headersNone: 'Ninguno', headersRow: 'Primera fila', + heightUnit: 'height unit', // MISSING invalidBorder: 'El tamaño del borde debe ser un número.', invalidCellPadding: 'El espaciado interior debe ser un número.', invalidCellSpacing: 'El espaciado entre celdas debe ser un número.', diff --git a/plugins/table/lang/et.js b/plugins/table/lang/et.js index 5223252cbe3..0b7b11d1fe9 100644 --- a/plugins/table/lang/et.js +++ b/plugins/table/lang/et.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'et', { headersColumn: 'Esimene tulp', headersNone: 'Puudub', headersRow: 'Esimene rida', + heightUnit: 'height unit', // MISSING invalidBorder: 'Äärise suurus peab olema number.', invalidCellPadding: 'Lahtrite polsterdus (padding) peab olema positiivne arv.', invalidCellSpacing: 'Lahtrite vahe peab olema positiivne arv.', diff --git a/plugins/table/lang/eu.js b/plugins/table/lang/eu.js index 63909a51e0e..0baa30e7896 100644 --- a/plugins/table/lang/eu.js +++ b/plugins/table/lang/eu.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'eu', { headersColumn: 'Lehen zutabea', headersNone: 'Bat ere ez', headersRow: 'Lehen errenkada', + heightUnit: 'height unit', // MISSING invalidBorder: 'Ertzaren tamaina zenbaki bat izan behar da.', invalidCellPadding: 'Gelaxken betegarria zenbaki bat izan behar da.', invalidCellSpacing: 'Gelaxka arteko tartea zenbaki bat izan behar da.', diff --git a/plugins/table/lang/fa.js b/plugins/table/lang/fa.js index f5d96e099fc..60abeedbfed 100644 --- a/plugins/table/lang/fa.js +++ b/plugins/table/lang/fa.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'fa', { headersColumn: 'اولین ستون', headersNone: 'هیچ', headersRow: 'اولین ردیف', + heightUnit: 'height unit', // MISSING invalidBorder: 'مقدار اندازه خطوط باید یک عدد باشد.', invalidCellPadding: 'بالشتک سلول باید یک عدد باشد.', invalidCellSpacing: 'مقدار فاصلهگذاری سلول باید یک عدد باشد.', diff --git a/plugins/table/lang/fi.js b/plugins/table/lang/fi.js index a6528b6e4d4..3671c688f41 100644 --- a/plugins/table/lang/fi.js +++ b/plugins/table/lang/fi.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'fi', { headersColumn: 'Ensimmäinen sarake', headersNone: 'Ei', headersRow: 'Ensimmäinen rivi', + heightUnit: 'height unit', // MISSING invalidBorder: 'Reunan koon täytyy olla numero.', invalidCellPadding: 'Solujen sisennyksen täytyy olla numero.', invalidCellSpacing: 'Solujen välin täytyy olla numero.', diff --git a/plugins/table/lang/fo.js b/plugins/table/lang/fo.js index 7b53ae243ad..f8bb4a6d40b 100644 --- a/plugins/table/lang/fo.js +++ b/plugins/table/lang/fo.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'fo', { headersColumn: 'Fyrsta kolonna', headersNone: 'Eingin', headersRow: 'Fyrsta rað', + heightUnit: 'height unit', // MISSING invalidBorder: 'Borda-stødd má vera eitt tal.', invalidCellPadding: 'Cell padding má vera eitt tal.', invalidCellSpacing: 'Cell spacing má vera eitt tal.', diff --git a/plugins/table/lang/fr-ca.js b/plugins/table/lang/fr-ca.js index 0ef4b3af1e9..862c19dc023 100644 --- a/plugins/table/lang/fr-ca.js +++ b/plugins/table/lang/fr-ca.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'fr-ca', { headersColumn: 'Première colonne', headersNone: 'Aucun', headersRow: 'Première ligne', + heightUnit: 'height unit', // MISSING invalidBorder: 'La taille de bordure doit être un nombre.', invalidCellPadding: 'La marge interne des cellules doit être un nombre positif.', invalidCellSpacing: 'L\'espacement des cellules doit être un nombre positif.', diff --git a/plugins/table/lang/fr.js b/plugins/table/lang/fr.js index 64096992ee9..08902c44ab9 100644 --- a/plugins/table/lang/fr.js +++ b/plugins/table/lang/fr.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'fr', { headersColumn: 'Première colonne', headersNone: 'Aucun', headersRow: 'Première ligne', + heightUnit: 'height unit', // MISSING invalidBorder: 'La taille de la bordure doit être un nombre.', invalidCellPadding: 'La marge interne des cellules doit être un nombre positif.', invalidCellSpacing: 'L\'espacement entre les cellules doit être un nombre positif.', diff --git a/plugins/table/lang/gl.js b/plugins/table/lang/gl.js index 8a01dff6e5e..f3bfa94dcf7 100644 --- a/plugins/table/lang/gl.js +++ b/plugins/table/lang/gl.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'gl', { headersColumn: 'Primeira columna', headersNone: 'Ningún', headersRow: 'Primeira fila', + heightUnit: 'height unit', // MISSING invalidBorder: 'O tamaño do bordo debe ser un número.', invalidCellPadding: 'A marxe interior debe ser un número positivo.', invalidCellSpacing: 'A marxe entre celas debe ser un número positivo.', diff --git a/plugins/table/lang/gu.js b/plugins/table/lang/gu.js index 5e765e431e2..8a37df2d0e9 100644 --- a/plugins/table/lang/gu.js +++ b/plugins/table/lang/gu.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'gu', { headersColumn: 'પહેલી ઊભી કટાર', headersNone: 'નથી ', headersRow: 'પહેલી કટાર', + heightUnit: 'height unit', // MISSING invalidBorder: 'બોર્ડર એક આંકડો હોવો જોઈએ', invalidCellPadding: 'સેલની અંદરની જગ્યા સુન્ય કરતા વધારે હોવી જોઈએ.', invalidCellSpacing: 'સેલ વચ્ચેની જગ્યા સુન્ય કરતા વધારે હોવી જોઈએ.', diff --git a/plugins/table/lang/he.js b/plugins/table/lang/he.js index 4bd75b3744a..5ddbbb12e3e 100644 --- a/plugins/table/lang/he.js +++ b/plugins/table/lang/he.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'he', { headersColumn: 'עמודה ראשונה', headersNone: 'אין', headersRow: 'שורה ראשונה', + heightUnit: 'height unit', // MISSING invalidBorder: 'שדה גודל המסגרת חייב להיות מספר.', invalidCellPadding: 'שדה ריפוד התאים חייב להיות מספר חיובי.', invalidCellSpacing: 'שדה ריווח התאים חייב להיות מספר חיובי.', diff --git a/plugins/table/lang/hi.js b/plugins/table/lang/hi.js index 7c0c8e66ae7..97ba5b602f9 100644 --- a/plugins/table/lang/hi.js +++ b/plugins/table/lang/hi.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'hi', { headersColumn: 'First column', // MISSING headersNone: 'None', headersRow: 'First Row', // MISSING + heightUnit: 'height unit', // MISSING invalidBorder: 'Border size must be a number.', // MISSING invalidCellPadding: 'Cell padding must be a positive number.', // MISSING invalidCellSpacing: 'Cell spacing must be a positive number.', // MISSING diff --git a/plugins/table/lang/hr.js b/plugins/table/lang/hr.js index 3b77dc320e2..2b70768f706 100644 --- a/plugins/table/lang/hr.js +++ b/plugins/table/lang/hr.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'hr', { headersColumn: 'Prva kolona', headersNone: 'Ništa', headersRow: 'Prvi red', + heightUnit: 'height unit', // MISSING invalidBorder: 'Debljina ruba mora biti broj.', invalidCellPadding: 'Razmak ćelija mora biti broj.', invalidCellSpacing: 'Prostornost ćelija mora biti broj.', diff --git a/plugins/table/lang/hu.js b/plugins/table/lang/hu.js index eeebc3ad66d..00d46be60ea 100644 --- a/plugins/table/lang/hu.js +++ b/plugins/table/lang/hu.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'hu', { headersColumn: 'Első oszlop', headersNone: 'Nincsenek', headersRow: 'Első sor', + heightUnit: 'height unit', // MISSING invalidBorder: 'A szegélyméret mezőbe csak számokat írhat.', invalidCellPadding: 'A cella belső margó mezőbe csak számokat írhat.', invalidCellSpacing: 'A cella térköz mezőbe csak számokat írhat.', diff --git a/plugins/table/lang/id.js b/plugins/table/lang/id.js index d42982519a9..0b786984598 100644 --- a/plugins/table/lang/id.js +++ b/plugins/table/lang/id.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'id', { headersColumn: 'Kolom pertama', headersNone: 'Tidak ada', headersRow: 'Baris Pertama', + heightUnit: 'height unit', // MISSING invalidBorder: 'Ukuran batasan harus sebuah angka', invalidCellPadding: '\'Spasi dalam\' sel harus angka positif.', invalidCellSpacing: 'Spasi antar sel harus angka positif.', diff --git a/plugins/table/lang/is.js b/plugins/table/lang/is.js index 5ce56a49f7e..5ac947e55f1 100644 --- a/plugins/table/lang/is.js +++ b/plugins/table/lang/is.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'is', { headersColumn: 'Fyrsti dálkur', headersNone: 'Engar', headersRow: 'Fyrsta röð', + heightUnit: 'height unit', // MISSING invalidBorder: 'Border size must be a number.', // MISSING invalidCellPadding: 'Cell padding must be a positive number.', // MISSING invalidCellSpacing: 'Cell spacing must be a positive number.', // MISSING diff --git a/plugins/table/lang/it.js b/plugins/table/lang/it.js index 7d182e6d00e..93746ab36ac 100644 --- a/plugins/table/lang/it.js +++ b/plugins/table/lang/it.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'it', { headersColumn: 'Prima Colonna', headersNone: 'Nessuna', headersRow: 'Prima Riga', + heightUnit: 'height unit', // MISSING invalidBorder: 'La dimensione del bordo dev\'essere un numero.', invalidCellPadding: 'Il paging delle celle dev\'essere un numero', invalidCellSpacing: 'La spaziatura tra le celle dev\'essere un numero.', diff --git a/plugins/table/lang/ja.js b/plugins/table/lang/ja.js index c383377fcd2..36bae107bfc 100644 --- a/plugins/table/lang/ja.js +++ b/plugins/table/lang/ja.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'ja', { headersColumn: '最初の列のみ', headersNone: 'なし', headersRow: '最初の行のみ', + heightUnit: 'height unit', // MISSING invalidBorder: '枠線の幅は数値で入力してください。', invalidCellPadding: 'セル内余白は数値で入力してください。', invalidCellSpacing: 'セル間余白は数値で入力してください。', diff --git a/plugins/table/lang/ka.js b/plugins/table/lang/ka.js index 8299846cb9c..12f7d11cca2 100644 --- a/plugins/table/lang/ka.js +++ b/plugins/table/lang/ka.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'ka', { headersColumn: 'პირველი სვეტი', headersNone: 'არაფერი', headersRow: 'პირველი სტრიქონი', + heightUnit: 'height unit', // MISSING invalidBorder: 'ჩარჩოს ზომა რიცხვით უდნა იყოს წარმოდგენილი.', invalidCellPadding: 'უჯრის კიდე (padding) რიცხვით უნდა იყოს წარმოდგენილი.', invalidCellSpacing: 'უჯრის სივრცე (spacing) რიცხვით უნდა იყოს წარმოდგენილი.', diff --git a/plugins/table/lang/km.js b/plugins/table/lang/km.js index 9a6689cf3e9..e757333ecaf 100644 --- a/plugins/table/lang/km.js +++ b/plugins/table/lang/km.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'km', { headersColumn: 'ជួរ​ឈរ​ដំបូង', headersNone: 'មិន​មាន', headersRow: 'ជួរ​ដេក​ដំបូង', + heightUnit: 'height unit', // MISSING invalidBorder: 'ទំហំ​បន្ទាត់​ស៊ុម​ត្រូវ​តែ​ជា​លេខ។', invalidCellPadding: 'ចន្លោះ​ក្រឡា​ត្រូវ​តែជា​លេខ​វិជ្ជមាន។', invalidCellSpacing: 'គម្លាត​ក្រឡា​ត្រូវ​តែ​ជា​លេខ​វិជ្ជមាន។', diff --git a/plugins/table/lang/ko.js b/plugins/table/lang/ko.js index f0b4434a8fe..4c4a574856e 100644 --- a/plugins/table/lang/ko.js +++ b/plugins/table/lang/ko.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'ko', { headersColumn: '첫 열', headersNone: '없음', headersRow: '첫 행', + heightUnit: 'height unit', // MISSING invalidBorder: '테두리 두께는 숫자여야 합니다.', invalidCellPadding: '셀 여백은 0 이상이어야 합니다.', invalidCellSpacing: '셀 간격은 0 이상이어야 합니다.', diff --git a/plugins/table/lang/ku.js b/plugins/table/lang/ku.js index a952e990d21..84cc7401d42 100644 --- a/plugins/table/lang/ku.js +++ b/plugins/table/lang/ku.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'ku', { headersColumn: 'یەکەم ئەستوون', headersNone: 'هیچ', headersRow: 'یەکەم ڕیز', + heightUnit: 'height unit', // MISSING invalidBorder: 'ژمارەی پەراوێز دەبێت تەنها ژماره بێت.', invalidCellPadding: 'ناوپۆشی خانه دەبێت ژمارەکی درووست بێت.', invalidCellSpacing: 'بۆشایی خانه دەبێت ژمارەکی درووست بێت.', diff --git a/plugins/table/lang/lt.js b/plugins/table/lang/lt.js index ab0ecb7be21..3d822db987c 100644 --- a/plugins/table/lang/lt.js +++ b/plugins/table/lang/lt.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'lt', { headersColumn: 'Pirmas stulpelis', headersNone: 'Nėra', headersRow: 'Pirma eilutė', + heightUnit: 'height unit', // MISSING invalidBorder: 'Reikšmė turi būti nurodyta skaičiumi.', invalidCellPadding: 'Reikšmė turi būti nurodyta skaičiumi.', invalidCellSpacing: 'Reikšmė turi būti nurodyta skaičiumi.', diff --git a/plugins/table/lang/lv.js b/plugins/table/lang/lv.js index db7172e211d..7834a23264d 100644 --- a/plugins/table/lang/lv.js +++ b/plugins/table/lang/lv.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'lv', { headersColumn: 'Pirmā kolona', headersNone: 'Nekas', headersRow: 'Pirmā rinda', + heightUnit: 'height unit', // MISSING invalidBorder: 'Rāmju izmēram jābūt skaitlim', invalidCellPadding: 'Šūnu atkāpēm jābūt pozitīvam skaitlim', invalidCellSpacing: 'Šūnu atstarpēm jābūt pozitīvam skaitlim', diff --git a/plugins/table/lang/mk.js b/plugins/table/lang/mk.js index 1e007a22533..fabd0bd09f5 100644 --- a/plugins/table/lang/mk.js +++ b/plugins/table/lang/mk.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'mk', { headersColumn: 'First column', // MISSING headersNone: 'None', headersRow: 'First Row', // MISSING + heightUnit: 'height unit', // MISSING invalidBorder: 'Border size must be a number.', // MISSING invalidCellPadding: 'Cell padding must be a positive number.', // MISSING invalidCellSpacing: 'Cell spacing must be a positive number.', // MISSING diff --git a/plugins/table/lang/mn.js b/plugins/table/lang/mn.js index 6368c1de5cf..3dcb81b1070 100644 --- a/plugins/table/lang/mn.js +++ b/plugins/table/lang/mn.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'mn', { headersColumn: 'First column', // MISSING headersNone: 'None', headersRow: 'First Row', // MISSING + heightUnit: 'height unit', // MISSING invalidBorder: 'Border size must be a number.', // MISSING invalidCellPadding: 'Cell padding must be a positive number.', // MISSING invalidCellSpacing: 'Cell spacing must be a positive number.', // MISSING diff --git a/plugins/table/lang/ms.js b/plugins/table/lang/ms.js index df339144602..ba0c6fd9ea6 100644 --- a/plugins/table/lang/ms.js +++ b/plugins/table/lang/ms.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'ms', { headersColumn: 'First column', // MISSING headersNone: 'None', headersRow: 'First Row', // MISSING + heightUnit: 'height unit', // MISSING invalidBorder: 'Border size must be a number.', // MISSING invalidCellPadding: 'Cell padding must be a positive number.', // MISSING invalidCellSpacing: 'Cell spacing must be a positive number.', // MISSING diff --git a/plugins/table/lang/nb.js b/plugins/table/lang/nb.js index 75f1022173e..3d2858937cc 100644 --- a/plugins/table/lang/nb.js +++ b/plugins/table/lang/nb.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'nb', { headersColumn: 'Første kolonne', headersNone: 'Ingen', headersRow: 'Første rad', + heightUnit: 'height unit', // MISSING invalidBorder: 'Rammestørrelse må være et tall.', invalidCellPadding: 'Cellepolstring må være et positivt tall.', invalidCellSpacing: 'Cellemarg må være et positivt tall.', diff --git a/plugins/table/lang/nl.js b/plugins/table/lang/nl.js index aaccb79c0d9..9093cbaa541 100644 --- a/plugins/table/lang/nl.js +++ b/plugins/table/lang/nl.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'nl', { headersColumn: 'Eerste kolom', headersNone: 'Geen', headersRow: 'Eerste rij', + heightUnit: 'height unit', // MISSING invalidBorder: 'De randdikte moet een getal zijn.', invalidCellPadding: 'Celopvulling moet een getal zijn.', invalidCellSpacing: 'Celafstand moet een getal zijn.', diff --git a/plugins/table/lang/no.js b/plugins/table/lang/no.js index a03be185cc6..bccf5f20a97 100644 --- a/plugins/table/lang/no.js +++ b/plugins/table/lang/no.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'no', { headersColumn: 'Første kolonne', headersNone: 'Ingen', headersRow: 'Første rad', + heightUnit: 'height unit', // MISSING invalidBorder: 'Rammestørrelse må være et tall.', invalidCellPadding: 'Cellepolstring må være et positivt tall.', invalidCellSpacing: 'Cellemarg må være et positivt tall.', diff --git a/plugins/table/lang/oc.js b/plugins/table/lang/oc.js index 54959c73191..cb57ab7f66b 100644 --- a/plugins/table/lang/oc.js +++ b/plugins/table/lang/oc.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'oc', { headersColumn: 'Primièra colomna', headersNone: 'Pas cap', headersRow: 'Primièra linha', + heightUnit: 'height unit', // MISSING invalidBorder: 'La talha de la bordadura deu èsser un nombre.', invalidCellPadding: 'Lo marge intèrne de las cellulas deu èsser un nombre positiu.', invalidCellSpacing: 'L\'espaçament entre las cellulas deu èsser un nombre positiu.', diff --git a/plugins/table/lang/pl.js b/plugins/table/lang/pl.js index 8954b8883b6..81a4a05ad71 100644 --- a/plugins/table/lang/pl.js +++ b/plugins/table/lang/pl.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'pl', { headersColumn: 'Pierwsza kolumna', headersNone: 'Brak', headersRow: 'Pierwszy wiersz', + heightUnit: 'height unit', // MISSING invalidBorder: 'Wartość obramowania musi być liczbą.', invalidCellPadding: 'Dopełnienie komórek musi być liczbą dodatnią.', invalidCellSpacing: 'Odstęp pomiędzy komórkami musi być liczbą dodatnią.', diff --git a/plugins/table/lang/pt-br.js b/plugins/table/lang/pt-br.js index d59e8848bee..b07c6a316f9 100644 --- a/plugins/table/lang/pt-br.js +++ b/plugins/table/lang/pt-br.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'pt-br', { headersColumn: 'Primeira coluna', headersNone: 'Nenhum', headersRow: 'Primeira linha', + heightUnit: 'height unit', // MISSING invalidBorder: 'O tamanho da borda tem que ser um número.', invalidCellPadding: 'A margem interna das células tem que ser um número.', invalidCellSpacing: 'O espaçamento das células tem que ser um número.', diff --git a/plugins/table/lang/pt.js b/plugins/table/lang/pt.js index 276283611df..478c6e71919 100644 --- a/plugins/table/lang/pt.js +++ b/plugins/table/lang/pt.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'pt', { headersColumn: 'Primeira coluna', headersNone: 'Nenhum', headersRow: 'Primeira linha', + heightUnit: 'height unit', // MISSING invalidBorder: 'O tamanho da margem tem de ser um número.', invalidCellPadding: 'A criação do espaço na célula deve ser um número positivo.', invalidCellSpacing: 'O espaçamento da célula deve ser um número positivo.', diff --git a/plugins/table/lang/ro.js b/plugins/table/lang/ro.js index 3acff425762..e9cbd7b4953 100644 --- a/plugins/table/lang/ro.js +++ b/plugins/table/lang/ro.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'ro', { headersColumn: 'Prima coloană', headersNone: 'Nimic', headersRow: 'Primul rând', + heightUnit: 'height unit', // MISSING invalidBorder: 'Dimensiunea bordurii trebuie să aibe un număr.', invalidCellPadding: 'Spațierea celulei trebuie sa fie un număr pozitiv', invalidCellSpacing: 'Spațierea celului trebuie să fie un număr pozitiv.', diff --git a/plugins/table/lang/ru.js b/plugins/table/lang/ru.js index c5df64806f6..99436d21b6e 100644 --- a/plugins/table/lang/ru.js +++ b/plugins/table/lang/ru.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'ru', { headersColumn: 'Левая колонка', headersNone: 'Без заголовков', headersRow: 'Верхняя строка', + heightUnit: 'height unit', // MISSING invalidBorder: 'Размер границ должен быть числом.', invalidCellPadding: 'Внутренний отступ ячеек (cellpadding) должен быть числом.', invalidCellSpacing: 'Внешний отступ ячеек (cellspacing) должен быть числом.', diff --git a/plugins/table/lang/si.js b/plugins/table/lang/si.js index fc97620cd45..f4c9efc1ae9 100644 --- a/plugins/table/lang/si.js +++ b/plugins/table/lang/si.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'si', { headersColumn: 'පළමූ සිරස් තීරුව', headersNone: 'කිසිවක්ම නොවේ', headersRow: 'පළමූ පේළිය', + heightUnit: 'height unit', // MISSING invalidBorder: 'Border size must be a number.', // MISSING invalidCellPadding: 'Cell padding must be a positive number.', // MISSING invalidCellSpacing: 'Cell spacing must be a positive number.', // MISSING diff --git a/plugins/table/lang/sk.js b/plugins/table/lang/sk.js index e4d254f4421..c49a3f0861c 100644 --- a/plugins/table/lang/sk.js +++ b/plugins/table/lang/sk.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'sk', { headersColumn: 'Prvý stĺpec', headersNone: 'Žiadne', headersRow: 'Prvý riadok', + heightUnit: 'height unit', // MISSING invalidBorder: 'Šírka orámovania musí byť číslo.', invalidCellPadding: 'Odsadenie v bunkách (cell padding) musí byť kladné číslo.', invalidCellSpacing: 'Medzera mädzi bunkami (cell spacing) musí byť kladné číslo.', diff --git a/plugins/table/lang/sl.js b/plugins/table/lang/sl.js index 5131ce16fc6..81358326fe0 100644 --- a/plugins/table/lang/sl.js +++ b/plugins/table/lang/sl.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'sl', { headersColumn: 'Prvi stolpec', headersNone: 'Brez', headersRow: 'Prva vrstica', + heightUnit: 'height unit', // MISSING invalidBorder: 'Širina obrobe mora biti število.', invalidCellPadding: 'Odmik znotraj celic mora biti pozitivno število.', invalidCellSpacing: 'Razmik med celicami mora biti pozitivno število.', diff --git a/plugins/table/lang/sq.js b/plugins/table/lang/sq.js index 1c743a27973..80293cd88cc 100644 --- a/plugins/table/lang/sq.js +++ b/plugins/table/lang/sq.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'sq', { headersColumn: 'Kolona e parë', headersNone: 'Asnjë', headersRow: 'Rreshti i Parë', + heightUnit: 'height unit', // MISSING invalidBorder: 'Madhësia e kufinjve duhet të jetë numër.', invalidCellPadding: 'Mbushja e qelisë duhet të jetë numër pozitiv.', invalidCellSpacing: 'Hapësira e qelisë duhet të jetë numër pozitiv.', diff --git a/plugins/table/lang/sr-latn.js b/plugins/table/lang/sr-latn.js index 0ac0155c6ef..49159f563c3 100644 --- a/plugins/table/lang/sr-latn.js +++ b/plugins/table/lang/sr-latn.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'sr-latn', { headersColumn: 'Prva kolona', headersNone: 'Nema', headersRow: 'Prvi red', + heightUnit: 'height unit', // MISSING invalidBorder: 'Veličina okvira mora biti broj.', invalidCellPadding: 'Padding polja mora biti pozitivan broj.', invalidCellSpacing: 'Razmak između ćelija mora biti pozitivan broj.', diff --git a/plugins/table/lang/sr.js b/plugins/table/lang/sr.js index 336bcf33d35..5e9fd73099a 100644 --- a/plugins/table/lang/sr.js +++ b/plugins/table/lang/sr.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'sr', { headersColumn: 'Прва колона', headersNone: 'Нема', headersRow: 'Први ред', + heightUnit: 'height unit', // MISSING invalidBorder: 'Величина ивице треба да буде цифра.', invalidCellPadding: 'Пуњење ћелије треба да буде позитивна цифра.', invalidCellSpacing: 'Размак ћелије треба да буде позитивна цифра.', diff --git a/plugins/table/lang/sv.js b/plugins/table/lang/sv.js index 997df11b64e..738c4d3a746 100644 --- a/plugins/table/lang/sv.js +++ b/plugins/table/lang/sv.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'sv', { headersColumn: 'Första kolumnen', headersNone: 'Ingen', headersRow: 'Första raden', + heightUnit: 'height unit', // MISSING invalidBorder: 'Ram måste vara ett nummer.', invalidCellPadding: 'Luft i cell måste vara ett nummer.', invalidCellSpacing: 'Luft i cell måste vara ett nummer.', diff --git a/plugins/table/lang/th.js b/plugins/table/lang/th.js index 3aead411e49..9e026e144bc 100644 --- a/plugins/table/lang/th.js +++ b/plugins/table/lang/th.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'th', { headersColumn: 'คอลัมน์แรก', headersNone: 'None', headersRow: 'แถวแรก', + heightUnit: 'height unit', // MISSING invalidBorder: 'ขนาดเส้นกรอบต้องเป็นจำนวนตัวเลข', invalidCellPadding: 'ช่องว่างภายในเซลล์ต้องเลขจำนวนบวก', invalidCellSpacing: 'ช่องว่างภายในเซลล์ต้องเป็นเลขจำนวนบวก', diff --git a/plugins/table/lang/tr.js b/plugins/table/lang/tr.js index 8a3d1796644..60d0e0b634b 100644 --- a/plugins/table/lang/tr.js +++ b/plugins/table/lang/tr.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'tr', { headersColumn: 'İlk Sütun', headersNone: 'Yok', headersRow: 'İlk Satır', + heightUnit: 'height unit', // MISSING invalidBorder: 'Çerceve büyüklüklüğü sayı olmalıdır.', invalidCellPadding: 'Hücre aralığı (padding) sayı olmalıdır.', invalidCellSpacing: 'Hücre boşluğu (spacing) sayı olmalıdır.', diff --git a/plugins/table/lang/tt.js b/plugins/table/lang/tt.js index f8fb8d2ad98..c7f560b85cc 100644 --- a/plugins/table/lang/tt.js +++ b/plugins/table/lang/tt.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'tt', { headersColumn: 'Беренче багана', headersNone: 'Һичбер', headersRow: 'Беренче юл', + heightUnit: 'height unit', // MISSING invalidBorder: 'Чик киңлеге сан булырга тиеш.', invalidCellPadding: 'Cell padding must be a positive number.', // MISSING invalidCellSpacing: 'Күзәнәкләр аралары уңай сан булырга тиеш.', diff --git a/plugins/table/lang/ug.js b/plugins/table/lang/ug.js index 6497ffad4db..7c4b711d202 100644 --- a/plugins/table/lang/ug.js +++ b/plugins/table/lang/ug.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'ug', { headersColumn: 'بىرىنچى ئىستون', headersNone: 'يوق', headersRow: 'بىرىنچى قۇر', + heightUnit: 'height unit', // MISSING invalidBorder: 'گىرۋەك توملۇقى چوقۇم سان بولىدۇ', invalidCellPadding: 'كاتەكچىگە چوقۇم سان تولدۇرۇلىدۇ', invalidCellSpacing: 'كاتەكچە ئارىلىقى چوقۇم سان بولىدۇ', diff --git a/plugins/table/lang/uk.js b/plugins/table/lang/uk.js index f4ef995460c..53af8f9c91a 100644 --- a/plugins/table/lang/uk.js +++ b/plugins/table/lang/uk.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'uk', { headersColumn: 'Стовбці', headersNone: 'Без заголовків', headersRow: 'Рядки', + heightUnit: 'height unit', // MISSING invalidBorder: 'Розмір рамки повинен бути цілим числом.', invalidCellPadding: 'Внутр. відступ комірки повинен бути цілим числом.', invalidCellSpacing: 'Проміжок між комірками повинен бути цілим числом.', diff --git a/plugins/table/lang/vi.js b/plugins/table/lang/vi.js index 1ea18968bda..f6b9837b791 100644 --- a/plugins/table/lang/vi.js +++ b/plugins/table/lang/vi.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'vi', { headersColumn: 'Cột đầu tiên', headersNone: 'Không có', headersRow: 'Hàng đầu tiên', + heightUnit: 'height unit', // MISSING invalidBorder: 'Kích cỡ của đường biên phải là một số nguyên.', invalidCellPadding: 'Khoảng đệm giữa ô và nội dung phải là một số nguyên.', invalidCellSpacing: 'Khoảng cách giữa các ô phải là một số nguyên.', diff --git a/plugins/table/lang/zh-cn.js b/plugins/table/lang/zh-cn.js index 38655078f14..9a48a244f3f 100644 --- a/plugins/table/lang/zh-cn.js +++ b/plugins/table/lang/zh-cn.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'zh-cn', { headersColumn: '第一列', headersNone: '无', headersRow: '第一行', + heightUnit: 'height unit', // MISSING invalidBorder: '边框粗细必须为数字格式', invalidCellPadding: '单元格填充必须为数字格式', invalidCellSpacing: '单元格间距必须为数字格式', diff --git a/plugins/table/lang/zh.js b/plugins/table/lang/zh.js index c1e257ad1c6..185d990c6a8 100644 --- a/plugins/table/lang/zh.js +++ b/plugins/table/lang/zh.js @@ -50,6 +50,7 @@ CKEDITOR.plugins.setLang( 'table', 'zh', { headersColumn: '第一行', headersNone: '無', headersRow: '第一列', + heightUnit: 'height unit', // MISSING invalidBorder: '框線大小必須是整數。', invalidCellPadding: '儲存格邊距必須為正數。', invalidCellSpacing: '儲存格間距必須為正數。', From 49abbb30c61487c50a1652c84d2dc6b9e70a39c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Mon, 20 May 2019 13:57:14 +0200 Subject: [PATCH 21/32] Fix #3098. --- plugins/tabletools/dialogs/tableCell.js | 2 +- tests/plugins/tabletools/manual/cellheight.md | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/tabletools/dialogs/tableCell.js b/plugins/tabletools/dialogs/tableCell.js index 8a176998800..32bd1ce0d85 100644 --- a/plugins/tabletools/dialogs/tableCell.js +++ b/plugins/tabletools/dialogs/tableCell.js @@ -468,7 +468,7 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) { type: 'select', id: fieldName + 'Type', label: editor.lang.table[ fieldName + 'Unit' ], - labelStyle: 'visibility:hidden', + labelStyle: 'visibility:hidden;display:block;width:0;', 'default': 'px', items: [ // 'widthPx' and 'widthPc' are also used for height to avoid additional translations. diff --git a/tests/plugins/tabletools/manual/cellheight.md b/tests/plugins/tabletools/manual/cellheight.md index f1881642c3a..df361be859d 100644 --- a/tests/plugins/tabletools/manual/cellheight.md +++ b/tests/plugins/tabletools/manual/cellheight.md @@ -1,16 +1,17 @@ @bender-tags: 4.12.0 @bender-ui: collapsed -@bender-ckeditor-plugins: wysiwygarea, toolbar, table, tabletools, undo +@bender-ckeditor-plugins: wysiwygarea, toolbar, table, tabletools, undo, colordialog 1. Open the cell properties dialog. #### Expected: Cell height unit is changeable (pixels or percents). + Unit fields for `Width` and `Height` are the same width. #### Unexpected: - Cell height unit is not changeable. + Cell height unit is not changeable or unit fields are not equally wide. 2. Change cell height to 20px. From b7cc9d0cc3fa83cbcbac4fd7dcd2b9fc7745828b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Mon, 20 May 2019 13:58:19 +0200 Subject: [PATCH 22/32] Add issue numbers to manual test. --- tests/plugins/tabletools/manual/cellheight.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/plugins/tabletools/manual/cellheight.md b/tests/plugins/tabletools/manual/cellheight.md index df361be859d..0a8a5f429ad 100644 --- a/tests/plugins/tabletools/manual/cellheight.md +++ b/tests/plugins/tabletools/manual/cellheight.md @@ -1,4 +1,4 @@ -@bender-tags: 4.12.0 +@bender-tags: 4.12.0, 2084, 3098 @bender-ui: collapsed @bender-ckeditor-plugins: wysiwygarea, toolbar, table, tabletools, undo, colordialog From 869ec716af0421258f7f5a71949e94d63704a1db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Mon, 20 May 2019 15:31:27 +0200 Subject: [PATCH 23/32] Remove unnecessary plugin from manual test. --- tests/plugins/tabletools/manual/cellheight.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/plugins/tabletools/manual/cellheight.md b/tests/plugins/tabletools/manual/cellheight.md index 0a8a5f429ad..c0d72951448 100644 --- a/tests/plugins/tabletools/manual/cellheight.md +++ b/tests/plugins/tabletools/manual/cellheight.md @@ -1,6 +1,6 @@ @bender-tags: 4.12.0, 2084, 3098 @bender-ui: collapsed -@bender-ckeditor-plugins: wysiwygarea, toolbar, table, tabletools, undo, colordialog +@bender-ckeditor-plugins: wysiwygarea, toolbar, table, tabletools, undo 1. Open the cell properties dialog. From 9c7b1278caec8d04f8d88ff3e6e73f8e1211cf79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Wed, 29 May 2019 13:57:18 +0200 Subject: [PATCH 24/32] Change markdown for readability. --- tests/plugins/tabletools/manual/cellheight.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/plugins/tabletools/manual/cellheight.md b/tests/plugins/tabletools/manual/cellheight.md index c0d72951448..0b8604b0b7d 100644 --- a/tests/plugins/tabletools/manual/cellheight.md +++ b/tests/plugins/tabletools/manual/cellheight.md @@ -4,31 +4,31 @@ 1. Open the cell properties dialog. - #### Expected: + #### Expected: - Cell height unit is changeable (pixels or percents). - Unit fields for `Width` and `Height` are the same width. + - Cell height unit is changeable (pixels or percent). + - Unit fields for `Width` and `Height` are the same width. - #### Unexpected: + #### Unexpected: - Cell height unit is not changeable or unit fields are not equally wide. + - Cell height unit is not changeable or unit fields are not equally wide. 2. Change cell height to 20px. - #### Expected: + #### Expected: - First row is lower than second one. + First row is lower than second one. - #### Unexpected: + #### Unexpected: - Row height didn't change. + Row height didn't change. 3. Change cell height to 70 percent. - #### Expected: + #### Expected: - First row is higher than second one. + First row is higher than second one. - #### Unexpected: + #### Unexpected: - Row height didn't change. + Row height didn't change. From f09bd74986a6437f32884b5b5d805f8c814cb9cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Wed, 29 May 2019 13:59:26 +0200 Subject: [PATCH 25/32] Refactor conditionals for readability. --- plugins/tabletools/dialogs/tableCell.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/tabletools/dialogs/tableCell.js b/plugins/tabletools/dialogs/tableCell.js index 32bd1ce0d85..6f635e7d0cc 100644 --- a/plugins/tabletools/dialogs/tableCell.js +++ b/plugins/tabletools/dialogs/tableCell.js @@ -440,11 +440,13 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) { if ( !isNaN( style ) ) { return style; - } else if ( !isNaN( attr ) ) { + } + if ( !isNaN( attr ) ) { return attr; - } else { - return; } + + return; + } ), commit: function( element ) { var value = parseFloat( this.getValue(), 10 ), From 9fae04443895029a8889740d1488917fbeb61d29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Wed, 29 May 2019 14:03:36 +0200 Subject: [PATCH 26/32] Turn the rest of 'expected' and 'unexpected' terms into list items. --- tests/plugins/tabletools/manual/cellheight.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/plugins/tabletools/manual/cellheight.md b/tests/plugins/tabletools/manual/cellheight.md index 0b8604b0b7d..1c8d4f71cd0 100644 --- a/tests/plugins/tabletools/manual/cellheight.md +++ b/tests/plugins/tabletools/manual/cellheight.md @@ -17,18 +17,18 @@ #### Expected: - First row is lower than second one. + - First row is lower than second one. #### Unexpected: - Row height didn't change. + - Row height didn't change. 3. Change cell height to 70 percent. #### Expected: - First row is higher than second one. + - First row is higher than second one. #### Unexpected: - Row height didn't change. + - Row height didn't change. From 08f6bd392a7e638ae4da6376cf1a3d57dd5b2ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Fri, 14 Jun 2019 11:00:28 +0200 Subject: [PATCH 27/32] Fix changelog: add missing entries for two issues, remove the word 'plugin' from links and delete unnecessary '4.11.5' version tag. --- CHANGES.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 0182bd46932..d0bf9c5c6b2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,7 +10,8 @@ New Features: * [#2639](https://github.com/ckeditor/ckeditor-dev/issues/2639): [Color Dialog](https://ckeditor.com/cke4/addon/colordialog) plugin now shows current selection's color when opened. * [#1490](https://github.com/ckeditor/ckeditor-dev/issues/1490): Improved [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin to retain table cell borders. * [#2870](https://github.com/ckeditor/ckeditor-dev/issues/2870): Added support for preserving positive `margin-left` values in list items for lists pasted with [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. -* [#2084](https://github.com/ckeditor/ckeditor-dev/issues/2084): [Table Tools plugin](https://ckeditor.com/cke4/addon/tabletools) now allows to change cell height unit type to either pixels or percents. +* [#2084](https://github.com/ckeditor/ckeditor-dev/issues/2084): [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin now allows to change cell height unit type to either pixels or percents. +* [#3164](https://github.com/ckeditor/ckeditor-dev/issues/3164): [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin now accepts floating point values as table cell width and height. Fixed Issues: @@ -20,6 +21,7 @@ Fixed Issues: * [#2923](https://github.com/ckeditor/ckeditor-dev/issues/2923): Fixed: CSS `windowtext` color is not correctly recognized by [`CKEDITOR.tools.style.parse`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_parse.html) functions. * [#2235](https://github.com/ckeditor/ckeditor-dev/issues/2235): Fixed: [Image](https://ckeditor.com/cke4/addon/image) in table cell has an empty URL field when edited from context menu opened by right-click when [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin is in use. * [#3120](https://github.com/ckeditor/ckeditor-dev/issues/3120): [IE8] Fixed: [`CKEDITOR.tools.extend`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tool.html#method-extend) function doesn't work with [`DontEnum`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Properties) object property attribute. +* [#3098](https://github.com/ckeditor/ckeditor-dev/issues/3098): Fixed: Unit pickers for table cell width and height in [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin have different width. API Changes: @@ -44,6 +46,7 @@ Other Changes: * [#2924](https://github.com/ckeditor/ckeditor-dev/issues/2924): Marked [`CKEDITOR.tools.style.parse.border`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_border.html) as deprecated in favor of [`CKEDITOR.tools.style.border.fromCssRule`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_border.html#static-method-fromCssRule) function. * [#3132](https://github.com/ckeditor/ckeditor-dev/issues/2924): Marked [`CKEDITOR.tools.objectKeys`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tool.html#method-objectKeys) as deprecated in favor of [`CKEDITOR.tools.object.keys`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-keys). + ## CKEditor 4.11.4 Fixed Issues: From 3386dde2f59db7b6730c33fe26b42bfff768a4ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Fri, 14 Jun 2019 11:57:27 +0200 Subject: [PATCH 28/32] Don't show horizontal scrollbar when invisible label is too wide. --- plugins/tabletools/dialogs/tableCell.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/tabletools/dialogs/tableCell.js b/plugins/tabletools/dialogs/tableCell.js index 6f635e7d0cc..800650f7668 100644 --- a/plugins/tabletools/dialogs/tableCell.js +++ b/plugins/tabletools/dialogs/tableCell.js @@ -470,7 +470,7 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) { type: 'select', id: fieldName + 'Type', label: editor.lang.table[ fieldName + 'Unit' ], - labelStyle: 'visibility:hidden;display:block;width:0;', + labelStyle: 'visibility:hidden;display:block;width:0;overflow:hidden', 'default': 'px', items: [ // 'widthPx' and 'widthPc' are also used for height to avoid additional translations. From 621327520e5c3773f84a0c8a76ae5e31773da36f Mon Sep 17 00:00:00 2001 From: Tomasz Jakut Date: Fri, 14 Jun 2019 16:11:23 +0200 Subject: [PATCH 29/32] Fix incorrect changelog entry. --- CHANGES.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index d0bf9c5c6b2..370d5a8118c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -46,7 +46,6 @@ Other Changes: * [#2924](https://github.com/ckeditor/ckeditor-dev/issues/2924): Marked [`CKEDITOR.tools.style.parse.border`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_border.html) as deprecated in favor of [`CKEDITOR.tools.style.border.fromCssRule`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_border.html#static-method-fromCssRule) function. * [#3132](https://github.com/ckeditor/ckeditor-dev/issues/2924): Marked [`CKEDITOR.tools.objectKeys`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tool.html#method-objectKeys) as deprecated in favor of [`CKEDITOR.tools.object.keys`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-keys). - ## CKEditor 4.11.4 Fixed Issues: From e7deb4537625357785a0992096ca2d7bb17cced1 Mon Sep 17 00:00:00 2001 From: Tomasz Jakut Date: Fri, 14 Jun 2019 16:11:23 +0200 Subject: [PATCH 30/32] Fix incorrect changelog entry. --- CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 370d5a8118c..d3f46a5118b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -44,7 +44,10 @@ Other Changes: * [#2741](https://github.com/ckeditor/ckeditor-dev/issues/2721): Replaced deprecated `arguments.callee` calls with named function expressions. * [#2924](https://github.com/ckeditor/ckeditor-dev/issues/2924): Marked [`CKEDITOR.tools.style.parse.border`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_border.html) as deprecated in favor of [`CKEDITOR.tools.style.border.fromCssRule`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_border.html#static-method-fromCssRule) function. +<<<<<<< HEAD * [#3132](https://github.com/ckeditor/ckeditor-dev/issues/2924): Marked [`CKEDITOR.tools.objectKeys`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tool.html#method-objectKeys) as deprecated in favor of [`CKEDITOR.tools.object.keys`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-keys). +======= +>>>>>>> bbd776e... Fix incorrect changelog entry. ## CKEditor 4.11.4 From 4dfbc9e3a5c8dd1884fdf04138b3a1de7785d47f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20Jarze=CC=A8bski?= Date: Mon, 17 Jun 2019 10:21:01 +0200 Subject: [PATCH 31/32] Update meta language file with a 'heightUnit' entry. --- dev/langtool/meta/ckeditor.plugin-table/meta.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/langtool/meta/ckeditor.plugin-table/meta.txt b/dev/langtool/meta/ckeditor.plugin-table/meta.txt index 056ec7c77f1..e72e7ad9714 100644 --- a/dev/langtool/meta/ckeditor.plugin-table/meta.txt +++ b/dev/langtool/meta/ckeditor.plugin-table/meta.txt @@ -44,6 +44,7 @@ headersBoth = Label for the Both headers option of the Table Properties dialog w headersColumn = Label for the First column headers option of the Table Properties dialog window. headersNone = Label for the None headers option of the Table Properties dialog window. headersRow = Label for the First row headers option of the Table Properties dialog window. +heightUnit = Label for the height unit selection field of the Cell Properties dialog window. invalidBorder = Error message displayed when the border size given is not a number. invalidCellPadding = Error message displayed when the cell padding given is not a positive number. invalidCellSpacing = Error message displayed when the cell spacing given is not a positive number. From e088e752dc0f0a4d5063b041dff59702cbdc3ba5 Mon Sep 17 00:00:00 2001 From: Tomasz Jakut Date: Mon, 17 Jun 2019 11:21:33 +0200 Subject: [PATCH 32/32] Fix changelog. --- CHANGES.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index d3f46a5118b..370d5a8118c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -44,10 +44,7 @@ Other Changes: * [#2741](https://github.com/ckeditor/ckeditor-dev/issues/2721): Replaced deprecated `arguments.callee` calls with named function expressions. * [#2924](https://github.com/ckeditor/ckeditor-dev/issues/2924): Marked [`CKEDITOR.tools.style.parse.border`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_border.html) as deprecated in favor of [`CKEDITOR.tools.style.border.fromCssRule`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_border.html#static-method-fromCssRule) function. -<<<<<<< HEAD * [#3132](https://github.com/ckeditor/ckeditor-dev/issues/2924): Marked [`CKEDITOR.tools.objectKeys`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tool.html#method-objectKeys) as deprecated in favor of [`CKEDITOR.tools.object.keys`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-keys). -======= ->>>>>>> bbd776e... Fix incorrect changelog entry. ## CKEditor 4.11.4