[SSE mobile] Bug 37839

This commit is contained in:
Julia Svinareva 2020-02-03 14:28:33 +03:00
parent f4039727c3
commit 80237917d3

View file

@ -188,7 +188,7 @@ define([
},
onApiShowPopMenu: function(posX, posY) {
if ( !_isEdit || this.isDisconnected) return;
if (this.isDisconnected) return;
if ($('.popover.settings, .popup.settings, .picker-modal.settings, .modal-in, .actions-modal').length > 0) {
return;
@ -230,6 +230,22 @@ define([
case Asc.c_oAscSelectionType.RangeShapeText: istextshapemenu = true; break;
}
if (!_isEdit) {
if (iscellmenu || istextchartmenu || istextshapemenu) {
arrItemsIcon = [{
caption: me.menuCopy,
event: 'copy',
icon: 'icon-copy'
}];
}
if (iscellmenu && cellinfo.asc_getHyperlink()) {
arrItems.push({
caption: me.menuOpenLink,
event: 'openlink'
});
}
} else {
if (!iscelllocked && (isimagemenu || isshapemenu || ischartmenu || istextshapemenu || istextchartmenu)) {
this.api.asc_getGraphicObjectProps().every(function (object) {
if (object.asc_getObjectType() == Asc.c_oAscTypeSelectElement.Image) {
@ -240,7 +256,7 @@ define([
});
}
if ( iscelllocked || this.api.isCellEdited ) {
if (iscelllocked || this.api.isCellEdited) {
arrItemsIcon = [{
caption: me.menuCopy,
event: 'copy',
@ -252,11 +268,11 @@ define([
caption: me.menuCut,
event: 'cut',
icon: 'icon-cut'
},{
}, {
caption: me.menuCopy,
event: 'copy',
icon: 'icon-copy'
},{
}, {
caption: me.menuPaste,
event: 'paste',
icon: 'icon-paste'
@ -269,23 +285,21 @@ define([
// isTableLocked = cellinfo.asc_getLockedTable()===true;
if (isimagemenu || isshapemenu || ischartmenu ||
istextshapemenu || istextchartmenu )
{
istextshapemenu || istextchartmenu) {
arrItems.push({
caption: me.menuEdit,
event: 'edit'
});
} else {
if ( iscolmenu || isrowmenu) {
if (iscolmenu || isrowmenu) {
arrItems.push({
caption: me.menuHide,
event: 'hide'
},{
}, {
caption: me.menuShow,
event: 'show'
});
} else
if ( iscellmenu ) {
} else if (iscellmenu) {
!iscelllocked &&
arrItems.push({
caption: me.menuCell,
@ -315,17 +329,14 @@ define([
event: 'wrap'
});
if ( cellinfo.asc_getHyperlink() && !cellinfo.asc_getFlags().asc_getMultiselect() &&
cellinfo.asc_getHyperlink().asc_getType() == Asc.c_oAscHyperlinkType.WebLink )
{
if (cellinfo.asc_getHyperlink() && !cellinfo.asc_getFlags().asc_getMultiselect() &&
cellinfo.asc_getHyperlink().asc_getType() == Asc.c_oAscHyperlinkType.WebLink) {
arrItems.push({
caption: me.menuOpenLink,
event: 'openlink'
});
} else
if ( !cellinfo.asc_getHyperlink() && !cellinfo.asc_getFlags().asc_getMultiselect() &&
!cellinfo.asc_getFlags().asc_getLockText() && !!cellinfo.asc_getText() )
{
} else if (!cellinfo.asc_getHyperlink() && !cellinfo.asc_getFlags().asc_getMultiselect() &&
!cellinfo.asc_getFlags().asc_getLockText() && !!cellinfo.asc_getText()) {
arrItems.push({
caption: me.menuAddLink,
event: 'addlink'
@ -342,7 +353,6 @@ define([
}
if (Common.SharedSettings.get('phone') && arrItems.length > 2) {
_actionSheets = arrItems.slice(2);
@ -352,6 +362,7 @@ define([
event: 'showActionSheet'
});
}
}
var menuItems = {itemsIcon: arrItemsIcon, items: arrItems};