[DE mobile] Merge Cells moved to context menu

This commit is contained in:
Julia Svinareva 2019-04-29 17:01:35 +03:00
parent 3bd69c7d11
commit 46409ac45d
5 changed files with 13 additions and 21 deletions

View file

@ -123,6 +123,8 @@ define([
me.api.Copy(); me.api.Copy();
} else if ('paste' == eventName) { } else if ('paste' == eventName) {
me.api.Paste(); me.api.Paste();
} else if ('merge' == eventName) {
me.api.MergeCells();
} else if ('delete' == eventName) { } else if ('delete' == eventName) {
me.api.asc_Remove(); me.api.asc_Remove();
} else if ('edit' == eventName) { } else if ('edit' == eventName) {
@ -399,6 +401,13 @@ define([
event: 'paste' event: 'paste'
}); });
if(isTable && me.api.CheckBeforeMergeCells()) {
menuItems.push({
caption: me.menuMerge,
event: 'merge'
});
}
menuItems.push({ menuItems.push({
caption: me.menuDelete, caption: me.menuDelete,
event: 'delete' event: 'delete'
@ -490,7 +499,8 @@ define([
menuAccept: 'Accept', menuAccept: 'Accept',
menuAcceptAll: 'Accept All', menuAcceptAll: 'Accept All',
menuReject: 'Reject', menuReject: 'Reject',
menuRejectAll: 'Reject All' menuRejectAll: 'Reject All',
menuMerge: 'Merge Cells'
} }
})(), DE.Controllers.DocumentHolder || {})) })(), DE.Controllers.DocumentHolder || {}))
}); });

View file

@ -236,7 +236,6 @@ define([
$('#table-options-margins input').val(distance); $('#table-options-margins input').val(distance);
$('#table-options-margins .item-after').text(distance + ' ' + _metricText); $('#table-options-margins .item-after').text(distance + ' ' + _metricText);
} }
$('#table-merge-cells').single('click', _.bind(this.onMergeCellClick, this));
}, },
_initWrappView: function() { _initWrappView: function() {
@ -615,11 +614,6 @@ define([
me.api.tblApply(properties); me.api.tblApply(properties);
}, },
onMergeCellClick: function () {
if (this.api) {
this.api.MergeCells();
}
},
onBorderSize: function (e) { onBorderSize: function (e) {
var $target = $(e.currentTarget), var $target = $(e.currentTarget),

View file

@ -220,17 +220,6 @@
</li> </li>
</ul> </ul>
</div> </div>
<div class="list-block" style="margin-bottom: 40px;">
<ul>
<a id="table-merge-cells" class="item-link no-indicator">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textMergeCells %></div>
</div>
</div>
</a>
</ul>
</div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -242,8 +242,7 @@ define([
textBandedRow: 'Banded Row', textBandedRow: 'Banded Row',
textFirstColumn: 'First Column', textFirstColumn: 'First Column',
textLastColumn: 'Last Column', textLastColumn: 'Last Column',
textBandedColumn: 'Banded Column', textBandedColumn: 'Banded Column'
textMergeCells: 'Merge Cells'
} }
})(), DE.Views.EditTable || {})) })(), DE.Views.EditTable || {}))
}); });

View file

@ -29,6 +29,7 @@
"DE.Controllers.DocumentHolder.menuReview": "Review", "DE.Controllers.DocumentHolder.menuReview": "Review",
"DE.Controllers.DocumentHolder.sheetCancel": "Cancel", "DE.Controllers.DocumentHolder.sheetCancel": "Cancel",
"DE.Controllers.DocumentHolder.textGuest": "Guest", "DE.Controllers.DocumentHolder.textGuest": "Guest",
"DE.Controllers.DocumentHolder.menuMerge": "Merge Cells",
"DE.Controllers.EditContainer.textChart": "Chart", "DE.Controllers.EditContainer.textChart": "Chart",
"DE.Controllers.EditContainer.textFooter": "Footer", "DE.Controllers.EditContainer.textFooter": "Footer",
"DE.Controllers.EditContainer.textHeader": "Header", "DE.Controllers.EditContainer.textHeader": "Header",
@ -338,7 +339,6 @@
"DE.Views.EditTable.textTotalRow": "Total Row", "DE.Views.EditTable.textTotalRow": "Total Row",
"DE.Views.EditTable.textWithText": "Move with Text", "DE.Views.EditTable.textWithText": "Move with Text",
"DE.Views.EditTable.textWrap": "Wrap", "DE.Views.EditTable.textWrap": "Wrap",
"DE.Views.EditTable.textMergeCells": "Merge Cells",
"DE.Views.EditText.textAdditional": "Additional", "DE.Views.EditText.textAdditional": "Additional",
"DE.Views.EditText.textAdditionalFormat": "Additional Formatting", "DE.Views.EditText.textAdditionalFormat": "Additional Formatting",
"DE.Views.EditText.textAllCaps": "All Caps", "DE.Views.EditText.textAllCaps": "All Caps",