From e35136f954e75abfdb604ea5580b5f65e7ebe0ea Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 25 Sep 2024 14:56:37 +0300 Subject: [PATCH] Fix Bug 70442 --- apps/common/main/lib/controller/LaunchController.js | 8 +++++++- apps/documenteditor/forms/app_pack.js | 2 +- apps/documenteditor/main/app_pack.js | 2 +- apps/pdfeditor/main/app_pack.js | 2 +- apps/presentationeditor/main/app_pack.js | 2 +- apps/spreadsheeteditor/main/app_pack.js | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/apps/common/main/lib/controller/LaunchController.js b/apps/common/main/lib/controller/LaunchController.js index 05dc22e00f..d39ea65da8 100644 --- a/apps/common/main/lib/controller/LaunchController.js +++ b/apps/common/main/lib/controller/LaunchController.js @@ -40,6 +40,7 @@ define([ this.api = api; Common.NotificationCenter.on('app:ready', on_app_ready.bind(this)); Common.NotificationCenter.on('app:face', on_hide_loader.bind(this)); + Common.NotificationCenter.on('app-pack:loaded', on_app_pack_loaded.bind(this)); } const load_scripts = function () { @@ -53,14 +54,19 @@ define([ if (!!Common.UI.ScreenReaderFocusManager) { Common.UI.ScreenReaderFocusManager.init(me.api); } - _all_scripts_loaded = true; if ( !!window.less ) { // detect development mode + _all_scripts_loaded = true; Common.NotificationCenter.trigger('script:loaded'); } }); } + const on_app_pack_loaded = function (config) { + _all_scripts_loaded = true; + Common.NotificationCenter.trigger('script:loaded'); + } + const on_app_ready = function (config) { load_scripts.call(this); } diff --git a/apps/documenteditor/forms/app_pack.js b/apps/documenteditor/forms/app_pack.js index 0d3c861062..a3e42c4138 100644 --- a/apps/documenteditor/forms/app_pack.js +++ b/apps/documenteditor/forms/app_pack.js @@ -7,5 +7,5 @@ require([ 'common/main/lib/view/SignDialog', 'common/main/lib/view/SignSettingsDialog', ], function () { - Common.NotificationCenter.trigger('script:loaded'); + Common.NotificationCenter.trigger('app-pack:loaded'); }); diff --git a/apps/documenteditor/main/app_pack.js b/apps/documenteditor/main/app_pack.js index 7dfe624408..07fdee0b75 100644 --- a/apps/documenteditor/main/app_pack.js +++ b/apps/documenteditor/main/app_pack.js @@ -66,5 +66,5 @@ require([ 'documenteditor/main/app/view/ProtectDialog', 'documenteditor/main/app/view/MailMergeEmailDlg' ], function () { - Common.NotificationCenter.trigger('script:loaded'); + Common.NotificationCenter.trigger('app-pack:loaded'); }); diff --git a/apps/pdfeditor/main/app_pack.js b/apps/pdfeditor/main/app_pack.js index 1da5e1ed1f..6ba0889691 100644 --- a/apps/pdfeditor/main/app_pack.js +++ b/apps/pdfeditor/main/app_pack.js @@ -29,5 +29,5 @@ require([ 'pdfeditor/main/app/view/ShapeSettingsAdvanced', 'pdfeditor/main/app/view/TableSettingsAdvanced' ], function () { - Common.NotificationCenter.trigger('script:loaded'); + Common.NotificationCenter.trigger('app-pack:loaded'); }); diff --git a/apps/presentationeditor/main/app_pack.js b/apps/presentationeditor/main/app_pack.js index 22fcbeece5..53a249ef6d 100644 --- a/apps/presentationeditor/main/app_pack.js +++ b/apps/presentationeditor/main/app_pack.js @@ -40,5 +40,5 @@ require([ 'presentationeditor/main/app/view/DateTimeDialog', 'presentationeditor/main/app/view/ChartSettingsAdvanced' ], function () { - Common.NotificationCenter.trigger('script:loaded'); + Common.NotificationCenter.trigger('app-pack:loaded'); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app_pack.js b/apps/spreadsheeteditor/main/app_pack.js index fab57163a2..0088e2a527 100644 --- a/apps/spreadsheeteditor/main/app_pack.js +++ b/apps/spreadsheeteditor/main/app_pack.js @@ -85,5 +85,5 @@ require([ 'spreadsheeteditor/main/app/view/AutoFilterDialog', 'spreadsheeteditor/main/app/view/PivotGroupDialog', ], function () { - Common.NotificationCenter.trigger('script:loaded'); + Common.NotificationCenter.trigger('app-pack:loaded'); });