From 60a8c3c2248f0eb7315c298ecd19e557b2e85485 Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Thu, 17 Jun 2021 14:40:27 +0300 Subject: [PATCH 1/6] =?UTF-8?q?Refactoring=20code=20=E2=84=9648109?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/documenteditor/mobile/src/view/add/AddOther.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/documenteditor/mobile/src/view/add/AddOther.jsx b/apps/documenteditor/mobile/src/view/add/AddOther.jsx index 687bb0c077..b5d1119645 100644 --- a/apps/documenteditor/mobile/src/view/add/AddOther.jsx +++ b/apps/documenteditor/mobile/src/view/add/AddOther.jsx @@ -179,15 +179,14 @@ const AddOther = props => { {(isShape || isChart) ? null : - - - } - {(isShape || isChart) ? null : + , + { initFootnoteStartAt: props.initFootnoteStartAt }}> - } + ] + } ) }; From 670910d5f4d96fdad90be925d28c50f006aad60e Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Thu, 17 Jun 2021 16:11:26 +0300 Subject: [PATCH 2/6] [SSE mobile] Bug 50875 --- apps/spreadsheeteditor/mobile/src/controller/FilterOptions.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/spreadsheeteditor/mobile/src/controller/FilterOptions.jsx b/apps/spreadsheeteditor/mobile/src/controller/FilterOptions.jsx index e13be4046b..3a8742057d 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/FilterOptions.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/FilterOptions.jsx @@ -52,6 +52,8 @@ const FilterOptionsController = () => { const onSort = (type) => { const api = Common.EditorApi.get(); api.asc_sortColFilter(type == 'sortdown' ? Asc.c_oAscSortOptions.Ascending : Asc.c_oAscSortOptions.Descending, configFilter.asc_getCellId(), configFilter.asc_getDisplayName(), undefined, true); + f7.sheet.close('.picker__sheet'); + f7.popover.close('#picker-popover'); }; const onClearFilter = () => { From 005bb841dcc2e9dee33d53b6bcb24da9f66aabdd Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Thu, 17 Jun 2021 18:58:45 +0300 Subject: [PATCH 3/6] Fix Bug 50832 --- .../mobile/resources/less/common-material.less | 14 ++++++++++++++ .../mobile/src/view/add/AddImage.jsx | 2 +- .../mobile/src/view/add/AddOther.jsx | 4 ++-- .../mobile/src/view/add/AddImage.jsx | 2 +- .../mobile/src/view/add/AddImage.jsx | 2 +- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/apps/common/mobile/resources/less/common-material.less b/apps/common/mobile/resources/less/common-material.less index daa240ba9b..b2b44f5a94 100644 --- a/apps/common/mobile/resources/less/common-material.less +++ b/apps/common/mobile/resources/less/common-material.less @@ -56,6 +56,20 @@ } } + .add-popup { + .view{ + .block-title{ + margin-bottom: 0; + margin-top: 8px; + } + .inputs-list { + ul:after, :before{ + display: none; + } + } + } + } + // Buttons .segmented { .decrement, .increment { diff --git a/apps/documenteditor/mobile/src/view/add/AddImage.jsx b/apps/documenteditor/mobile/src/view/add/AddImage.jsx index 1fed2d95a5..aaaf9c31c3 100644 --- a/apps/documenteditor/mobile/src/view/add/AddImage.jsx +++ b/apps/documenteditor/mobile/src/view/add/AddImage.jsx @@ -11,7 +11,7 @@ const PageLinkSettings = props => { {_t.textAddress} - + { {(isShape || isChart) ? null : - [ { , - { {_t.textAddress} - + { {_t.textAddress} - + Date: Fri, 18 Jun 2021 18:07:15 +0300 Subject: [PATCH 4/6] [DE PE SSE mobile] Fix Bug 50903 --- apps/common/mobile/lib/component/ThemeColorPalette.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/common/mobile/lib/component/ThemeColorPalette.jsx b/apps/common/mobile/lib/component/ThemeColorPalette.jsx index 7a7dd86ad8..b0637aa453 100644 --- a/apps/common/mobile/lib/component/ThemeColorPalette.jsx +++ b/apps/common/mobile/lib/component/ThemeColorPalette.jsx @@ -56,12 +56,15 @@ const CustomColors = ({ options, customColors, onColorClick, curColor }) => { >) } } + + let indexCurColor = colors.indexOf(curColor); + return (
{colors && colors.length > 0 && colors.map((color, index) => { return( {onColorClick(color)}} > From 7a3aca5c8fff187ec994945cce81d3d786bff068 Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Mon, 21 Jun 2021 13:01:40 +0300 Subject: [PATCH 5/6] [PE SSE mobile] Fix Bug 50926 --- apps/presentationeditor/mobile/src/controller/ContextMenu.jsx | 2 +- apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/presentationeditor/mobile/src/controller/ContextMenu.jsx b/apps/presentationeditor/mobile/src/controller/ContextMenu.jsx index fde237e74f..99ed87b06b 100644 --- a/apps/presentationeditor/mobile/src/controller/ContextMenu.jsx +++ b/apps/presentationeditor/mobile/src/controller/ContextMenu.jsx @@ -111,7 +111,7 @@ class ContextMenu extends ContextMenuController { text: 'OK', onClick: () => { const dontShow = $$('input[name="checkbox-show"]').prop('checked'); - if (dontShow) LocalStorage.setItem("de-hide-copy-cut-paste-warning", 1); + if (dontShow) LocalStorage.setItem("pe-hide-copy-cut-paste-warning", 1); } }] }).open(); diff --git a/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx b/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx index 7965086fb8..15462d90b0 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx @@ -142,7 +142,7 @@ class ContextMenu extends ContextMenuController { text: 'OK', onClick: () => { const dontShow = $$('input[name="checkbox-show"]').prop('checked'); - if (dontShow) LocalStorage.setItem("de-hide-copy-cut-paste-warning", 1); + if (dontShow) LocalStorage.setItem("sse-hide-copy-cut-paste-warning", 1); } }] }).open(); From a09aaaf883c1c54b7ad0cae3dc0213decdadf7a8 Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Wed, 23 Jun 2021 14:50:39 +0300 Subject: [PATCH 6/6] [DE PE SSE mobile] Fix Bug 50794 --- apps/documenteditor/mobile/locale/en.json | 1 + .../mobile/src/controller/Main.jsx | 3 ++- .../mobile/src/controller/settings/Download.jsx | 15 +++++++++++++-- apps/presentationeditor/mobile/locale/en.json | 1 + .../mobile/src/controller/Main.jsx | 17 ++++++++++++++++- apps/spreadsheeteditor/mobile/locale/en.json | 3 ++- .../mobile/src/controller/Main.jsx | 3 ++- .../mobile/src/controller/settings/Download.jsx | 12 +++++++++++- 8 files changed, 48 insertions(+), 7 deletions(-) diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index 4419042343..ee1e7ff8d7 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -330,6 +330,7 @@ "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", + "txtIncorrectPwd": "Password is incorrect", "textNoTextFound": "Text not found", "textReplace": "Replace", "textReplaceAll": "Replace All", diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index b30a0f26bf..4bf67dcf4b 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -611,7 +611,8 @@ class MainController extends Component { this.api.asc_registerCallback('asc_onAdvancedOptions', (type, advOptions, mode, formatOptions) => { const {t} = this.props; const _t = t("Settings", { returnObjects: true }); - onAdvancedOptions(type, advOptions, mode, formatOptions, _t, this._isDocReady, this.props.storeAppOptions.canRequestClose); + onAdvancedOptions(type, advOptions, mode, formatOptions, _t, this._isDocReady, this.props.storeAppOptions.canRequestClose, this.isDRM); + if(type == Asc.c_oAscAdvancedOptionsID.DRM) this.isDRM = true; }); } diff --git a/apps/documenteditor/mobile/src/controller/settings/Download.jsx b/apps/documenteditor/mobile/src/controller/settings/Download.jsx index aa5982539e..a0d54ab35f 100644 --- a/apps/documenteditor/mobile/src/controller/settings/Download.jsx +++ b/apps/documenteditor/mobile/src/controller/settings/Download.jsx @@ -32,7 +32,7 @@ class DownloadController extends Component { () => { if (format == Asc.c_oAscFileType.TXT) { const isDocReady = this.props.storeAppOptions.isDocReady; - onAdvancedOptions(Asc.c_oAscAdvancedOptionsID.TXT, api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format), _t, isDocReady); + onAdvancedOptions(Asc.c_oAscAdvancedOptionsID.TXT, api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format), _t, isDocReady, isDRM); } else { api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); @@ -57,7 +57,7 @@ class DownloadController extends Component { const DownloadWithTranslation = inject("storeAppOptions")(observer(withTranslation()(DownloadController))); -const onAdvancedOptions = (type, advOptions, mode, formatOptions, _t, isDocReady, canRequestClose) => { +const onAdvancedOptions = (type, advOptions, mode, formatOptions, _t, isDocReady, canRequestClose, isDRM) => { if ($$('.dlg-adv-options.modal-in').length > 0) return; const api = Common.EditorApi.get(); @@ -134,6 +134,17 @@ const onAdvancedOptions = (type, advOptions, mode, formatOptions, _t, isDocReady } } }]; + + if(isDRM) { + f7.dialog.create({ + text: _t.txtIncorrectPwd, + buttons : [{ + text: 'OK', + bold: true, + }] + }).open(); + } + if (canRequestClose) buttons.push({ text: _t.closeButtonText, diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json index c7de2720b5..5546b03035 100644 --- a/apps/presentationeditor/mobile/locale/en.json +++ b/apps/presentationeditor/mobile/locale/en.json @@ -29,6 +29,7 @@ "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", + "txtIncorrectPwd": "Password is incorrect", "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.", diff --git a/apps/presentationeditor/mobile/src/controller/Main.jsx b/apps/presentationeditor/mobile/src/controller/Main.jsx index 6210b4bf67..720a355394 100644 --- a/apps/presentationeditor/mobile/src/controller/Main.jsx +++ b/apps/presentationeditor/mobile/src/controller/Main.jsx @@ -300,7 +300,6 @@ class MainController extends Component { this.api.asc_registerCallback('asc_onDocumentContentReady', this.onDocumentContentReady.bind(this)); this.api.asc_registerCallback('asc_onDocumentUpdateVersion', this.onUpdateVersion.bind(this)); this.api.asc_registerCallback('asc_onServerVersion', this.onServerVersion.bind(this)); - this.api.asc_registerCallback('asc_onAdvancedOptions', this.onAdvancedOptions.bind(this)); this.api.asc_registerCallback('asc_onDocumentName', this.onDocumentName.bind(this)); this.api.asc_registerCallback('asc_onPrintUrl', this.onPrintUrl.bind(this)); this.api.asc_registerCallback('asc_onPrint', this.onPrint.bind(this)); @@ -310,6 +309,10 @@ class MainController extends Component { const storePresentationSettings = this.props.storePresentationSettings; + this.api.asc_registerCallback('asc_onAdvancedOptions', (type, advOptions) => { + this.onAdvancedOptions(type, advOptions); + }); + this.api.asc_registerCallback('asc_onPresentationSize', (width, height) => { storePresentationSettings.changeSizeIndex(width, height); }); @@ -604,6 +607,17 @@ class MainController extends Component { } } }]; + + if(this.isDRM) { + f7.dialog.create({ + text: _t.txtIncorrectPwd, + buttons : [{ + text: 'OK', + bold: true, + }] + }).open(); + } + if (this.props.storeAppOptions.canRequestClose) buttons.push({ text: _t.closeButtonText, @@ -620,6 +634,7 @@ class MainController extends Component { buttons: buttons, cssClass: 'dlg-adv-options' }).open(); + this.isDRM = true; } } diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index 8c9a6f6b0c..7921455e0b 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -164,7 +164,7 @@ "errorFrmlMaxTextLength": "Text values in formulas are limited to 255 characters.
Use the CONCATENATE function or concatenation operator (&)", "errorFrmlMaxLength": "You cannot add this formula as its length exceeded the allowed number of characters.
Please edit it and try again.", "errorFrmlMaxReference": "You cannot enter this formula because it has too many values,
cell references, and/or names.", - "errorDataValidate":"The value you entered is not valid.
A user has restricted values that can be entered into this cell.", + "errorDataValidate": "The value you entered is not valid.
A user has restricted values that can be entered into this cell.", "errorLockedCellPivot": "You cannot change data inside a pivot table." }, "ContextMenu": { @@ -460,6 +460,7 @@ "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", + "txtIncorrectPwd": "Password is incorrect", "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 f23dd952d5..a021ed9e24 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Main.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Main.jsx @@ -323,7 +323,8 @@ class MainController extends Component { this.api.asc_registerCallback('asc_onAdvancedOptions', (type, advOptions, mode, formatOptions) => { const {t} = this.props; const _t = t("View.Settings", { returnObjects: true }); - onAdvancedOptions(type, advOptions, mode, formatOptions, _t, this._isDocReady, this.props.storeAppOptions.canRequestClose); + onAdvancedOptions(type, advOptions, mode, formatOptions, _t, this._isDocReady, this.props.storeAppOptions.canRequestClose,this.isDRM); + if(type == Asc.c_oAscAdvancedOptionsID.DRM) this.isDRM = true; }); } diff --git a/apps/spreadsheeteditor/mobile/src/controller/settings/Download.jsx b/apps/spreadsheeteditor/mobile/src/controller/settings/Download.jsx index 320a6e6506..24dc66428a 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/settings/Download.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/settings/Download.jsx @@ -39,7 +39,7 @@ class DownloadController extends Component { const DownloadWithTranslation = withTranslation()(DownloadController); -const onAdvancedOptions = (type, advOptions, mode, formatOptions, _t, isDocReady, canRequestClose) => { +const onAdvancedOptions = (type, advOptions, mode, formatOptions, _t, isDocReady, canRequestClose, isDRM) => { const api = Common.EditorApi.get(); if (type == Asc.c_oAscAdvancedOptionsID.CSV) { @@ -136,6 +136,16 @@ const onAdvancedOptions = (type, advOptions, mode, formatOptions, _t, isDocReady } }]; + if(isDRM) { + f7.dialog.create({ + text: _t.txtIncorrectPwd, + buttons : [{ + text: 'OK', + bold: true, + }] + }).open(); + } + if (canRequestClose) buttons.push({ text: _t.closeButtonText,