From 86da96ba6c1d51d0f432d7ea4d23419a7c38fddd Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Fri, 29 Oct 2021 12:17:49 +0300 Subject: [PATCH 01/81] [SSE] Fix Bug 53384 --- apps/spreadsheeteditor/mobile/src/view/add/AddFilter.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/spreadsheeteditor/mobile/src/view/add/AddFilter.jsx b/apps/spreadsheeteditor/mobile/src/view/add/AddFilter.jsx index 4369fc5e0..049fd73da 100644 --- a/apps/spreadsheeteditor/mobile/src/view/add/AddFilter.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/add/AddFilter.jsx @@ -27,9 +27,7 @@ const AddSortAndFilter = props => { { - props.onInsertFilter(!prev); - }}/> + onToggleChange={() => props.onInsertFilter(!isFilter)}/> } From 6875b60d5e0cf7f7835aafd056c58894bfa59cd3 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 1 Nov 2021 17:16:20 +0300 Subject: [PATCH 02/81] Handle errors --- .../embed/js/ApplicationController.js | 7 +++++- apps/documenteditor/embed/locale/en.json | 1 + .../app/controller/ApplicationController.js | 22 +++++++++++++++++-- apps/documenteditor/forms/locale/en.json | 2 ++ .../embed/js/ApplicationController.js | 7 +++++- apps/presentationeditor/embed/locale/en.json | 1 + .../embed/js/ApplicationController.js | 7 +++++- apps/spreadsheeteditor/embed/locale/en.json | 1 + 8 files changed, 43 insertions(+), 5 deletions(-) diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js index 2238c2de6..be5cfa956 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -731,6 +731,10 @@ DE.ApplicationController = new(function(){ message = me.errorLoadingFont; break; + case Asc.c_oAscError.ID.KeyExpire: + message = me.errorTokenExpire; + break; + default: message = me.errorDefaultMessage.replace('%1', id); break; @@ -935,6 +939,7 @@ DE.ApplicationController = new(function(){ 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.", txtEmpty: '(Empty)', txtPressLink: 'Press Ctrl and click link', - errorLoadingFont: 'Fonts are not loaded.
Please contact your Document Server administrator.' + errorLoadingFont: 'Fonts are not loaded.
Please contact your Document Server administrator.', + errorTokenExpire: 'The document security token has expired.
Please contact your Document Server administrator.' } })(); \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/en.json b/apps/documenteditor/embed/locale/en.json index 87c407871..17ba71f73 100644 --- a/apps/documenteditor/embed/locale/en.json +++ b/apps/documenteditor/embed/locale/en.json @@ -19,6 +19,7 @@ "DE.ApplicationController.errorSubmit": "Submit failed.", "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.
Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.", "DE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", + "DE.ApplicationController.errorTokenExpire": "The document security token has expired.
Please contact your Document Server administrator.", "DE.ApplicationController.notcriticalErrorTitle": "Warning", "DE.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.", "DE.ApplicationController.textAnonymous": "Anonymous", diff --git a/apps/documenteditor/forms/app/controller/ApplicationController.js b/apps/documenteditor/forms/app/controller/ApplicationController.js index 8d095d3c7..1692decd0 100644 --- a/apps/documenteditor/forms/app/controller/ApplicationController.js +++ b/apps/documenteditor/forms/app/controller/ApplicationController.js @@ -224,6 +224,15 @@ define([ config.msg = this.errorLoadingFont; break; + case Asc.c_oAscError.ID.Warning: + config.msg = this.errorConnectToServer; + config.closable = false; + break; + + case Asc.c_oAscError.ID.KeyExpire: + config.msg = this.errorTokenExpire; + break; + default: config.msg = (typeof id == 'string') ? id : this.errorDefaultMessage.replace('%1', id); break; @@ -253,7 +262,14 @@ define([ config.iconCls = 'warn'; config.buttons = ['ok']; config.callback = _.bind(function(btn){ - if (id == Asc.c_oAscError.ID.EditingError) { + if (id == Asc.c_oAscError.ID.Warning && btn == 'ok' && this.appOptions.canDownload) { + Common.UI.Menu.Manager.hideAll(); + var me = this; + setTimeout(function() { + $('button', me.view.btnOptions.cmpEl).click(); + }, 10); + + } else if (id == Asc.c_oAscError.ID.EditingError) { Common.NotificationCenter.trigger('api:disconnect', true); // enable download and print } }, this); @@ -1347,7 +1363,9 @@ define([ textBuyNow: 'Visit website', textNoLicenseTitle: 'License limit reached', textContactUs: 'Contact sales', - errorLoadingFont: 'Fonts are not loaded.
Please contact your Document Server administrator.' + errorLoadingFont: 'Fonts are not loaded.
Please contact your Document Server administrator.', + errorConnectToServer: 'The document could not be saved. Please check connection settings or contact your administrator.
When you click the \'OK\' button, you will be prompted to download the document.', + errorTokenExpire: 'The document security token has expired.
Please contact your Document Server administrator.' }, DE.Controllers.ApplicationController)); }); diff --git a/apps/documenteditor/forms/locale/en.json b/apps/documenteditor/forms/locale/en.json index 78089db32..32300d02c 100644 --- a/apps/documenteditor/forms/locale/en.json +++ b/apps/documenteditor/forms/locale/en.json @@ -75,6 +75,8 @@ "DE.Controllers.ApplicationController.errorUpdateVersion": "The file version has been changed. The page will be reloaded.", "DE.Controllers.ApplicationController.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.
Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.", "DE.Controllers.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", + "DE.Controllers.ApplicationController.errorConnectToServer": "The document could not be saved. Please check connection settings or contact your administrator.
When you click the 'OK' button, you will be prompted to download the document.", + "DE.Controllers.ApplicationController.errorTokenExpire": "The document security token has expired.
Please contact your Document Server administrator.", "DE.Controllers.ApplicationController.notcriticalErrorTitle": "Warning", "DE.Controllers.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.", "DE.Controllers.ApplicationController.textAnonymous": "Anonymous", diff --git a/apps/presentationeditor/embed/js/ApplicationController.js b/apps/presentationeditor/embed/js/ApplicationController.js index 2519cb58b..1066ac1ca 100644 --- a/apps/presentationeditor/embed/js/ApplicationController.js +++ b/apps/presentationeditor/embed/js/ApplicationController.js @@ -566,6 +566,10 @@ PE.ApplicationController = new(function(){ message = me.errorLoadingFont; break; + case Asc.c_oAscError.ID.KeyExpire: + message = me.errorTokenExpire; + break; + default: message = me.errorDefaultMessage.replace('%1', id); break; @@ -730,6 +734,7 @@ PE.ApplicationController = new(function(){ textGuest: 'Guest', 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.' + errorLoadingFont: 'Fonts are not loaded.
Please contact your Document Server administrator.', + errorTokenExpire: 'The document security token has expired.
Please contact your Document Server administrator.' } })(); diff --git a/apps/presentationeditor/embed/locale/en.json b/apps/presentationeditor/embed/locale/en.json index 8ee3a58b1..1f1adbde6 100644 --- a/apps/presentationeditor/embed/locale/en.json +++ b/apps/presentationeditor/embed/locale/en.json @@ -17,6 +17,7 @@ "PE.ApplicationController.errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator.", "PE.ApplicationController.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.
Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.", "PE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", + "PE.ApplicationController.errorTokenExpire": "The document security token has expired.
Please contact your Document Server administrator.", "PE.ApplicationController.notcriticalErrorTitle": "Warning", "PE.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.", "PE.ApplicationController.textAnonymous": "Anonymous", diff --git a/apps/spreadsheeteditor/embed/js/ApplicationController.js b/apps/spreadsheeteditor/embed/js/ApplicationController.js index c17650446..5dd383796 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -477,6 +477,10 @@ SSE.ApplicationController = new(function(){ message = me.errorLoadingFont; break; + case Asc.c_oAscError.ID.KeyExpire: + message = me.errorTokenExpire; + break; + default: message = me.errorDefaultMessage.replace('%1', id); break; @@ -679,6 +683,7 @@ SSE.ApplicationController = new(function(){ textGuest: 'Guest', 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.' + errorLoadingFont: 'Fonts are not loaded.
Please contact your Document Server administrator.', + errorTokenExpire: 'The document security token has expired.
Please contact your Document Server administrator.' } })(); \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/en.json b/apps/spreadsheeteditor/embed/locale/en.json index 730f84d67..424dca2fe 100644 --- a/apps/spreadsheeteditor/embed/locale/en.json +++ b/apps/spreadsheeteditor/embed/locale/en.json @@ -17,6 +17,7 @@ "SSE.ApplicationController.errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator.", "SSE.ApplicationController.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.
Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.", "SSE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", + "SSE.ApplicationController.errorTokenExpire": "The document security token has expired.
Please contact your Document Server administrator.", "SSE.ApplicationController.notcriticalErrorTitle": "Warning", "SSE.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.", "SSE.ApplicationController.textAnonymous": "Anonymous", From e9eb999d51a01f055093054727a33712feeec0a0 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Wed, 3 Nov 2021 00:39:20 +0300 Subject: [PATCH 03/81] [DE] fix bug 53496 --- apps/documenteditor/main/app/controller/Viewport.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/documenteditor/main/app/controller/Viewport.js b/apps/documenteditor/main/app/controller/Viewport.js index 62cebe316..cde524a90 100644 --- a/apps/documenteditor/main/app/controller/Viewport.js +++ b/apps/documenteditor/main/app/controller/Viewport.js @@ -378,7 +378,7 @@ define([ menuItem.setVisible(current_dark); menuItem.$el.prev('.divider')[current_dark ? 'show' : 'hide'](); - menuItem.setChecked(current_dark); + menuItem.setChecked(Common.UI.Themes.isContentThemeDark()); } }, From 05f2217ac5a9202d267426714930ce229bbe6ac5 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Wed, 3 Nov 2021 22:52:14 +0400 Subject: [PATCH 04/81] [PE mobile] Fix Bug 53477 --- apps/presentationeditor/mobile/src/controller/Main.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/presentationeditor/mobile/src/controller/Main.jsx b/apps/presentationeditor/mobile/src/controller/Main.jsx index 94ffe58fa..808a3888e 100644 --- a/apps/presentationeditor/mobile/src/controller/Main.jsx +++ b/apps/presentationeditor/mobile/src/controller/Main.jsx @@ -297,11 +297,11 @@ class MainController extends Component { this.api.Resize(); }); - $$(window).on('popover:open popup:open sheet:open actions:open', () => { + $$(window).on('popup:open sheet:open actions:open', () => { this.api.asc_enableKeyEvents(false); }); - $$(window).on('popover:close popup:close sheet:close actions:close', () => { + $$(window).on('popup:close sheet:close actions:close', () => { this.api.asc_enableKeyEvents(true); }); From 937501deead393aa702455fe67dfaf7cfc607f40 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Thu, 4 Nov 2021 22:44:24 +0300 Subject: [PATCH 05/81] [DE] fix skeleton dark theme --- apps/common/main/lib/util/htmlutils.js | 10 ++++++++++ apps/documenteditor/main/index.html | 18 ++++++++++++------ .../main/resources/less/app.less | 11 +++++++++++ 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/apps/common/main/lib/util/htmlutils.js b/apps/common/main/lib/util/htmlutils.js index b7b9b730a..c51bfb264 100644 --- a/apps/common/main/lib/util/htmlutils.js +++ b/apps/common/main/lib/util/htmlutils.js @@ -90,3 +90,13 @@ if ( !ui_theme_name ) { if ( !!ui_theme_name ) { document.body.classList.add(ui_theme_name); } + +if ( checkLocalStorage ) { + var content_theme = localStorage.getItem("content-theme"); + if ( content_theme == 'dark' ) { + var current_theme = localStorage.getItem("ui-theme"); + if ( !!current_theme && /type":\s*"dark/.test(current_theme) ) { + document.body.classList.add("content-theme-dark"); + } + } +} diff --git a/apps/documenteditor/main/index.html b/apps/documenteditor/main/index.html index 8d72d3a61..36960bbe3 100644 --- a/apps/documenteditor/main/index.html +++ b/apps/documenteditor/main/index.html @@ -16,9 +16,15 @@ --border-toolbar: #2a2a2a; --highlight-button-hover: #555; --highlight-header-button-hover: rgba(255,255,255,.05); - --canvas-background: #666666; + --canvas-background: #555; /*--canvas-content-background: #fff;*/ - --canvas-page-border: #555; + --loadmask-canvas-page-border: #555; + } + + .content-theme-dark { + --skeleton-canvas-content-background: #3a3a3a; + --skeleton-canvas-page-border: #2a2a2a; + --skeleton-canvas-line: rgba(255,255,255,.05); } .theme-classic-light { @@ -30,7 +36,7 @@ --highlight-button-hover: #ccc; --highlight-header-button-hover: rgba(255,255,255,.15); --canvas-background: #eee; - --canvas-page-border: #ccc; + --loadmask-canvas-page-border: #ccc; } .loadmask { @@ -130,19 +136,19 @@ .loadmask > .placeholder { background: #fff; - background: var(--canvas-content-background, #fff); + background: var(--skeleton-canvas-content-background, #fff); width: 794px; margin: 46px auto; height: 100%; border: 1px solid #bbbec2; - border: var(--scaled-one-px-value, 1px) solid var(--canvas-page-border, #bbbec2); + border: var(--scaled-one-px-value, 1px) solid var(--skeleton-canvas-page-border, #bbbec2); padding-top: 50px; } .loadmask > .placeholder > .line { height: 15px; margin: 30px 80px; - background: rgba(0,0,0,.05); + background: var(--skeleton-canvas-line, rgba(0,0,0,.05)); overflow: hidden; position: relative; diff --git a/apps/documenteditor/main/resources/less/app.less b/apps/documenteditor/main/resources/less/app.less index 54e4f6f2a..356beb99f 100644 --- a/apps/documenteditor/main/resources/less/app.less +++ b/apps/documenteditor/main/resources/less/app.less @@ -228,4 +228,15 @@ overflow: hidden; position: relative; } + + .content-theme-dark & { + @canvas-content-dark-background: #3a3a3a; + @canvas-content-dark-page-border: #2a2a2a; + background-color: @canvas-content-dark-background; + border-color: @canvas-content-dark-page-border; + + > .line { + background-color: fade(#fff, 5%); + } + } } \ No newline at end of file From 7b275174bb03d6ec75e65030f9c25a5c55b16703 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Thu, 4 Nov 2021 23:02:35 +0300 Subject: [PATCH 06/81] [DE] changed skeleton stylesheet in deploy --- apps/documenteditor/main/index.html | 2 +- apps/documenteditor/main/index.html.deploy | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/index.html b/apps/documenteditor/main/index.html index 36960bbe3..c6b3524aa 100644 --- a/apps/documenteditor/main/index.html +++ b/apps/documenteditor/main/index.html @@ -18,7 +18,7 @@ --highlight-header-button-hover: rgba(255,255,255,.05); --canvas-background: #555; /*--canvas-content-background: #fff;*/ - --loadmask-canvas-page-border: #555; + --skeleton-canvas-page-border: #555; } .content-theme-dark { diff --git a/apps/documenteditor/main/index.html.deploy b/apps/documenteditor/main/index.html.deploy index a3ec6e07f..eab9ef0a3 100644 --- a/apps/documenteditor/main/index.html.deploy +++ b/apps/documenteditor/main/index.html.deploy @@ -11,6 +11,12 @@