diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index 3ea667ffb8..8048860eca 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -517,6 +517,7 @@ "errorUpdateVersion": "The file version has been changed. The page will be reloaded.", "leavePageText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", "notcriticalErrorTitle": "Warning", + "textConvertForm": "Download file as pdf to save the form in the format ready for filling.", "SDK": { " -Section ": " -Section ", "above": "above", @@ -729,7 +730,7 @@ "textRightToLeft": "Right To Left", "textSameAsSystem": "Same as system", "textSave": "Save", - "textSaveAsPdf": "Save as PDF", + "del_textSaveAsPdf": "Save as PDF", "textSearch": "Search", "textSetPassword": "Set Password", "textSettings": "Settings", diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index 300bd7f611..053578c56c 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -239,8 +239,10 @@ class MainController extends Component { if (this._isDocReady) return; + const { t } = this.props; const appOptions = this.props.storeAppOptions; const isForm = appOptions.isForm; + const isOForm = appOptions.isOForm; const appSettings = this.props.storeApplicationSettings; f7.emit('resize'); @@ -302,6 +304,18 @@ class MainController extends Component { Common.Notifications.trigger('document:ready'); Common.Gateway.documentReady(); appOptions.changeDocReady(true); + + if(isOForm) { + f7.dialog.create({ + title: t('Main.notcriticalErrorTitle'), + text: t('Main.textConvertForm'), + buttons: [ + { + text: t('Main.textOk') + } + ] + }).open(); + } }; const _process_array = (array, fn) => { diff --git a/apps/documenteditor/mobile/src/store/appOptions.js b/apps/documenteditor/mobile/src/store/appOptions.js index 3a2968f892..89fea45854 100644 --- a/apps/documenteditor/mobile/src/store/appOptions.js +++ b/apps/documenteditor/mobile/src/store/appOptions.js @@ -178,6 +178,8 @@ export class storeAppOptions { this.fileKey = document.key; this.isXpsViewer = /^(?:(djvu|xps|oxps))$/.exec(document.fileType); this.typeForm = /^(?:(pdf))$/.exec(document.fileType); // can fill forms only in pdf format + this.typeOForm = /^(?:(oform))$/.exec(document.fileType); + this.isOForm = !!(this.typeOForm && typeof this.typeOForm[1] === 'string'); this.canFillForms = this.canLicense && !!(this.typeForm && typeof this.typeForm[1] === 'string') && ((permissions.fillForms === undefined) ? this.isEdit : permissions.fillForms) && (this.config.mode !== 'view'); this.isForm = !this.isXpsViewer && !!window.isPDFForm; this.canProtect = permissions.protect !== false; diff --git a/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx b/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx index a52d18a644..09f491902d 100644 --- a/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx +++ b/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx @@ -85,7 +85,7 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo : ''), (_canDownload && canFillForms && !canSubmitForms ? - + : ''), diff --git a/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx b/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx index 9ea0cd793c..045e02151d 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx @@ -1,4 +1,3 @@ -import React, { useContext } from 'react'; import { f7 } from 'framework7-react'; import { inject, observer } from "mobx-react"; import { withTranslation} from 'react-i18next'; @@ -6,7 +5,6 @@ import { LocalStorage } from '../../../../common/mobile/utils/LocalStorage.mjs'; import ContextMenuController from '../../../../common/mobile/lib/controller/ContextMenu'; import { idContextMenuElement } from '../../../../common/mobile/lib/view/ContextMenu'; -// import { Device } from '../../../../common/mobile/utils/device'; import EditorUIController from '../lib/patch'; @inject(stores => ({ @@ -17,7 +15,7 @@ import EditorUIController from '../lib/patch'; isRestrictedEdit: stores.storeAppOptions.isRestrictedEdit, users: stores.users, isDisconnected: stores.users.isDisconnected, - storeSheets: stores.sheets, + storeWorksheets: stores.storeWorksheets, wsProps: stores.storeWorksheets.wsProps, wsLock: stores.storeWorksheets.wsLock, objects: stores.storeFocusObjects.objects, @@ -106,6 +104,7 @@ class ContextMenu extends ContextMenuController { const api = Common.EditorApi.get(); const info = api.asc_getCellInfo(); + switch (action) { case 'cut': if (!LocalStorage.getBool("sse-hide-copy-cut-paste-warning")) { @@ -127,17 +126,19 @@ class ContextMenu extends ContextMenuController { break; case 'openlink': const linkinfo = info.asc_getHyperlink(); + if ( linkinfo.asc_getType() == Asc.c_oAscHyperlinkType.RangeLink ) { + const { storeWorksheets } = this.props; const nameSheet = linkinfo.asc_getSheet(); const curActiveSheet = api.asc_getActiveWorksheetIndex(); + const tab = storeWorksheets.sheets.find((sheet) => sheet.name === nameSheet); api.asc_setWorksheetRange(linkinfo); - const {storeSheets} = this.props; - const tab = storeSheets.sheets.find((sheet) => sheet.name === nameSheet); + if (tab) { const sdkIndex = tab.index; if (sdkIndex !== curActiveSheet) { - const index = storeSheets.sheets.indexOf(tab); - storeSheets.setActiveWorksheet(index); + const index = storeWorksheets.sheets.indexOf(tab); + storeWorksheets.setActiveWorksheet(index); Common.Notifications.trigger('sheet:active', sdkIndex); } } diff --git a/apps/spreadsheeteditor/mobile/src/store/mainStore.js b/apps/spreadsheeteditor/mobile/src/store/mainStore.js index 2b834d3fd5..9bcda9c61c 100644 --- a/apps/spreadsheeteditor/mobile/src/store/mainStore.js +++ b/apps/spreadsheeteditor/mobile/src/store/mainStore.js @@ -1,8 +1,5 @@ - -// import {storeDocumentSettings} from './documentSettings'; import {storeFocusObjects} from "./focusObjects"; import {storeUsers} from '../../../../common/mobile/lib/store/users'; -import {storeWorksheets} from './sheets'; import {storeFunctions} from './functions'; import {storePalette} from "./palette"; import {storeTextSettings} from "./textSettings"; @@ -20,6 +17,7 @@ import {storeComments} from "../../../../common/mobile/lib/store/comments"; import {storeToolbarSettings} from "./toolbar"; import { storeThemes } from '../../../../common/mobile/lib/store/themes'; import { storeVersionHistory } from "../../../../common/mobile/lib/store/versionHistory"; +import {storeWorksheets} from "./sheets"; export const stores = { storeFocusObjects: new storeFocusObjects(), diff --git a/apps/spreadsheeteditor/mobile/src/store/sheets.js b/apps/spreadsheeteditor/mobile/src/store/sheets.js index ed2db7b868..b0ed4f4421 100644 --- a/apps/spreadsheeteditor/mobile/src/store/sheets.js +++ b/apps/spreadsheeteditor/mobile/src/store/sheets.js @@ -20,7 +20,7 @@ class Worksheet { } export class storeWorksheets { - sheets; + sheets = []; constructor() { makeObservable(this, {