From 1ff958f7bef2fe6c185521930581bacce937e9bf Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 1 Dec 2021 12:21:08 +0300 Subject: [PATCH 1/2] [DE forms] Fix forms for desktop --- .../forms/app/controller/ApplicationController.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/documenteditor/forms/app/controller/ApplicationController.js b/apps/documenteditor/forms/app/controller/ApplicationController.js index fb30951e2..5332ba276 100644 --- a/apps/documenteditor/forms/app/controller/ApplicationController.js +++ b/apps/documenteditor/forms/app/controller/ApplicationController.js @@ -393,6 +393,7 @@ define([ this.appOptions.fileChoiceUrl = this.editorConfig.fileChoiceUrl; this.appOptions.saveAsUrl = this.editorConfig.saveAsUrl; this.appOptions.canRequestSaveAs = this.editorConfig.canRequestSaveAs; + this.appOptions.isDesktopApp = this.editorConfig.targetApp == 'desktop'; }, onExternalMessage: function(msg) { @@ -518,6 +519,7 @@ define([ if (params.asc_getRights() !== Asc.c_oRights.Edit) this.permissions.edit = this.permissions.review = false; + this.appOptions.isOffline = this.api.asc_isOffline(); this.appOptions.trialMode = params.asc_getLicenseMode(); this.appOptions.isBeta = params.asc_getIsBeta(); this.appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit); From 37d3380967de2ef373ebef58ab40f44d11dc4ef4 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 1 Dec 2021 12:24:07 +0300 Subject: [PATCH 2/2] [SSE] For Bug 53791 --- apps/spreadsheeteditor/embed/js/ApplicationController.js | 2 +- apps/spreadsheeteditor/main/app/controller/DocumentHolder.js | 4 ++-- apps/spreadsheeteditor/main/app/controller/Statusbar.js | 2 +- apps/spreadsheeteditor/main/app/controller/Viewport.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/spreadsheeteditor/embed/js/ApplicationController.js b/apps/spreadsheeteditor/embed/js/ApplicationController.js index 13c21b3b2..7976d2dfd 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -280,7 +280,7 @@ SSE.ApplicationController = new(function(){ if (api){ var f = Math.floor(api.asc_getZoom() * 10)/10; f += .1; - f > 0 && !(f > 2.) && api.asc_setZoom(f); + f > 0 && !(f > 5.) && api.asc_setZoom(f); } }); $('#id-btn-zoom-out').on('click', function () { diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index 86f633598..1a596a4d6 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -1725,7 +1725,7 @@ define([ } else if (delta > 0) { factor = Math.floor(factor * 10)/10; factor += 0.1; - if (factor > 0 && !(factor > 2.)) { + if (factor > 0 && !(factor > 5.)) { this.api.asc_setZoom(factor); } } @@ -1744,7 +1744,7 @@ define([ if (!this.api.isCellEdited) { var factor = Math.floor(this.api.asc_getZoom() * 10)/10; factor += .1; - if (factor > 0 && !(factor > 2.)) { + if (factor > 0 && !(factor > 5.)) { this.api.asc_setZoom(factor); } diff --git a/apps/spreadsheeteditor/main/app/controller/Statusbar.js b/apps/spreadsheeteditor/main/app/controller/Statusbar.js index 089c4bbca..b37c44b92 100644 --- a/apps/spreadsheeteditor/main/app/controller/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Statusbar.js @@ -121,7 +121,7 @@ define([ case 'up': var f = Math.floor(this.api.asc_getZoom() * 10)/10; f += .1; - !(f > 4.) && this.api.asc_setZoom(f); + !(f > 5.) && this.api.asc_setZoom(f); break; case 'down': f = Math.ceil(this.api.asc_getZoom() * 10)/10; diff --git a/apps/spreadsheeteditor/main/app/controller/Viewport.js b/apps/spreadsheeteditor/main/app/controller/Viewport.js index fdbb71c78..fa46d1cfa 100644 --- a/apps/spreadsheeteditor/main/app/controller/Viewport.js +++ b/apps/spreadsheeteditor/main/app/controller/Viewport.js @@ -317,7 +317,7 @@ define([ if ( btn == 'up' ) { var _f = Math.floor(this.api.asc_getZoom() * 10)/10; _f += .1; - if (_f > 0 && !(_f > 2.)) + if (_f > 0 && !(_f > 5.)) this.api.asc_setZoom(_f); } else { _f = Math.ceil(this.api.asc_getZoom() * 10)/10;