From 057d730c781cd5c5ad918f7d3f07e471d23a1b0f Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Fri, 27 Apr 2018 16:32:39 +0300 Subject: [PATCH] [Desktop] config didn't update --- apps/common/main/lib/controller/Desktop.js | 15 ++++++++++----- apps/documenteditor/main/app/controller/Main.js | 2 ++ .../main/app/controller/Main.js | 2 ++ .../spreadsheeteditor/main/app/controller/Main.js | 2 ++ 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/apps/common/main/lib/controller/Desktop.js b/apps/common/main/lib/controller/Desktop.js index add4de842..fd5ae4b4c 100644 --- a/apps/common/main/lib/controller/Desktop.js +++ b/apps/common/main/lib/controller/Desktop.js @@ -50,21 +50,26 @@ define([ _.extend(config, opts); if ( config.isDesktopApp ) { - Common.NotificationCenter.on('app:ready', function (config) { + Common.NotificationCenter.on('app:ready', function (opts) { + _.extend(config, opts); !!app && app.execCommand('doc:onready', ''); }); } }, process: function (opts) { - if ( opts == 'goback' ) { - if ( config.isDesktopApp && !!app ) { + if ( config.isDesktopApp && !!app ) { + if ( opts == 'goback' ) { app.execCommand('go:folder', config.isOffline ? 'offline' : config.customization.goback.url); return true; + } else + if ( opts == 'preloader:hide' ) { + app.execCommand('editor:onready', ''); + return true; } - - return false; } + + return false; } }; }; diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index c18fc0334..0717625b4 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1589,6 +1589,8 @@ define([ Common.NotificationCenter.trigger('layout:changed', 'main'); $('#loading-mask').hide().remove(); + + Common.Controllers.Desktop.process('preloader:hide'); }, onDownloadUrl: function(url) { diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 50a46be53..e6e1dea64 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1332,6 +1332,8 @@ define([ Common.NotificationCenter.trigger('layout:changed', 'main'); $('#loading-mask').hide().remove(); + + Common.Controllers.Desktop.process('preloader:hide'); }, onDownloadUrl: function(url) { diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index ec60b1dee..dba4430bd 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1468,6 +1468,8 @@ define([ this.stackLongActions.pop({id: InitApplication, type: Asc.c_oAscAsyncActionType.BlockInteraction}); Common.NotificationCenter.trigger('layout:changed', 'main'); $('#loading-mask').hide().remove(); + + Common.Controllers.Desktop.process('preloader:hide'); }, onDownloadUrl: function(url) {