diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 56da187a2..47c441cb1 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -999,6 +999,7 @@ define([ this.appOptions.forcesave = this.appOptions.canForcesave; this.appOptions.canEditComments= this.appOptions.isOffline || !(typeof (this.editorConfig.customization) == 'object' && this.editorConfig.customization.commentAuthorOnly); this.appOptions.isTrial = params.asc_getTrial(); + this.appOptions.canProtect = this.appOptions.isDesktopApp && this.api.asc_isSignaturesSupport(); if ( this.appOptions.isLightVersion ) { this.appOptions.canUseHistory = diff --git a/apps/documenteditor/main/app/view/FileMenu.js b/apps/documenteditor/main/app/view/FileMenu.js index 702764ed2..9be53947c 100644 --- a/apps/documenteditor/main/app/view/FileMenu.js +++ b/apps/documenteditor/main/app/view/FileMenu.js @@ -240,7 +240,7 @@ define([ applyMode: function() { this.miPrint[this.mode.canPrint?'show':'hide'](); this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide'](); - this.items[7][(this.mode.isDesktopApp) ?'show':'hide'](); + this.items[7][(this.mode.canProtect) ?'show':'hide'](); this.items[7].$el.find('+.devider')[!this.mode.isDisconnected?'show':'hide'](); this.miRecent[this.mode.canOpenRecent?'show':'hide'](); this.miNew[this.mode.canCreateNew?'show':'hide'](); @@ -277,7 +277,7 @@ define([ } } - if (this.mode.isDesktopApp) { + if (this.mode.canProtect) { // this.$el.find('#fm-btn-back').hide(); this.panels['protect'] = (new DE.Views.FileMenuPanels.ProtectDoc({menu:this})).render(); this.panels['protect'].setMode(this.mode); diff --git a/apps/documenteditor/main/app/view/RightMenu.js b/apps/documenteditor/main/app/view/RightMenu.js index d3ff6c463..453cd508e 100644 --- a/apps/documenteditor/main/app/view/RightMenu.js +++ b/apps/documenteditor/main/app/view/RightMenu.js @@ -195,7 +195,7 @@ define([ this.mergeSettings = new DE.Views.MailMergeSettings(); } - if (mode && mode.isDesktopApp) { + if (mode && mode.canProtect) { this.btnSignature = new Common.UI.Button({ hint: this.txtSignatureSettings, asctype: Common.Utils.documentSettingsType.Signature, diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index b61ae9cb4..b241944fe 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -778,6 +778,7 @@ define([ this.appOptions.forcesave = this.appOptions.canForcesave; this.appOptions.canEditComments= this.appOptions.isOffline || !(typeof (this.editorConfig.customization) == 'object' && this.editorConfig.customization.commentAuthorOnly); this.appOptions.isTrial = params.asc_getTrial(); + this.appOptions.canProtect = this.appOptions.isDesktopApp && this.api.asc_isSignaturesSupport(); this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view'; diff --git a/apps/presentationeditor/main/app/view/FileMenu.js b/apps/presentationeditor/main/app/view/FileMenu.js index c77d30402..d8c9fd30c 100644 --- a/apps/presentationeditor/main/app/view/FileMenu.js +++ b/apps/presentationeditor/main/app/view/FileMenu.js @@ -234,7 +234,7 @@ define([ applyMode: function() { this.miPrint[this.mode.canPrint?'show':'hide'](); this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide'](); - this.items[7][(this.mode.isDesktopApp) ?'show':'hide'](); + this.items[7][(this.mode.canProtect) ?'show':'hide'](); this.items[7].$el.find('+.devider')[!this.mode.isDisconnected?'show':'hide'](); this.miRecent[this.mode.canOpenRecent?'show':'hide'](); this.miNew[this.mode.canCreateNew?'show':'hide'](); @@ -271,7 +271,7 @@ define([ } } - if (this.mode.isDesktopApp) { + if (this.mode.canProtect) { this.$el.find('#fm-btn-create, #fm-btn-back, #fm-btn-create+.devider').hide(); this.panels['protect'] = (new PE.Views.FileMenuPanels.ProtectDoc({menu:this})).render(); this.panels['protect'].setMode(this.mode); diff --git a/apps/presentationeditor/main/app/view/RightMenu.js b/apps/presentationeditor/main/app/view/RightMenu.js index 3d4cb5700..9f12f3b79 100644 --- a/apps/presentationeditor/main/app/view/RightMenu.js +++ b/apps/presentationeditor/main/app/view/RightMenu.js @@ -179,7 +179,7 @@ define([ this.shapeSettings = new PE.Views.ShapeSettings(); this.textartSettings = new PE.Views.TextArtSettings(); - if (mode && mode.isDesktopApp) { + if (mode && mode.canProtect) { this.btnSignature = new Common.UI.Button({ hint: this.txtSignatureSettings, asctype: Common.Utils.documentSettingsType.Signature, diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 58e806432..687abf2a1 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -799,6 +799,7 @@ define([ this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false); this.appOptions.canRename = !!this.permissions.rename; this.appOptions.isTrial = params.asc_getTrial(); + this.appOptions.canProtect = this.appOptions.isDesktopApp && this.api.asc_isSignaturesSupport(); this.appOptions.canBranding = (licType === Asc.c_oLicenseResult.Success) && (typeof this.editorConfig.customization == 'object'); if (this.appOptions.canBranding) diff --git a/apps/spreadsheeteditor/main/app/view/FileMenu.js b/apps/spreadsheeteditor/main/app/view/FileMenu.js index 0a7712085..674408d44 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenu.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenu.js @@ -223,7 +223,7 @@ define([ applyMode: function() { this.miPrint[this.mode.canPrint?'show':'hide'](); this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide'](); - this.items[7][(this.mode.isDesktopApp) ?'show':'hide'](); + this.items[7][(this.mode.canProtect) ?'show':'hide'](); this.items[7].$el.find('+.devider')[!this.mode.isDisconnected?'show':'hide'](); this.miRecent[this.mode.canOpenRecent?'show':'hide'](); this.miNew[this.mode.canCreateNew?'show':'hide'](); @@ -262,7 +262,7 @@ define([ } } - if (this.mode.isDesktopApp) { + if (this.mode.canProtect) { this.panels['protect'] = (new SSE.Views.FileMenuPanels.ProtectDoc({menu:this})).render(); this.panels['protect'].setMode(this.mode); } diff --git a/apps/spreadsheeteditor/main/app/view/RightMenu.js b/apps/spreadsheeteditor/main/app/view/RightMenu.js index ce1106e19..fe331911a 100644 --- a/apps/spreadsheeteditor/main/app/view/RightMenu.js +++ b/apps/spreadsheeteditor/main/app/view/RightMenu.js @@ -167,7 +167,7 @@ define([ this.textartSettings = new SSE.Views.TextArtSettings(); this.tableSettings = new SSE.Views.TableSettings(); - if (mode && mode.isDesktopApp) { + if (mode && mode.canProtect) { this.btnSignature = new Common.UI.Button({ hint: this.txtSignatureSettings, asctype: Common.Utils.documentSettingsType.Signature,