From a330deb5c7b3ec48f61a326e33b62b25e712a207 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 18 Apr 2019 12:18:14 +0300 Subject: [PATCH] Add customization license parameter --- apps/documenteditor/main/app/controller/Main.js | 2 +- apps/documenteditor/mobile/app/controller/Main.js | 2 +- apps/presentationeditor/main/app/controller/Main.js | 2 +- apps/presentationeditor/mobile/app/controller/Main.js | 2 +- apps/spreadsheeteditor/main/app/controller/Main.js | 2 +- apps/spreadsheeteditor/mobile/app/controller/Main.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index f3d6f8004..39596f971 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1181,7 +1181,7 @@ define([ this.appOptions.fileKey = this.document.key; - this.appOptions.canBranding = (licType === Asc.c_oLicenseResult.Success) && (typeof this.editorConfig.customization == 'object'); + this.appOptions.canBranding = params.asc_getCustomization(); if (this.appOptions.canBranding) appHeader.setBranding(this.editorConfig.customization); else if (typeof this.editorConfig.customization == 'object') { diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index 2fe4c3942..00f19629a 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -711,7 +711,7 @@ define([ me.appOptions.canDownload = me.permissions.download !== false && (!type || typeof type[1] !== 'string'); me.appOptions.canReader = (!type || typeof type[1] !== 'string'); - me.appOptions.canBranding = (licType === Asc.c_oLicenseResult.Success) && (typeof me.editorConfig.customization == 'object'); + me.appOptions.canBranding = params.asc_getCustomization(); me.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof me.editorConfig.customization == 'object'); if ( me.appOptions.isLightVersion ) { diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 8ab368c5a..cf4591000 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -903,7 +903,7 @@ define([ this.appOptions.canHelp = !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.help===false); this.appOptions.isRestrictedEdit = !this.appOptions.isEdit && this.appOptions.canComments; - this.appOptions.canBranding = (licType === Asc.c_oLicenseResult.Success) && (typeof this.editorConfig.customization == 'object'); + this.appOptions.canBranding = params.asc_getCustomization(); if (this.appOptions.canBranding) appHeader.setBranding(this.editorConfig.customization); else if (typeof this.editorConfig.customization == 'object') { diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js index 8483f1e03..87df77ad1 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -664,7 +664,7 @@ define([ me.appOptions.canDownloadOrigin = !me.appOptions.nativeApp && me.permissions.download !== false && (type && typeof type[1] === 'string'); me.appOptions.canDownload = !me.appOptions.nativeApp && me.permissions.download !== false && (!type || typeof type[1] !== 'string'); - me.appOptions.canBranding = (licType === Asc.c_oLicenseResult.Success) && (typeof me.editorConfig.customization == 'object'); + me.appOptions.canBranding = params.asc_getCustomization(); me.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof me.editorConfig.customization == 'object'); me.applyModeCommonElements(); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 938f8e25d..e60c7c1da 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -919,7 +919,7 @@ define([ this.appOptions.canRename = this.editorConfig.canRename && !!this.permissions.rename; this.appOptions.trialMode = params.asc_getLicenseMode(); this.appOptions.canModifyFilter = (this.permissions.modifyFilter!==false); - this.appOptions.canBranding = (licType === Asc.c_oLicenseResult.Success) && (typeof this.editorConfig.customization == 'object'); + this.appOptions.canBranding = params.asc_getCustomization(); if (this.appOptions.canBranding) this.headerView.setBranding(this.editorConfig.customization); else if (typeof this.editorConfig.customization == 'object') { diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js index 47253c5bc..5cf689fe6 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -670,7 +670,7 @@ define([ me.appOptions.canChat = me.appOptions.canLicense && !me.appOptions.isOffline && !((typeof (me.editorConfig.customization) == 'object') && me.editorConfig.customization.chat===false); me.appOptions.canRename = !!me.permissions.rename; - me.appOptions.canBranding = (licType === Asc.c_oLicenseResult.Success) && (typeof me.editorConfig.customization == 'object'); + me.appOptions.canBranding = params.asc_getCustomization(); me.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof me.editorConfig.customization == 'object'); }