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);
|
// console.log('on_app_ready', app.postLaunchScripts);
|
||||||
|
|
||||||
require(app.postLaunchScripts, function () {
|
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
|
if ( !!window.less ) { // detect development mode
|
||||||
Common.NotificationCenter.trigger('script:loaded');
|
Common.NotificationCenter.trigger('script:loaded');
|
||||||
@ -67,5 +69,6 @@ define([
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
!Common.Controllers && (Common.Controllers = {});
|
||||||
Common.Controllers.LaunchController = new launchController();
|
Common.Controllers.LaunchController = new launchController();
|
||||||
});
|
});
|
||||||
@ -106,22 +106,20 @@ require.config({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
require(['underscore'], function(_) {
|
|
||||||
window._ = _
|
|
||||||
})
|
|
||||||
|
|
||||||
require([
|
require([
|
||||||
'backbone',
|
'backbone',
|
||||||
|
'underscore',
|
||||||
'core',
|
'core',
|
||||||
'sdk',
|
'sdk',
|
||||||
'api',
|
'api',
|
||||||
'analytics',
|
'analytics',
|
||||||
'gateway',
|
'gateway',
|
||||||
'locale'
|
'locale'
|
||||||
], function (Backbone, Core) {
|
], function (Backbone, _, Core) {
|
||||||
if (Backbone.History && Backbone.History.started)
|
if (Backbone.History && Backbone.History.started)
|
||||||
return;
|
return;
|
||||||
Backbone.history.start();
|
Backbone.history.start();
|
||||||
|
window._ = _;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Application instance with DE namespace defined
|
* Application instance with DE namespace defined
|
||||||
@ -142,6 +140,8 @@ require([
|
|||||||
Common.Locale.apply(
|
Common.Locale.apply(
|
||||||
function() {
|
function() {
|
||||||
require([
|
require([
|
||||||
|
'common/main/lib/mods/dropdown',
|
||||||
|
'common/main/lib/mods/tooltip',
|
||||||
'documenteditor/forms/app/controller/ApplicationController',
|
'documenteditor/forms/app/controller/ApplicationController',
|
||||||
'documenteditor/forms/app/controller/Plugins',
|
'documenteditor/forms/app/controller/Plugins',
|
||||||
'documenteditor/forms/app/controller/SearchBar',
|
'documenteditor/forms/app/controller/SearchBar',
|
||||||
@ -151,10 +151,11 @@ require([
|
|||||||
'common/main/lib/controller/Scaling',
|
'common/main/lib/controller/Scaling',
|
||||||
'common/main/lib/controller/Themes',
|
'common/main/lib/controller/Themes',
|
||||||
'common/main/lib/controller/Desktop',
|
'common/main/lib/controller/Desktop',
|
||||||
'common/main/lib/view/PluginDlg',
|
|
||||||
'common/main/lib/view/SearchBar',
|
'common/main/lib/view/SearchBar',
|
||||||
'common/forms/lib/view/modals'
|
'common/forms/lib/view/modals'
|
||||||
], function() {
|
], function() {
|
||||||
|
app.postLaunchScripts = ['documenteditor/forms/code'];
|
||||||
|
|
||||||
app.start();
|
app.start();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,13 +41,10 @@ define([
|
|||||||
'common/main/lib/component/Calendar',
|
'common/main/lib/component/Calendar',
|
||||||
'common/main/lib/util/LocalStorage',
|
'common/main/lib/util/LocalStorage',
|
||||||
'common/main/lib/util/Shortcuts',
|
'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/main/lib/view/OpenDialog',
|
||||||
'common/forms/lib/view/modals',
|
'common/forms/lib/view/modals',
|
||||||
'documenteditor/forms/app/view/ApplicationView'
|
'documenteditor/forms/app/view/ApplicationView',
|
||||||
|
'common/main/lib/controller/LaunchController'
|
||||||
], function (Viewport) {
|
], function (Viewport) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@ -102,6 +99,7 @@ define([
|
|||||||
});
|
});
|
||||||
|
|
||||||
Common.UI.Themes.init(this.api);
|
Common.UI.Themes.init(this.api);
|
||||||
|
Common.Controllers.LaunchController.init(this.api);
|
||||||
|
|
||||||
$(window).on('resize', this.onDocumentResize.bind(this));
|
$(window).on('resize', this.onDocumentResize.bind(this));
|
||||||
|
|
||||||
|
|||||||
@ -36,8 +36,7 @@
|
|||||||
|
|
||||||
define([
|
define([
|
||||||
'core',
|
'core',
|
||||||
'common/main/lib/collection/Plugins',
|
'common/main/lib/collection/Plugins'
|
||||||
'common/main/lib/view/PluginDlg'
|
|
||||||
], function () {
|
], function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|||||||
@ -95,22 +95,20 @@ require.config({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
require(['underscore'], function(_) {
|
|
||||||
window._ = _
|
|
||||||
})
|
|
||||||
|
|
||||||
require([
|
require([
|
||||||
'backbone',
|
'backbone',
|
||||||
|
'underscore',
|
||||||
'core',
|
'core',
|
||||||
'api',
|
'api',
|
||||||
'analytics',
|
'analytics',
|
||||||
'gateway',
|
'gateway',
|
||||||
'locale',
|
'locale',
|
||||||
'socketio',
|
'socketio',
|
||||||
], function (Backbone, Core) {
|
], function (Backbone, _, Core) {
|
||||||
if (Backbone.History && Backbone.History.started)
|
if (Backbone.History && Backbone.History.started)
|
||||||
return;
|
return;
|
||||||
Backbone.history.start();
|
Backbone.history.start();
|
||||||
|
window._ = _;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Application instance with DE namespace defined
|
* Application instance with DE namespace defined
|
||||||
@ -132,6 +130,8 @@ require([
|
|||||||
Common.Locale.apply(
|
Common.Locale.apply(
|
||||||
function() {
|
function() {
|
||||||
require([
|
require([
|
||||||
|
'common/main/lib/mods/dropdown',
|
||||||
|
'common/main/lib/mods/tooltip',
|
||||||
'documenteditor/forms/app/controller/ApplicationController',
|
'documenteditor/forms/app/controller/ApplicationController',
|
||||||
'documenteditor/forms/app/controller/Plugins',
|
'documenteditor/forms/app/controller/Plugins',
|
||||||
'documenteditor/forms/app/controller/SearchBar',
|
'documenteditor/forms/app/controller/SearchBar',
|
||||||
@ -141,10 +141,17 @@ require([
|
|||||||
'common/main/lib/controller/Scaling',
|
'common/main/lib/controller/Scaling',
|
||||||
'common/main/lib/controller/Themes',
|
'common/main/lib/controller/Themes',
|
||||||
'common/main/lib/controller/Desktop',
|
'common/main/lib/controller/Desktop',
|
||||||
'common/main/lib/view/PluginDlg',
|
|
||||||
'common/main/lib/view/SearchBar',
|
'common/main/lib/view/SearchBar',
|
||||||
'common/forms/lib/view/modals'
|
'common/forms/lib/view/modals'
|
||||||
], function() {
|
], 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;
|
window.compareVersions = true;
|
||||||
app.start();
|
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: {
|
compile: {
|
||||||
options: packageFile.forms.js.requirejs.options
|
options: packageFile.forms.js.requirejs.options
|
||||||
}
|
},
|
||||||
|
postload: {
|
||||||
|
options: packageFile.forms.js.postload.options
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
less: {
|
less: {
|
||||||
@ -127,6 +130,10 @@ module.exports = (grunt) => {
|
|||||||
src: [packageFile.forms.js.requirejs.options.out],
|
src: [packageFile.forms.js.requirejs.options.out],
|
||||||
dest: 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": {
|
"less": {
|
||||||
|
|||||||
Reference in New Issue
Block a user