From f91bc6e50e96cd0a7e78bfc65b73e394656c6e1f Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Tue, 6 Dec 2022 20:24:15 +0300 Subject: [PATCH 1/4] [desktop] for bug 60025 --- apps/common/main/lib/controller/Desktop.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/common/main/lib/controller/Desktop.js b/apps/common/main/lib/controller/Desktop.js index 3e1275143..dff7ab1ac 100644 --- a/apps/common/main/lib/controller/Desktop.js +++ b/apps/common/main/lib/controller/Desktop.js @@ -281,6 +281,8 @@ define([ })).on('closeclick', function () { this.close(); }).show(); + + native.execCommand('webapps:features', JSON.stringify(features)); } } }); From 9e608f168de124799179b3783deb920d5a99d4e3 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Tue, 6 Dec 2022 21:43:43 +0300 Subject: [PATCH 2/4] [desktop] for bug 60014 --- apps/common/main/lib/controller/Desktop.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/common/main/lib/controller/Desktop.js b/apps/common/main/lib/controller/Desktop.js index dff7ab1ac..e8cedc783 100644 --- a/apps/common/main/lib/controller/Desktop.js +++ b/apps/common/main/lib/controller/Desktop.js @@ -283,6 +283,15 @@ define([ }).show(); native.execCommand('webapps:features', JSON.stringify(features)); + + api.asc_registerCallback('asc_onDocumentName', function () { + if ( features.readonly ) { + if ( api.asc_getLocalRestrictions() == Asc.c_oAscLocalRestrictionType.None ) { + features.readonly = false; + native.execCommand('webapps:features', JSON.stringify(features)); + } + } + }); } } }); From 3208a4bdf2f4399beb2e7d7f489774bb6748032b Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Wed, 7 Dec 2022 16:48:55 +0300 Subject: [PATCH 3/4] [desktop] hide panel before "print" command --- apps/documenteditor/main/app/controller/Print.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/documenteditor/main/app/controller/Print.js b/apps/documenteditor/main/app/controller/Print.js index 556b303f8..668c570af 100644 --- a/apps/documenteditor/main/app/controller/Print.js +++ b/apps/documenteditor/main/app/controller/Print.js @@ -525,6 +525,7 @@ define([ paperOrientation: size ? (size['H'] > size['W'] ? 'portrait' : 'landscape') : null }); + this.printSettings.menu.hide(); if ( print ) { var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86); opts.asc_setAdvancedOptions(this.adjPrintParams); @@ -534,7 +535,6 @@ define([ opts.asc_setAdvancedOptions(this.adjPrintParams); this.api.asc_DownloadAs(opts); } - this.printSettings.menu.hide(); }, inputPagesChanging: function (input, value) { From 7b03f08adc78864cf3966ae91f3a6e3788676f32 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Wed, 7 Dec 2022 16:54:48 +0300 Subject: [PATCH 4/4] [desktop] for bug 60014 --- apps/common/main/lib/controller/Desktop.js | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/common/main/lib/controller/Desktop.js b/apps/common/main/lib/controller/Desktop.js index e8cedc783..b3803aefb 100644 --- a/apps/common/main/lib/controller/Desktop.js +++ b/apps/common/main/lib/controller/Desktop.js @@ -288,6 +288,7 @@ define([ if ( features.readonly ) { if ( api.asc_getLocalRestrictions() == Asc.c_oAscLocalRestrictionType.None ) { features.readonly = false; + header.setDocumentReadOnly(false); native.execCommand('webapps:features', JSON.stringify(features)); } }