[SSE mobile] Add Freeze Panes in context menu

This commit is contained in:
Julia Svinareva 2019-05-07 19:28:51 +03:00
parent 110dec35de
commit 9f3773cc59
2 changed files with 21 additions and 1 deletions

View file

@ -152,6 +152,9 @@ define([
me.api.asc_getUrlType(url) > 0 && openLink(url); me.api.asc_getUrlType(url) > 0 && openLink(url);
} }
break; break;
case 'freezePanes':
me.api.asc_freezePane();
break;
} }
if ('showActionSheet' == event && _actionSheets.length > 0) { if ('showActionSheet' == event && _actionSheets.length > 0) {
@ -320,9 +323,22 @@ define([
}); });
} }
} }
if (!this.api.asc_getSheetViewSettings().asc_getIsFreezePane()) {
menuItems.push({
caption: me.menuFreezePanes,
event: 'freezePanes'
});
} else {
menuItems.push({
caption: me.menuUnfreezePanes,
event: 'freezePanes'
});
}
} }
} }
if (Common.SharedSettings.get('phone') && menuItems.length > 3) { if (Common.SharedSettings.get('phone') && menuItems.length > 3) {
_actionSheets = menuItems.slice(3); _actionSheets = menuItems.slice(3);
@ -356,7 +372,9 @@ define([
menuEdit: 'Edit', menuEdit: 'Edit',
menuCell: 'Cell', menuCell: 'Cell',
menuMore: 'More', menuMore: 'More',
sheetCancel: 'Cancel' sheetCancel: 'Cancel',
menuFreezePanes: 'Freeze Panes',
menuUnfreezePanes: 'Unfreeze Panes'
} }
})(), SSE.Controllers.DocumentHolder || {})) })(), SSE.Controllers.DocumentHolder || {}))
}); });

View file

@ -33,6 +33,8 @@
"SSE.Controllers.DocumentHolder.menuWrap": "Wrap", "SSE.Controllers.DocumentHolder.menuWrap": "Wrap",
"SSE.Controllers.DocumentHolder.sheetCancel": "Cancel", "SSE.Controllers.DocumentHolder.sheetCancel": "Cancel",
"SSE.Controllers.DocumentHolder.warnMergeLostData": "Operation can destroy data in the selected cells.<br>Continue?", "SSE.Controllers.DocumentHolder.warnMergeLostData": "Operation can destroy data in the selected cells.<br>Continue?",
"SSE.Controllers.DocumentHolder.menuFreezePanes": "Freeze Panes",
"SSE.Controllers.DocumentHolder.menuUnfreezePanes": "Unfreeze Panes",
"SSE.Controllers.EditCell.textAuto": "Auto", "SSE.Controllers.EditCell.textAuto": "Auto",
"SSE.Controllers.EditCell.textFonts": "Fonts", "SSE.Controllers.EditCell.textFonts": "Fonts",
"SSE.Controllers.EditCell.textPt": "pt", "SSE.Controllers.EditCell.textPt": "pt",