From 3bd69c7d113691c88593bb3c3eb9239cc064cc6a Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Sat, 27 Apr 2019 18:29:27 +0300 Subject: [PATCH] [DE mobile] Add merge cells in table options --- .../mobile/app/controller/edit/EditTable.js | 7 +++++++ .../mobile/app/template/EditTable.template | 11 +++++++++++ apps/documenteditor/mobile/app/view/edit/EditTable.js | 3 ++- apps/documenteditor/mobile/locale/en.json | 1 + 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/apps/documenteditor/mobile/app/controller/edit/EditTable.js b/apps/documenteditor/mobile/app/controller/edit/EditTable.js index 5c5c5ba25..d0a10e4aa 100644 --- a/apps/documenteditor/mobile/app/controller/edit/EditTable.js +++ b/apps/documenteditor/mobile/app/controller/edit/EditTable.js @@ -236,6 +236,7 @@ define([ $('#table-options-margins input').val(distance); $('#table-options-margins .item-after').text(distance + ' ' + _metricText); } + $('#table-merge-cells').single('click', _.bind(this.onMergeCellClick, this)); }, _initWrappView: function() { @@ -614,6 +615,12 @@ define([ me.api.tblApply(properties); }, + onMergeCellClick: function () { + if (this.api) { + this.api.MergeCells(); + } + }, + onBorderSize: function (e) { var $target = $(e.currentTarget), value = $target.val(); diff --git a/apps/documenteditor/mobile/app/template/EditTable.template b/apps/documenteditor/mobile/app/template/EditTable.template index 7347774d9..e24b1cdc2 100644 --- a/apps/documenteditor/mobile/app/template/EditTable.template +++ b/apps/documenteditor/mobile/app/template/EditTable.template @@ -220,6 +220,17 @@ +
+ +
diff --git a/apps/documenteditor/mobile/app/view/edit/EditTable.js b/apps/documenteditor/mobile/app/view/edit/EditTable.js index 279ddd11d..e9ae443b6 100644 --- a/apps/documenteditor/mobile/app/view/edit/EditTable.js +++ b/apps/documenteditor/mobile/app/view/edit/EditTable.js @@ -242,7 +242,8 @@ define([ textBandedRow: 'Banded Row', textFirstColumn: 'First Column', textLastColumn: 'Last Column', - textBandedColumn: 'Banded Column' + textBandedColumn: 'Banded Column', + textMergeCells: 'Merge Cells' } })(), DE.Views.EditTable || {})) }); \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index 0897b9ea1..0bda8afed 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -338,6 +338,7 @@ "DE.Views.EditTable.textTotalRow": "Total Row", "DE.Views.EditTable.textWithText": "Move with Text", "DE.Views.EditTable.textWrap": "Wrap", + "DE.Views.EditTable.textMergeCells": "Merge Cells", "DE.Views.EditText.textAdditional": "Additional", "DE.Views.EditText.textAdditionalFormat": "Additional Formatting", "DE.Views.EditText.textAllCaps": "All Caps",