mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 04:04:35 +08:00
[DE] added module LaunchController
This commit is contained in:
30
apps/common/main/lib/controller/LaunchController.js
Normal file
30
apps/common/main/lib/controller/LaunchController.js
Normal file
@ -0,0 +1,30 @@
|
||||
|
||||
define([
|
||||
], function () {
|
||||
const launchController = function () {
|
||||
const init = function (api) {
|
||||
this.api = api;
|
||||
Common.NotificationCenter.on('app:ready', on_app_ready.bind(this));
|
||||
}
|
||||
|
||||
const on_app_ready = function (config) {
|
||||
const me = this;
|
||||
|
||||
const app = window.DE || window.PE || window.SSE || window.PDFE;
|
||||
!app.postLaunchScripts && (app.postLaunchScripts = []);
|
||||
// console.log('on_app_ready', app.postLaunchScripts);
|
||||
|
||||
require(app.postLaunchScripts, function () {
|
||||
Common.UI.ScreenReaderFocusManager.init(me.api);
|
||||
|
||||
Common.NotificationCenter.trigger('script:loaded');
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
init: init
|
||||
};
|
||||
}
|
||||
|
||||
Common.Controllers.LaunchController = new launchController();
|
||||
});
|
||||
@ -56,7 +56,8 @@ define([
|
||||
'common/main/lib/controller/ScreenReaderFocus',
|
||||
'common/main/lib/controller/HintManager',
|
||||
'common/main/lib/controller/LayoutManager',
|
||||
'common/main/lib/controller/ExternalUsers'
|
||||
'common/main/lib/controller/ExternalUsers',
|
||||
'common/main/lib/controller/LaunchController',
|
||||
], function () {
|
||||
'use strict';
|
||||
|
||||
@ -190,9 +191,9 @@ define([
|
||||
this.api = this.getApplication().getController('Viewport').getApi();
|
||||
|
||||
Common.UI.FocusManager.init();
|
||||
Common.UI.ScreenReaderFocusManager.init(this.api);
|
||||
Common.UI.HintManager.init(this.api);
|
||||
Common.UI.Themes.init(this.api);
|
||||
Common.Controllers.LaunchController.init(this.api);
|
||||
|
||||
if (this.api){
|
||||
this.api.SetDrawingFreeze(true);
|
||||
|
||||
@ -186,13 +186,6 @@ require([
|
||||
'documenteditor/main/app/controller/DocProtection',
|
||||
'documenteditor/main/app/controller/Print',
|
||||
'documenteditor/main/app/view/FileMenuPanels',
|
||||
'documenteditor/main/app/view/ParagraphSettings',
|
||||
'documenteditor/main/app/view/HeaderFooterSettings',
|
||||
'documenteditor/main/app/view/ImageSettings',
|
||||
'documenteditor/main/app/view/TableSettings',
|
||||
'documenteditor/main/app/view/ShapeSettings',
|
||||
'documenteditor/main/app/view/TextArtSettings',
|
||||
'documenteditor/main/app/view/SignatureSettings',
|
||||
'common/main/lib/util/utils',
|
||||
'common/main/lib/controller/Fonts',
|
||||
'common/main/lib/controller/History'
|
||||
@ -201,7 +194,6 @@ require([
|
||||
,'common/main/lib/controller/Chat'
|
||||
/** coauthoring end **/
|
||||
,'common/main/lib/controller/Plugins'
|
||||
,'documenteditor/main/app/view/ChartSettings'
|
||||
,'common/main/lib/controller/ExternalDiagramEditor'
|
||||
,'common/main/lib/controller/ExternalMergeEditor'
|
||||
,'common/main/lib/controller/ExternalOleEditor'
|
||||
@ -209,6 +201,17 @@ require([
|
||||
,'common/main/lib/controller/Protection'
|
||||
,'common/main/lib/controller/Draw'
|
||||
], function() {
|
||||
app.postLaunchScripts = [
|
||||
'documenteditor/main/app/view/ParagraphSettings',
|
||||
'documenteditor/main/app/view/HeaderFooterSettings',
|
||||
'documenteditor/main/app/view/ImageSettings',
|
||||
'documenteditor/main/app/view/TableSettings',
|
||||
'documenteditor/main/app/view/ShapeSettings',
|
||||
'documenteditor/main/app/view/TextArtSettings',
|
||||
'documenteditor/main/app/view/SignatureSettings',
|
||||
'documenteditor/main/app/view/ChartSettings',
|
||||
];
|
||||
|
||||
window.compareVersions = true;
|
||||
app.start();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user