From 472b325c802b357ffec814b05fe7ae358b12b84b Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 15 May 2023 19:47:36 +0300 Subject: [PATCH 1/2] Fix Bug 62452 --- apps/common/main/lib/view/ReviewChanges.js | 3 +++ apps/documenteditor/main/app/controller/Main.js | 2 +- apps/documenteditor/main/app/controller/Toolbar.js | 1 + apps/documenteditor/main/app/view/WatermarkSettingsDialog.js | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/common/main/lib/view/ReviewChanges.js b/apps/common/main/lib/view/ReviewChanges.js index 41cee2b564..d7413d74fc 100644 --- a/apps/common/main/lib/view/ReviewChanges.js +++ b/apps/common/main/lib/view/ReviewChanges.js @@ -592,6 +592,8 @@ define([ ] })); me.btnCompare.menu.items[2].setVisible(me.appConfig.canRequestCompareFile || me.appConfig.fileChoiceUrl && me.appConfig.fileChoiceUrl.indexOf("{documentType}")>-1); + me.btnCompare.menu.items[1].setDisabled(me.appConfig.disableNetworkFunctionality); + me.btnCompare.menu.items[2].setDisabled(me.appConfig.disableNetworkFunctionality); me.btnCompare.updateHint(me.tipCompare); @@ -601,6 +603,7 @@ define([ {caption: me.mniFromUrl, value: 'url'}, ] })); + me.btnCombine.menu.items[1].setDisabled(me.appConfig.disableNetworkFunctionality); me.btnCombine.updateHint(me.tipCombine); } diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 13885f4650..0ae918559e 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -452,7 +452,7 @@ define([ this.appOptions.canFeatureContentControl = true; this.appOptions.canFeatureForms = !!this.api.asc_isSupportFeature("forms"); this.appOptions.uiRtl = Common.localStorage.getBool("ui-rtl"); - + this.appOptions.disableNetworkFunctionality = !!(window["AscDesktopEditor"] && window["AscDesktopEditor"]["isSupportNetworkFunctionality"] && false === window["AscDesktopEditor"]["isSupportNetworkFunctionality"]()); this.appOptions.mentionShare = !((typeof (this.appOptions.customization) == 'object') && (this.appOptions.customization.mentionShare==false)); this.appOptions.user.guest && this.appOptions.canRenameAnonymous && Common.NotificationCenter.on('user:rename', _.bind(this.showRenameUserDialog, this)); diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 70b23db9ae..7c8d8f54e6 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -2407,6 +2407,7 @@ define([ props: me.api.asc_GetWatermarkProps(), api: me.api, lang: me.mode.lang, + disableNetworkFunctionality: me.mode.disableNetworkFunctionality, storage: me.mode.canRequestInsertImage || me.mode.fileChoiceUrl && me.mode.fileChoiceUrl.indexOf("{documentType}")>-1, fontStore: me.fontstore, handler: function(result, value) { diff --git a/apps/documenteditor/main/app/view/WatermarkSettingsDialog.js b/apps/documenteditor/main/app/view/WatermarkSettingsDialog.js index 30719df9f3..d2f91e21c6 100644 --- a/apps/documenteditor/main/app/view/WatermarkSettingsDialog.js +++ b/apps/documenteditor/main/app/view/WatermarkSettingsDialog.js @@ -187,6 +187,8 @@ define(['text!documenteditor/main/app/template/WatermarkSettings.template', this.imageControls.push(this.btnSelectImage); this.btnSelectImage.menu.on('item:click', _.bind(this.onImageSelect, this)); this.btnSelectImage.menu.items[2].setVisible(this.storage); + this.btnSelectImage.menu.items[1].setDisabled(this.options.disableNetworkFunctionality); + this.btnSelectImage.menu.items[2].setDisabled(this.options.disableNetworkFunctionality); this._arrScale = [ {displayValue: this.textAuto, value: -1}, From 941edff7fb6453377c780c01d16d0800d377c8ac Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 15 May 2023 21:20:43 +0300 Subject: [PATCH 2/2] [Embed] Fix error dialog --- apps/documenteditor/embed/index.html | 2 +- apps/documenteditor/embed/index.html.deploy | 2 +- apps/documenteditor/embed/index_loader.html | 2 +- apps/documenteditor/embed/index_loader.html.deploy | 2 +- apps/presentationeditor/embed/index.html | 2 +- apps/presentationeditor/embed/index.html.deploy | 2 +- apps/presentationeditor/embed/index_loader.html | 2 +- apps/presentationeditor/embed/index_loader.html.deploy | 2 +- apps/spreadsheeteditor/embed/index.html | 2 +- apps/spreadsheeteditor/embed/index.html.deploy | 2 +- apps/spreadsheeteditor/embed/index_loader.html | 2 +- apps/spreadsheeteditor/embed/index_loader.html.deploy | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/documenteditor/embed/index.html b/apps/documenteditor/embed/index.html index 489bd91f61..dde0778b7e 100644 --- a/apps/documenteditor/embed/index.html +++ b/apps/documenteditor/embed/index.html @@ -216,7 +216,7 @@

diff --git a/apps/documenteditor/embed/index.html.deploy b/apps/documenteditor/embed/index.html.deploy index 83d98edb37..2ea33394e7 100644 --- a/apps/documenteditor/embed/index.html.deploy +++ b/apps/documenteditor/embed/index.html.deploy @@ -208,7 +208,7 @@

diff --git a/apps/documenteditor/embed/index_loader.html b/apps/documenteditor/embed/index_loader.html index 6304b02def..f41362c752 100644 --- a/apps/documenteditor/embed/index_loader.html +++ b/apps/documenteditor/embed/index_loader.html @@ -316,7 +316,7 @@

diff --git a/apps/documenteditor/embed/index_loader.html.deploy b/apps/documenteditor/embed/index_loader.html.deploy index 5a0a702409..d11c03600c 100644 --- a/apps/documenteditor/embed/index_loader.html.deploy +++ b/apps/documenteditor/embed/index_loader.html.deploy @@ -308,7 +308,7 @@

diff --git a/apps/presentationeditor/embed/index.html b/apps/presentationeditor/embed/index.html index 3aef989282..af1f560157 100644 --- a/apps/presentationeditor/embed/index.html +++ b/apps/presentationeditor/embed/index.html @@ -267,7 +267,7 @@

diff --git a/apps/presentationeditor/embed/index.html.deploy b/apps/presentationeditor/embed/index.html.deploy index 92cc6316cc..3273953a6b 100644 --- a/apps/presentationeditor/embed/index.html.deploy +++ b/apps/presentationeditor/embed/index.html.deploy @@ -261,7 +261,7 @@

diff --git a/apps/presentationeditor/embed/index_loader.html b/apps/presentationeditor/embed/index_loader.html index 6a3c5453bd..babfbd5ea1 100644 --- a/apps/presentationeditor/embed/index_loader.html +++ b/apps/presentationeditor/embed/index_loader.html @@ -315,7 +315,7 @@

diff --git a/apps/presentationeditor/embed/index_loader.html.deploy b/apps/presentationeditor/embed/index_loader.html.deploy index 5be014c29d..62d2523822 100644 --- a/apps/presentationeditor/embed/index_loader.html.deploy +++ b/apps/presentationeditor/embed/index_loader.html.deploy @@ -308,7 +308,7 @@

diff --git a/apps/spreadsheeteditor/embed/index.html b/apps/spreadsheeteditor/embed/index.html index 44e477c860..09d8cee4b2 100644 --- a/apps/spreadsheeteditor/embed/index.html +++ b/apps/spreadsheeteditor/embed/index.html @@ -240,7 +240,7 @@

diff --git a/apps/spreadsheeteditor/embed/index.html.deploy b/apps/spreadsheeteditor/embed/index.html.deploy index b9d1601d76..918dd3eb22 100644 --- a/apps/spreadsheeteditor/embed/index.html.deploy +++ b/apps/spreadsheeteditor/embed/index.html.deploy @@ -232,7 +232,7 @@

diff --git a/apps/spreadsheeteditor/embed/index_loader.html b/apps/spreadsheeteditor/embed/index_loader.html index db94be32c0..60a6216563 100644 --- a/apps/spreadsheeteditor/embed/index_loader.html +++ b/apps/spreadsheeteditor/embed/index_loader.html @@ -314,7 +314,7 @@

diff --git a/apps/spreadsheeteditor/embed/index_loader.html.deploy b/apps/spreadsheeteditor/embed/index_loader.html.deploy index 5b7fd96360..9147044782 100644 --- a/apps/spreadsheeteditor/embed/index_loader.html.deploy +++ b/apps/spreadsheeteditor/embed/index_loader.html.deploy @@ -306,7 +306,7 @@