[DE mobile] Fixed display context menu items.

This commit is contained in:
Alexander Yuzhin 2016-11-23 11:06:35 +03:00
parent 9492ea3d38
commit 180b21a8b8

View file

@ -204,18 +204,21 @@ define([
};
if (!objectLocked && _isEdit) {
menuItems.push({
caption: me.menuCut,
event: 'cut'
});
if (canCopy) {
menuItems.push({
caption: me.menuCut,
event: 'cut'
});
// Swap 'Copy' and 'Cut'
swapItems(menuItems, 0, 1);
}
menuItems.push({
caption: me.menuPaste,
event: 'paste'
});
// Swap 'Copy' and 'Cut'
swapItems(menuItems, 0, 1);
menuItems.push({
caption: me.menuDelete,
event: 'delete'
@ -225,15 +228,13 @@ define([
caption: me.menuEdit,
event: 'edit'
});
}
var text = me.api.can_AddHyperlink();
if (!_.isEmpty(text)) {
menuItems.push({
caption: me.menuAddLink,
event: 'addlink'
});
if (!_.isEmpty(me.api.can_AddHyperlink())) {
menuItems.push({
caption: me.menuAddLink,
event: 'addlink'
});
}
}
}