diff --git a/apps/common/mobile/lib/controller/collaboration/Comments.jsx b/apps/common/mobile/lib/controller/collaboration/Comments.jsx index e1ebcda4b..8e4951b1a 100644 --- a/apps/common/mobile/lib/controller/collaboration/Comments.jsx +++ b/apps/common/mobile/lib/controller/collaboration/Comments.jsx @@ -478,6 +478,7 @@ class ViewCommentsController extends Component { } deleteComment (comment) { const api = Common.EditorApi.get(); + Device.phone ? f7.sheet.close('#view-comment-sheet') : f7.popover.close('#view-comment-popover'); comment && api.asc_removeComment(comment.uid); } deleteReply (comment, reply) { diff --git a/apps/common/mobile/resources/less/common-ios.less b/apps/common/mobile/resources/less/common-ios.less index 396a2051a..a4c90680a 100644 --- a/apps/common/mobile/resources/less/common-ios.less +++ b/apps/common/mobile/resources/less/common-ios.less @@ -541,4 +541,26 @@ white-space: normal; text-overflow: ellipsis; } + + input.modal-text-input { + box-sizing: border-box; + height: 26px; + background: #fff; + margin: 0; + margin-top: 15px; + padding: 0 5px; + border: 1px solid rgba(0,0,0,.3); + border-radius: 0; + width: 100%; + font-size: 14px; + font-family: inherit; + display: block; + box-shadow: 0 0 0 transparent; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + } } + + diff --git a/apps/common/mobile/resources/less/common-material.less b/apps/common/mobile/resources/less/common-material.less index c3cf6f0d3..daa240ba9 100644 --- a/apps/common/mobile/resources/less/common-material.less +++ b/apps/common/mobile/resources/less/common-material.less @@ -477,4 +477,39 @@ margin-left: 0; } } + + input.modal-text-input { + box-sizing: border-box; + height: 36px; + background: #fff; + margin: 0; + margin-top: 15px; + padding: 0; + border: none; + width: 100%; + font-size: 16px; + font-family: inherit; + display: block; + box-shadow: none; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + -webkit-transition-duration: .2s; + transition-duration: .2s; + } + + .input-field { + .inputs-list { + margin: 15px 0 0; + ul { + &::before, &::after { + display: none; + } + } + .item-input, .item-inner { + padding: 0; + } + } + } } diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index eb22ff811..464648cc9 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -331,6 +331,7 @@ "closeButtonText": "Close File", "advDRMOptions": "Protected File", "txtProtected": "Once you enter the password and open the file, the current password to the file will be reset", + "textOpenFile": "Enter a password to open the file", "textNoTextFound": "Text not found", "textReplace": "Replace", "textReplaceAll": "Replace All", diff --git a/apps/documenteditor/mobile/src/controller/settings/Download.jsx b/apps/documenteditor/mobile/src/controller/settings/Download.jsx index 7f7db5e3f..858dbfa65 100644 --- a/apps/documenteditor/mobile/src/controller/settings/Download.jsx +++ b/apps/documenteditor/mobile/src/controller/settings/Download.jsx @@ -122,16 +122,16 @@ const onAdvancedOptions = (type, advOptions, mode, formatOptions, _t, isDocReady }); } else if (type == Asc.c_oAscAdvancedOptionsID.DRM) { Common.Notifications.trigger('preloader:close'); - Common.Notifications.trigger('preloader:endAction', Asc.c_oAscAsyncActionType['BlockInteraction'], -256); + // Common.Notifications.trigger('preloader:endAction', Asc.c_oAscAsyncActionType['BlockInteraction'], -256); const buttons = [{ text: 'OK', bold: true, onClick: function () { const password = document.getElementById('modal-password').value; api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(password)); - if (!isDocReady) { - Common.Notifications.trigger('preloader:beginAction', Asc.c_oAscAsyncActionType['BlockInteraction'], -256); - } + // if (!isDocReady) { + // Common.Notifications.trigger('preloader:beginAction', Asc.c_oAscAsyncActionType['BlockInteraction'], -256); + // } } }]; if (canRequestClose) @@ -143,9 +143,9 @@ const onAdvancedOptions = (type, advOptions, mode, formatOptions, _t, isDocReady }); f7.dialog.create({ title: _t.advDRMOptions, - text: _t.txtProtected, - content: - '
', + text: _t.textOpenFile, + content: Device.ios ? + '
' : '
', buttons: buttons, cssClass: 'dlg-adv-options' }).open(); diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json index c83fb611a..7bcd5c37c 100644 --- a/apps/presentationeditor/mobile/locale/en.json +++ b/apps/presentationeditor/mobile/locale/en.json @@ -27,7 +27,8 @@ "closeButtonText": "Close File", "advDRMOptions": "Protected File", "advDRMPassword": "Password", - + "txtProtected": "Once you enter the password and open the file, the current password to the file will be reset", + "textOpenFile": "Enter a password to open the file", "leavePageText": "You have unsaved changes in this document. Click 'Stay on this Page' to await the autosave of the document. Click 'Leave this Page' to discard all the unsaved changes.", "titleLicenseExp": "License expired", "warnLicenseExp": "Your license has expired. Please update your license and refresh the page.", @@ -132,7 +133,10 @@ "ContextMenu": { "menuViewComment": "View Comment", "menuAddComment": "Add Comment", + "menuMerge": "Merge", + "menuSplit": "Split", "menuDelete": "Delete", + "menuDeleteTable": "Delete Table", "menuEdit": "Edit", "menuAddLink": "Add Link", "menuOpenLink": "Open Link", @@ -140,7 +144,9 @@ "menuCancel": "Cancel", "textCopyCutPasteActions": "Copy, Cut and Paste Actions", "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": { "dlgLeaveTitleText": "You leave the application", diff --git a/apps/presentationeditor/mobile/src/controller/ContextMenu.jsx b/apps/presentationeditor/mobile/src/controller/ContextMenu.jsx index e72ce5d66..fde237e74 100644 --- a/apps/presentationeditor/mobile/src/controller/ContextMenu.jsx +++ b/apps/presentationeditor/mobile/src/controller/ContextMenu.jsx @@ -117,6 +117,56 @@ class ContextMenu extends ContextMenuController { }).open(); } + showSplitModal() { + const { t } = this.props; + const _t = t("ContextMenu", { returnObjects: true }); + let picker; + const dialog = f7.dialog.create({ + title: _t.menuSplit, + text: '', + content: `
+
+
${_t.textColumns}
+
${_t.textRows}
+
+
+
`, + 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) { const api = Common.EditorApi.get(); if (api.asc_getUrlType(url) > 0) { diff --git a/apps/presentationeditor/mobile/src/controller/Main.jsx b/apps/presentationeditor/mobile/src/controller/Main.jsx index e34fed388..a6a850a4f 100644 --- a/apps/presentationeditor/mobile/src/controller/Main.jsx +++ b/apps/presentationeditor/mobile/src/controller/Main.jsx @@ -14,6 +14,7 @@ import LongActionsController from "./LongActions"; import {LocalStorage} from "../../../../common/mobile/utils/LocalStorage"; import About from '../../../../common/mobile/lib/view/About'; import PluginsController from '../../../../common/mobile/lib/controller/Plugins.jsx'; +import { Device } from '../../../../common/mobile/utils/device'; @inject( "storeFocusObjects", @@ -585,7 +586,7 @@ class MainController extends Component { if (type == Asc.c_oAscAdvancedOptionsID.DRM) { Common.Notifications.trigger('preloader:close'); - Common.Notifications.trigger('preloader:endAction', Asc.c_oAscAsyncActionType['BlockInteraction'], this.LoadingDocument); + // Common.Notifications.trigger('preloader:endAction', Asc.c_oAscAsyncActionType['BlockInteraction'], this.LoadingDocument); const buttons = [{ text: 'OK', @@ -595,9 +596,9 @@ class MainController extends Component { const password = document.getElementById('modal-password').value; this.api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(password)); - if (!this._isDocReady) { - Common.Notifications.trigger('preloader:beginAction', Asc.c_oAscAsyncActionType['BlockInteraction'], this.LoadingDocument); - } + // if (!this._isDocReady) { + // Common.Notifications.trigger('preloader:beginAction', Asc.c_oAscAsyncActionType['BlockInteraction'], this.LoadingDocument); + // } } }]; if (this.props.storeAppOptions.canRequestClose) @@ -610,11 +611,9 @@ class MainController extends Component { f7.dialog.create({ title: _t.advDRMOptions, - text: (typeof advOptions === 'string' ? advOptions : _t.txtProtected), - content: - `
- -
`, + text: _t.textOpenFile, + content: Device.ios ? + '
' : '
', buttons: buttons, cssClass: 'dlg-adv-options' }).open(); diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index afedbcdc0..4784e7f7d 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -458,6 +458,7 @@ "advDRMPassword": "Password", "closeButtonText": "Close File", "txtProtected": "Once you enter the password and open the file, the current password to the file will be reset", + "textOpenFile": "Enter a password to open the file", "textCancel": "Cancel", "textUnitOfMeasurement": "Unit Of Measurement", "textCentimeter": "Centimeter", diff --git a/apps/spreadsheeteditor/mobile/src/controller/Main.jsx b/apps/spreadsheeteditor/mobile/src/controller/Main.jsx index 466c4b7be..3d2d5ea0d 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Main.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Main.jsx @@ -318,7 +318,7 @@ class MainController extends Component { this.api.asc_registerCallback('asc_onAdvancedOptions', (type, advOptions, mode, formatOptions) => { const {t} = this.props; - const _t = t("Settings", { returnObjects: true }); + const _t = t("View.Settings", { returnObjects: true }); onAdvancedOptions(type, advOptions, mode, formatOptions, _t, this.props.storeAppOptions.canRequestClose); }); diff --git a/apps/spreadsheeteditor/mobile/src/controller/settings/Download.jsx b/apps/spreadsheeteditor/mobile/src/controller/settings/Download.jsx index 91d4b6be4..ac3829d56 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/settings/Download.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/settings/Download.jsx @@ -121,6 +121,7 @@ const onAdvancedOptions = (type, advOptions, mode, formatOptions, _t, canRequest }); } else if (type == Asc.c_oAscAdvancedOptionsID.DRM) { + Common.Notifications.trigger('preloader:close'); //me.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument); const buttons = [{ text: 'OK', @@ -144,9 +145,9 @@ const onAdvancedOptions = (type, advOptions, mode, formatOptions, _t, canRequest f7.dialog.create({ title: _t.advDRMOptions, - text: _t.txtProtected, - content: - '
', + text: _t.textOpenFile, + content: Device.ios ? + '
' : '
', buttons: buttons }).open(); } diff --git a/apps/spreadsheeteditor/mobile/src/less/app-ios.less b/apps/spreadsheeteditor/mobile/src/less/app-ios.less index 7dd7f4917..38ff8771c 100644 --- a/apps/spreadsheeteditor/mobile/src/less/app-ios.less +++ b/apps/spreadsheeteditor/mobile/src/less/app-ios.less @@ -1,25 +1,5 @@ .device-ios { - input.modal-text-input { - box-sizing: border-box; - height: 26px; - background: #fff; - margin: 0; - margin-top: 15px; - padding: 0 5px; - border: 1px solid rgba(0,0,0,.3); - border-radius: 0; - width: 100%; - font-size: 14px; - font-family: inherit; - display: block; - box-shadow: 0 0 0 transparent; - -webkit-appearance: none; - -moz-appearance: none; - -ms-appearance: none; - appearance: none; - } - // For filter options .radio-checkbox-item { label.item-content input[type=checkbox]:checked ~ .item-inner {