mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-04-07 14:06:16 +08:00
Fix DE forms
This commit is contained in:
@ -48,7 +48,9 @@ define([
|
||||
// console.log('on_app_ready', app.postLaunchScripts);
|
||||
|
||||
require(app.postLaunchScripts, function () {
|
||||
Common.UI.ScreenReaderFocusManager.init(me.api);
|
||||
if (!!Common.UI.ScreenReaderFocusManager) {
|
||||
Common.UI.ScreenReaderFocusManager.init(me.api);
|
||||
}
|
||||
|
||||
if ( !!window.less ) { // detect development mode
|
||||
Common.NotificationCenter.trigger('script:loaded');
|
||||
@ -67,5 +69,6 @@ define([
|
||||
};
|
||||
}
|
||||
|
||||
!Common.Controllers && (Common.Controllers = {});
|
||||
Common.Controllers.LaunchController = new launchController();
|
||||
});
|
||||
@ -106,22 +106,20 @@ require.config({
|
||||
}
|
||||
});
|
||||
|
||||
require(['underscore'], function(_) {
|
||||
window._ = _
|
||||
})
|
||||
|
||||
require([
|
||||
'backbone',
|
||||
'underscore',
|
||||
'core',
|
||||
'sdk',
|
||||
'api',
|
||||
'analytics',
|
||||
'gateway',
|
||||
'locale'
|
||||
], function (Backbone, Core) {
|
||||
], function (Backbone, _, Core) {
|
||||
if (Backbone.History && Backbone.History.started)
|
||||
return;
|
||||
Backbone.history.start();
|
||||
window._ = _;
|
||||
|
||||
/**
|
||||
* Application instance with DE namespace defined
|
||||
@ -142,6 +140,8 @@ require([
|
||||
Common.Locale.apply(
|
||||
function() {
|
||||
require([
|
||||
'common/main/lib/mods/dropdown',
|
||||
'common/main/lib/mods/tooltip',
|
||||
'documenteditor/forms/app/controller/ApplicationController',
|
||||
'documenteditor/forms/app/controller/Plugins',
|
||||
'documenteditor/forms/app/controller/SearchBar',
|
||||
@ -151,10 +151,11 @@ require([
|
||||
'common/main/lib/controller/Scaling',
|
||||
'common/main/lib/controller/Themes',
|
||||
'common/main/lib/controller/Desktop',
|
||||
'common/main/lib/view/PluginDlg',
|
||||
'common/main/lib/view/SearchBar',
|
||||
'common/forms/lib/view/modals'
|
||||
], function() {
|
||||
app.postLaunchScripts = ['documenteditor/forms/code'];
|
||||
|
||||
app.start();
|
||||
});
|
||||
}
|
||||
|
||||
@ -41,13 +41,10 @@ define([
|
||||
'common/main/lib/component/Calendar',
|
||||
'common/main/lib/util/LocalStorage',
|
||||
'common/main/lib/util/Shortcuts',
|
||||
'common/main/lib/view/CopyWarningDialog',
|
||||
'common/main/lib/view/ImageFromUrlDialog',
|
||||
'common/main/lib/view/SelectFileDlg',
|
||||
'common/main/lib/view/SaveAsDlg',
|
||||
'common/main/lib/view/OpenDialog',
|
||||
'common/forms/lib/view/modals',
|
||||
'documenteditor/forms/app/view/ApplicationView'
|
||||
'documenteditor/forms/app/view/ApplicationView',
|
||||
'common/main/lib/controller/LaunchController'
|
||||
], function (Viewport) {
|
||||
'use strict';
|
||||
|
||||
@ -102,6 +99,7 @@ define([
|
||||
});
|
||||
|
||||
Common.UI.Themes.init(this.api);
|
||||
Common.Controllers.LaunchController.init(this.api);
|
||||
|
||||
$(window).on('resize', this.onDocumentResize.bind(this));
|
||||
|
||||
|
||||
@ -36,8 +36,7 @@
|
||||
|
||||
define([
|
||||
'core',
|
||||
'common/main/lib/collection/Plugins',
|
||||
'common/main/lib/view/PluginDlg'
|
||||
'common/main/lib/collection/Plugins'
|
||||
], function () {
|
||||
'use strict';
|
||||
|
||||
|
||||
@ -95,22 +95,20 @@ require.config({
|
||||
}
|
||||
});
|
||||
|
||||
require(['underscore'], function(_) {
|
||||
window._ = _
|
||||
})
|
||||
|
||||
require([
|
||||
'backbone',
|
||||
'underscore',
|
||||
'core',
|
||||
'api',
|
||||
'analytics',
|
||||
'gateway',
|
||||
'locale',
|
||||
'socketio',
|
||||
], function (Backbone, Core) {
|
||||
], function (Backbone, _, Core) {
|
||||
if (Backbone.History && Backbone.History.started)
|
||||
return;
|
||||
Backbone.history.start();
|
||||
window._ = _;
|
||||
|
||||
/**
|
||||
* Application instance with DE namespace defined
|
||||
@ -132,6 +130,8 @@ require([
|
||||
Common.Locale.apply(
|
||||
function() {
|
||||
require([
|
||||
'common/main/lib/mods/dropdown',
|
||||
'common/main/lib/mods/tooltip',
|
||||
'documenteditor/forms/app/controller/ApplicationController',
|
||||
'documenteditor/forms/app/controller/Plugins',
|
||||
'documenteditor/forms/app/controller/SearchBar',
|
||||
@ -141,10 +141,17 @@ require([
|
||||
'common/main/lib/controller/Scaling',
|
||||
'common/main/lib/controller/Themes',
|
||||
'common/main/lib/controller/Desktop',
|
||||
'common/main/lib/view/PluginDlg',
|
||||
'common/main/lib/view/SearchBar',
|
||||
'common/forms/lib/view/modals'
|
||||
], function() {
|
||||
app.postLaunchScripts = [
|
||||
'common/main/lib/view/PluginDlg',
|
||||
'common/main/lib/view/CopyWarningDialog',
|
||||
'common/main/lib/view/ImageFromUrlDialog',
|
||||
'common/main/lib/view/SelectFileDlg',
|
||||
'common/main/lib/view/SaveAsDlg',
|
||||
];
|
||||
|
||||
window.compareVersions = true;
|
||||
app.start();
|
||||
});
|
||||
|
||||
9
apps/documenteditor/forms/app_pack.js
Normal file
9
apps/documenteditor/forms/app_pack.js
Normal file
@ -0,0 +1,9 @@
|
||||
require([
|
||||
'common/main/lib/view/PluginDlg',
|
||||
'common/main/lib/view/CopyWarningDialog',
|
||||
'common/main/lib/view/ImageFromUrlDialog',
|
||||
'common/main/lib/view/SelectFileDlg',
|
||||
'common/main/lib/view/SaveAsDlg',
|
||||
], function () {
|
||||
Common.NotificationCenter.trigger('script:loaded');
|
||||
});
|
||||
@ -60,7 +60,10 @@ module.exports = (grunt) => {
|
||||
},
|
||||
compile: {
|
||||
options: packageFile.forms.js.requirejs.options
|
||||
}
|
||||
},
|
||||
postload: {
|
||||
options: packageFile.forms.js.postload.options
|
||||
},
|
||||
},
|
||||
|
||||
less: {
|
||||
@ -127,6 +130,10 @@ module.exports = (grunt) => {
|
||||
src: [packageFile.forms.js.requirejs.options.out],
|
||||
dest: packageFile.forms.js.requirejs.options.out
|
||||
},
|
||||
postload: {
|
||||
src: packageFile.forms.js.postload.options.out,
|
||||
dest: packageFile.forms.js.postload.options.out,
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@ -100,6 +100,20 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"postload": {
|
||||
"options": {
|
||||
"baseUrl": "../apps/",
|
||||
"optimize": "none",
|
||||
"name": "../apps/documenteditor/forms/app_pack.js",
|
||||
"out": "../deploy/web-apps/apps/documenteditor/forms/code.js",
|
||||
"inlineText": true,
|
||||
"findNestedDependencies": false,
|
||||
"optimizeAllPluginResources": false,
|
||||
"paths": {
|
||||
"text": "../vendor/requirejs-text/text"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"less": {
|
||||
|
||||
Reference in New Issue
Block a user