From 27dd33133e749a08caf11a7ec8de56debb222def Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 4 Oct 2019 10:36:10 +0300 Subject: [PATCH] Don't show skeleton loader when use customization.toolbarNoTabs=true mode --- apps/api/documents/api.js | 5 +++-- apps/documenteditor/main/app/controller/Main.js | 4 +++- apps/presentationeditor/main/app/controller/Main.js | 4 +++- apps/spreadsheeteditor/main/app/controller/Main.js | 4 +++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 0bc80b97d..ed34a79cb 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -738,9 +738,10 @@ : "main"; var index = "/index.html"; - if (config.editorConfig && config.editorConfig.targetApp!=='desktop') { + if (config.editorConfig) { var customization = config.editorConfig.customization; - if ( typeof(customization) == 'object' && (customization.loaderName || customization.loaderLogo)) { + if ( typeof(customization) == 'object' && ( customization.toolbarNoTabs || + (config.editorConfig.targetApp!=='desktop') && (customization.loaderName || customization.loaderLogo))) { index = "/index_loader.html"; } } diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 0b6eb8d15..6c9c5b4b7 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -363,8 +363,10 @@ define([ if (this.appOptions.location == 'us' || this.appOptions.location == 'ca') Common.Utils.Metric.setDefaultMetric(Common.Utils.Metric.c_MetricUnits.inch); - if (!this.editorConfig.customization || !(this.editorConfig.customization.loaderName || this.editorConfig.customization.loaderLogo)) + if (!( this.editorConfig.customization && ( this.editorConfig.customization.toolbarNoTabs || + (this.editorConfig.targetApp!=='desktop') && (this.editorConfig.customization.loaderName || this.editorConfig.customization.loaderLogo)))) { $('#editor_sdk').append('
' + '
'.repeat(20) + '
'); + } Common.Controllers.Desktop.init(this.appOptions); }, diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 9e940ee48..8ac192e66 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -330,8 +330,10 @@ define([ if (this.appOptions.location == 'us' || this.appOptions.location == 'ca') Common.Utils.Metric.setDefaultMetric(Common.Utils.Metric.c_MetricUnits.inch); - if (!this.editorConfig.customization || !(this.editorConfig.customization.loaderName || this.editorConfig.customization.loaderLogo)) + if (!( this.editorConfig.customization && ( this.editorConfig.customization.toolbarNoTabs || + (this.editorConfig.targetApp!=='desktop') && (this.editorConfig.customization.loaderName || this.editorConfig.customization.loaderLogo)))) { $('#editor_sdk').append('
'); + } Common.Controllers.Desktop.init(this.appOptions); }, diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index cd91282d0..9c399ae43 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -360,8 +360,10 @@ define([ if (this.appOptions.location == 'us' || this.appOptions.location == 'ca') Common.Utils.Metric.setDefaultMetric(Common.Utils.Metric.c_MetricUnits.inch); - if (!this.editorConfig.customization || !(this.editorConfig.customization.loaderName || this.editorConfig.customization.loaderLogo)) + if (!( this.editorConfig.customization && ( this.editorConfig.customization.toolbarNoTabs || + (this.editorConfig.targetApp!=='desktop') && (this.editorConfig.customization.loaderName || this.editorConfig.customization.loaderLogo)))) { $('#editor_sdk').append('
' + '
'.repeat(2) + '
'); + } this.isFrameClosed = (this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge); Common.Controllers.Desktop.init(this.appOptions);