[PE mobile] Bug 49391

This commit is contained in:
SergeyEzhin 2021-06-01 18:38:08 +03:00
parent e35bc37b0b
commit ddae1f9da3
2 changed files with 56 additions and 1 deletions

View file

@ -132,7 +132,10 @@
"ContextMenu": { "ContextMenu": {
"menuViewComment": "View Comment", "menuViewComment": "View Comment",
"menuAddComment": "Add Comment", "menuAddComment": "Add Comment",
"menuMerge": "Merge",
"menuSplit": "Split",
"menuDelete": "Delete", "menuDelete": "Delete",
"menuDeleteTable": "Delete Table",
"menuEdit": "Edit", "menuEdit": "Edit",
"menuAddLink": "Add Link", "menuAddLink": "Add Link",
"menuOpenLink": "Open Link", "menuOpenLink": "Open Link",
@ -140,7 +143,9 @@
"menuCancel": "Cancel", "menuCancel": "Cancel",
"textCopyCutPasteActions": "Copy, Cut and Paste Actions", "textCopyCutPasteActions": "Copy, Cut and Paste Actions",
"errorCopyCutPaste": "Copy, cut and paste actions using the context menu will be performed within the current file only.", "errorCopyCutPaste": "Copy, cut and paste actions using the context menu will be performed within the current file only.",
"textDoNotShowAgain": "Don't show again" "textDoNotShowAgain": "Don't show again",
"textColumns": "Columns",
"textRows": "Rows"
}, },
"Toolbar": { "Toolbar": {
"dlgLeaveTitleText": "You leave the application", "dlgLeaveTitleText": "You leave the application",

View file

@ -117,6 +117,56 @@ class ContextMenu extends ContextMenuController {
}).open(); }).open();
} }
showSplitModal() {
const { t } = this.props;
const _t = t("ContextMenu", { returnObjects: true });
let picker;
const dialog = f7.dialog.create({
title: _t.menuSplit,
text: '',
content: `<div class="content-block">
<div class="row">
<div class="col-50">${_t.textColumns}</div>
<div class="col-50">${_t.textRows}</div>
</div>
<div id="picker-split-size"></div>
</div>`,
buttons: [
{
text: _t.menuCancel
},
{
text: 'OK',
bold: true,
onClick: function () {
const size = picker.value;
Common.EditorApi.get().SplitCell(parseInt(size[0]), parseInt(size[1]));
}
}
]
}).open();
dialog.on('opened', () => {
picker = f7.picker.create({
containerEl: document.getElementById('picker-split-size'),
cols: [
{
textAlign: 'center',
width: '100%',
values: [1,2,3,4,5,6,7,8,9,10]
},
{
textAlign: 'center',
width: '100%',
values: [1,2,3,4,5,6,7,8,9,10]
}
],
toolbar: false,
rotateEffect: true,
value: [3, 3]
});
});
}
openLink(url) { openLink(url) {
const api = Common.EditorApi.get(); const api = Common.EditorApi.get();
if (api.asc_getUrlType(url) > 0) { if (api.asc_getUrlType(url) > 0) {