diff --git a/apps/documenteditor/mobile/app/controller/DocumentHolder.js b/apps/documenteditor/mobile/app/controller/DocumentHolder.js index 0e9841f63..9cf53f5d3 100644 --- a/apps/documenteditor/mobile/app/controller/DocumentHolder.js +++ b/apps/documenteditor/mobile/app/controller/DocumentHolder.js @@ -123,6 +123,8 @@ define([ me.api.Copy(); } else if ('paste' == eventName) { me.api.Paste(); + } else if ('merge' == eventName) { + me.api.MergeCells(); } else if ('delete' == eventName) { me.api.asc_Remove(); } else if ('edit' == eventName) { @@ -399,6 +401,13 @@ define([ event: 'paste' }); + if(isTable && me.api.CheckBeforeMergeCells()) { + menuItems.push({ + caption: me.menuMerge, + event: 'merge' + }); + } + menuItems.push({ caption: me.menuDelete, event: 'delete' @@ -490,7 +499,8 @@ define([ menuAccept: 'Accept', menuAcceptAll: 'Accept All', menuReject: 'Reject', - menuRejectAll: 'Reject All' + menuRejectAll: 'Reject All', + menuMerge: 'Merge Cells' } })(), DE.Controllers.DocumentHolder || {})) }); \ No newline at end of file diff --git a/apps/documenteditor/mobile/app/controller/edit/EditTable.js b/apps/documenteditor/mobile/app/controller/edit/EditTable.js index d0a10e4aa..48737cd56 100644 --- a/apps/documenteditor/mobile/app/controller/edit/EditTable.js +++ b/apps/documenteditor/mobile/app/controller/edit/EditTable.js @@ -236,7 +236,6 @@ 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() { @@ -615,11 +614,6 @@ define([ me.api.tblApply(properties); }, - onMergeCellClick: function () { - if (this.api) { - this.api.MergeCells(); - } - }, onBorderSize: function (e) { var $target = $(e.currentTarget), diff --git a/apps/documenteditor/mobile/app/template/EditTable.template b/apps/documenteditor/mobile/app/template/EditTable.template index e24b1cdc2..7347774d9 100644 --- a/apps/documenteditor/mobile/app/template/EditTable.template +++ b/apps/documenteditor/mobile/app/template/EditTable.template @@ -220,17 +220,6 @@ -
- -
diff --git a/apps/documenteditor/mobile/app/view/edit/EditTable.js b/apps/documenteditor/mobile/app/view/edit/EditTable.js index e9ae443b6..279ddd11d 100644 --- a/apps/documenteditor/mobile/app/view/edit/EditTable.js +++ b/apps/documenteditor/mobile/app/view/edit/EditTable.js @@ -242,8 +242,7 @@ define([ textBandedRow: 'Banded Row', textFirstColumn: 'First Column', textLastColumn: 'Last Column', - textBandedColumn: 'Banded Column', - textMergeCells: 'Merge Cells' + textBandedColumn: 'Banded Column' } })(), 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 0bda8afed..8167ca51d 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -29,6 +29,7 @@ "DE.Controllers.DocumentHolder.menuReview": "Review", "DE.Controllers.DocumentHolder.sheetCancel": "Cancel", "DE.Controllers.DocumentHolder.textGuest": "Guest", + "DE.Controllers.DocumentHolder.menuMerge": "Merge Cells", "DE.Controllers.EditContainer.textChart": "Chart", "DE.Controllers.EditContainer.textFooter": "Footer", "DE.Controllers.EditContainer.textHeader": "Header", @@ -338,7 +339,6 @@ "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",