From c1b8e34f9e651bf34a002185e0a3e0590cfd5d9c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 26 Nov 2021 14:10:44 +0300 Subject: [PATCH 1/4] [Embedded][Forms] Fix Bug 54104 --- apps/documenteditor/embed/js/ApplicationController.js | 8 +++++++- apps/documenteditor/embed/locale/en.json | 1 + .../forms/app/controller/ApplicationController.js | 7 ++++++- apps/documenteditor/forms/locale/en.json | 1 + apps/presentationeditor/embed/js/ApplicationController.js | 8 +++++++- apps/presentationeditor/embed/locale/en.json | 1 + apps/spreadsheeteditor/embed/js/ApplicationController.js | 8 +++++++- apps/spreadsheeteditor/embed/locale/en.json | 1 + 8 files changed, 31 insertions(+), 4 deletions(-) diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js index 86386b9f1..aa04adbbd 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -121,6 +121,7 @@ DE.ApplicationController = new(function(){ docInfo.put_Format(docConfig.fileType); docInfo.put_VKey(docConfig.vkey); docInfo.put_UserInfo(_user); + docInfo.put_CallbackUrl(config.callbackUrl); docInfo.put_Token(docConfig.token); docInfo.put_Permissions(_permissions); docInfo.put_EncryptedInfo(config.encryptionKeys); @@ -693,6 +694,10 @@ DE.ApplicationController = new(function(){ message = me.convertationErrorText; break; + case Asc.c_oAscError.ID.ConvertationOpenError: + message = me.openErrorText; + break; + case Asc.c_oAscError.ID.DownloadError: message = me.downloadErrorText; break; @@ -945,6 +950,7 @@ DE.ApplicationController = new(function(){ txtEmpty: '(Empty)', txtPressLink: 'Press Ctrl and click link', errorLoadingFont: 'Fonts are not loaded.
Please contact your Document Server administrator.', - errorTokenExpire: 'The document security token has expired.
Please contact your Document Server administrator.' + errorTokenExpire: 'The document security token has expired.
Please contact your Document Server administrator.', + openErrorText: 'An error has occurred while opening the file' } })(); \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/en.json b/apps/documenteditor/embed/locale/en.json index 7053ca231..53426f88b 100644 --- a/apps/documenteditor/embed/locale/en.json +++ b/apps/documenteditor/embed/locale/en.json @@ -38,6 +38,7 @@ "DE.ApplicationController.unknownErrorText": "Unknown error.", "DE.ApplicationController.unsupportedBrowserErrorText": "Your browser is not supported.", "DE.ApplicationController.waitText": "Please, wait...", + "DE.ApplicationController.openErrorText": "An error has occurred while opening the file.", "DE.ApplicationView.txtDownload": "Download", "DE.ApplicationView.txtDownloadDocx": "Download as docx", "DE.ApplicationView.txtDownloadPdf": "Download as pdf", diff --git a/apps/documenteditor/forms/app/controller/ApplicationController.js b/apps/documenteditor/forms/app/controller/ApplicationController.js index a51611253..49481b289 100644 --- a/apps/documenteditor/forms/app/controller/ApplicationController.js +++ b/apps/documenteditor/forms/app/controller/ApplicationController.js @@ -189,6 +189,10 @@ define([ config.msg = this.convertationErrorText; break; + case Asc.c_oAscError.ID.ConvertationOpenError: + config.msg = this.openErrorText; + break; + case Asc.c_oAscError.ID.DownloadError: config.msg = this.downloadErrorText; break; @@ -1535,7 +1539,8 @@ define([ txtArt: 'Your text here', txtChoose: 'Choose an item', txtEnterDate: 'Enter a date', - txtClickToLoad: 'Click to load image' + txtClickToLoad: 'Click to load image', + openErrorText: 'An error has occurred while opening the file' }, DE.Controllers.ApplicationController)); diff --git a/apps/documenteditor/forms/locale/en.json b/apps/documenteditor/forms/locale/en.json index 2a6886586..09e1898f2 100644 --- a/apps/documenteditor/forms/locale/en.json +++ b/apps/documenteditor/forms/locale/en.json @@ -112,6 +112,7 @@ "DE.Controllers.ApplicationController.txtClickToLoad": "Click to load image", "DE.Controllers.ApplicationController.txtArt": "Your text here", "DE.Controllers.ApplicationController.txtEnterDate": "Enter a date", + "DE.Controllers.ApplicationController.openErrorText": "An error has occurred while opening the file.", "DE.Views.ApplicationView.textClear": "Clear All Fields", "DE.Views.ApplicationView.textCopy": "Copy", "DE.Views.ApplicationView.textCut": "Cut", diff --git a/apps/presentationeditor/embed/js/ApplicationController.js b/apps/presentationeditor/embed/js/ApplicationController.js index b1ad60264..4fb9ceda0 100644 --- a/apps/presentationeditor/embed/js/ApplicationController.js +++ b/apps/presentationeditor/embed/js/ApplicationController.js @@ -119,6 +119,7 @@ PE.ApplicationController = new(function(){ docInfo.put_Format(docConfig.fileType); docInfo.put_VKey(docConfig.vkey); docInfo.put_UserInfo(_user); + docInfo.put_CallbackUrl(config.callbackUrl); docInfo.put_Token(docConfig.token); docInfo.put_Permissions(_permissions); docInfo.put_EncryptedInfo(config.encryptionKeys); @@ -538,6 +539,10 @@ PE.ApplicationController = new(function(){ message = me.convertationErrorText; break; + case Asc.c_oAscError.ID.ConvertationOpenError: + message = me.openErrorText; + break; + case Asc.c_oAscError.ID.DownloadError: message = me.downloadErrorText; break; @@ -740,6 +745,7 @@ PE.ApplicationController = new(function(){ textAnonymous: 'Anonymous', errorForceSave: "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.", errorLoadingFont: 'Fonts are not loaded.
Please contact your Document Server administrator.', - errorTokenExpire: 'The document security token has expired.
Please contact your Document Server administrator.' + errorTokenExpire: 'The document security token has expired.
Please contact your Document Server administrator.', + openErrorText: 'An error has occurred while opening the file' } })(); diff --git a/apps/presentationeditor/embed/locale/en.json b/apps/presentationeditor/embed/locale/en.json index 072abed22..aa0881283 100644 --- a/apps/presentationeditor/embed/locale/en.json +++ b/apps/presentationeditor/embed/locale/en.json @@ -28,6 +28,7 @@ "PE.ApplicationController.unknownErrorText": "Unknown error.", "PE.ApplicationController.unsupportedBrowserErrorText": "Your browser is not supported.", "PE.ApplicationController.waitText": "Please, wait...", + "PE.ApplicationController.openErrorText": "An error has occurred while opening the file.", "PE.ApplicationView.txtDownload": "Download", "PE.ApplicationView.txtEmbed": "Embed", "PE.ApplicationView.txtFileLocation": "Open file location", diff --git a/apps/spreadsheeteditor/embed/js/ApplicationController.js b/apps/spreadsheeteditor/embed/js/ApplicationController.js index 6fecbbf21..13c21b3b2 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -119,6 +119,7 @@ SSE.ApplicationController = new(function(){ docInfo.put_Format(docConfig.fileType); docInfo.put_VKey(docConfig.vkey); docInfo.put_UserInfo(_user); + docInfo.put_CallbackUrl(config.callbackUrl); docInfo.put_Token(docConfig.token); docInfo.put_Permissions(_permissions); docInfo.put_EncryptedInfo(config.encryptionKeys); @@ -449,6 +450,10 @@ SSE.ApplicationController = new(function(){ message = me.convertationErrorText; break; + case Asc.c_oAscError.ID.ConvertationOpenError: + message = me.openErrorText; + break; + case Asc.c_oAscError.ID.DownloadError: message = me.downloadErrorText; break; @@ -689,6 +694,7 @@ SSE.ApplicationController = new(function(){ textAnonymous: 'Anonymous', errorForceSave: "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.", errorLoadingFont: 'Fonts are not loaded.
Please contact your Document Server administrator.', - errorTokenExpire: 'The document security token has expired.
Please contact your Document Server administrator.' + errorTokenExpire: 'The document security token has expired.
Please contact your Document Server administrator.', + openErrorText: 'An error has occurred while opening the file' } })(); \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/en.json b/apps/spreadsheeteditor/embed/locale/en.json index 9c3902578..92237977c 100644 --- a/apps/spreadsheeteditor/embed/locale/en.json +++ b/apps/spreadsheeteditor/embed/locale/en.json @@ -28,6 +28,7 @@ "SSE.ApplicationController.unknownErrorText": "Unknown error.", "SSE.ApplicationController.unsupportedBrowserErrorText": "Your browser is not supported.", "SSE.ApplicationController.waitText": "Please, wait...", + "SSE.ApplicationController.openErrorText": "An error has occurred while opening the file.", "SSE.ApplicationView.txtDownload": "Download", "SSE.ApplicationView.txtEmbed": "Embed", "SSE.ApplicationView.txtFileLocation": "Open file location", From 592f1cfcd2ec77bfa5ee6f60898ec7744abd347f Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 26 Nov 2021 14:18:23 +0300 Subject: [PATCH 2/4] [DE] For Bug 53934 --- apps/documenteditor/main/app/view/FormSettings.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/documenteditor/main/app/view/FormSettings.js b/apps/documenteditor/main/app/view/FormSettings.js index ca588a3af..8e6bf0b7e 100644 --- a/apps/documenteditor/main/app/view/FormSettings.js +++ b/apps/documenteditor/main/app/view/FormSettings.js @@ -280,6 +280,9 @@ define([ this.lockedControls.push(this.txtNewValue); this.txtNewValue.on('inputleave', function(){ me.fireEvent('editcomplete', me);}); this.txtNewValue._input.on('keydown', _.bind(this.onNewValueKeydown, this)); + this.txtNewValue.cmpEl.on('focus', 'input.form-control', function() { + setTimeout(function(){me.txtNewValue._input && me.txtNewValue._input.select();}, 1); + }); this.list = new Common.UI.ListView({ el: $markup.findById('#form-list-list'), From 4c26c97ef729244409128bbad7c06ea489778ebf Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 26 Nov 2021 15:54:27 +0300 Subject: [PATCH 3/4] [SSE] Fix Bug 53916 --- .../main/app/controller/RightMenu.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/RightMenu.js b/apps/spreadsheeteditor/main/app/controller/RightMenu.js index a1cf476a0..b3721fb67 100644 --- a/apps/spreadsheeteditor/main/app/controller/RightMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/RightMenu.js @@ -186,6 +186,7 @@ define([ } this._settings[Common.Utils.documentSettingsType.Signature].locked = false; + var locktext = false; for (i=0; i Date: Fri, 26 Nov 2021 17:12:28 +0300 Subject: [PATCH 4/4] [SSE] Bug 53916 --- .../main/app/controller/Toolbar.js | 18 ++++++++++++++---- .../spreadsheeteditor/main/app/view/Toolbar.js | 5 +++-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index f0a44ac1b..5f0954591 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -193,7 +193,9 @@ define([ cf_locked: [], selectedCells: 0, wsLock: false, - wsProps: [] + wsProps: [], + is_lockText: false, + is_lockShape: false }; this.binding = {}; @@ -2544,7 +2546,8 @@ define([ // lock formatting controls in cell with FormatCells protection or in shape and Objects protection need_disable = (selectionType === Asc.c_oAscSelectionType.RangeImage || selectionType === Asc.c_oAscSelectionType.RangeChart || selectionType === Asc.c_oAscSelectionType.RangeChartText || selectionType === Asc.c_oAscSelectionType.RangeShape || selectionType === Asc.c_oAscSelectionType.RangeShapeText || selectionType === Asc.c_oAscSelectionType.RangeSlicer); - toolbar.lockToolbar(SSE.enumLock.wsLockFormat, need_disable && !!this._state.wsProps['Objects'] || !need_disable && !!this._state.wsProps['FormatCells']); + toolbar.lockToolbar(SSE.enumLock.wsLockFormat, need_disable && !!this._state.wsProps['Objects'] && !!this._state.is_lockText || !need_disable && !!this._state.wsProps['FormatCells']); + toolbar.lockToolbar(SSE.enumLock.wsLockFormatFill, need_disable && !!this._state.wsProps['Objects'] && !!this._state.is_lockShape || !need_disable && !!this._state.wsProps['FormatCells']); toolbar.lockToolbar(SSE.enumLock['Objects'], !!this._state.wsProps['Objects']); toolbar.lockToolbar(SSE.enumLock['FormatCells'], !!this._state.wsProps['FormatCells']); @@ -3466,7 +3469,9 @@ define([ is_image = seltype == Asc.c_oAscSelectionType.RangeImage, is_slicer = seltype == Asc.c_oAscSelectionType.RangeSlicer, is_mode_2 = is_shape_text || is_shape || is_chart_text || is_chart || is_slicer, - is_objLocked = false; + is_objLocked = false, + is_lockShape = false, + is_lockText = false; if (!(is_mode_2 || is_image) && this._state.selection_type===seltype && this._state.coauthdisable===coauth_disable) return (seltype===Asc.c_oAscSelectionType.RangeImage); @@ -3474,9 +3479,14 @@ define([ var SelectedObjects = this.api.asc_getGraphicObjectProps(); for (var i=0; i