mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-02-10 18:05:32 +08:00
Move macros to postload. Build deploy version.
This commit is contained in:
@ -40,9 +40,7 @@
|
||||
if (Common === undefined)
|
||||
var Common = {};
|
||||
|
||||
define([
|
||||
'common/main/lib/component/Window'
|
||||
], function () {
|
||||
define([], function () {
|
||||
'use strict';
|
||||
Common.Views.MacrosDialog = Common.UI.Window.extend(_.extend({
|
||||
template:
|
||||
@ -132,7 +130,9 @@ define([
|
||||
this.loadMask.setTitle(this.textLoading);
|
||||
this.loadMask.show();
|
||||
require(['../vendor/ace/ace'], function(ace) {
|
||||
me.createCodeEditor();
|
||||
require(['../vendor/ace/ext-language_tools'], function() {
|
||||
me.createCodeEditor();
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
@ -326,9 +326,9 @@ define([
|
||||
|
||||
|
||||
if (!window.isIE) {
|
||||
me._state.aceLoadedModules.langTools = true;
|
||||
me.onAceLoadModule();
|
||||
ace.config.loadModule('ace/ext/language_tools', function () {
|
||||
me._state.aceLoadedModules.langTools = true;
|
||||
me.onAceLoadModule();
|
||||
me.codeEditor.setOptions({
|
||||
enableBasicAutocompletion: false,
|
||||
enableLiveAutocompletion: true
|
||||
@ -393,7 +393,7 @@ define([
|
||||
|
||||
if(macrosList.length > 0) {
|
||||
macrosList.forEach(function (macros) {
|
||||
macros.autostart = macros.autostart ?? false;
|
||||
macros.autostart = !!macros.autostart;
|
||||
});
|
||||
this.listMacros.store.reset(macrosList);
|
||||
var selectItem = this.listMacros.store.at(data.current);
|
||||
|
||||
@ -39,8 +39,7 @@
|
||||
|
||||
define([
|
||||
'core',
|
||||
'documenteditor/main/app/view/ViewTab',
|
||||
'common/main/lib/view/MacrosDialog',
|
||||
'documenteditor/main/app/view/ViewTab'
|
||||
], function () {
|
||||
'use strict';
|
||||
|
||||
|
||||
@ -223,6 +223,7 @@ require([
|
||||
'common/main/lib/view/DocumentHolderExt',
|
||||
'common/main/lib/util/define',
|
||||
'common/main/lib/view/DocumentPropertyDialog',
|
||||
'common/main/lib/view/MacrosDialog',
|
||||
|
||||
'documenteditor/main/app/view/FileMenuPanels',
|
||||
'documenteditor/main/app/view/DocumentHolderExt',
|
||||
|
||||
@ -28,6 +28,7 @@ require([
|
||||
'common/main/lib/view/TextInputDialog',
|
||||
'common/main/lib/view/DocumentHolderExt',
|
||||
'common/main/lib/view/DocumentPropertyDialog',
|
||||
'common/main/lib/view/MacrosDialog',
|
||||
|
||||
'documenteditor/main/app/view/FileMenuPanels',
|
||||
'documenteditor/main/app/view/DocumentHolderExt',
|
||||
|
||||
@ -40,8 +40,7 @@
|
||||
define([
|
||||
'core',
|
||||
'presentationeditor/main/app/view/ViewTab',
|
||||
'presentationeditor/main/app/view/GridSettings',
|
||||
'common/main/lib/view/MacrosDialog'
|
||||
'presentationeditor/main/app/view/GridSettings'
|
||||
], function () {
|
||||
'use strict';
|
||||
|
||||
|
||||
@ -220,6 +220,7 @@ require([
|
||||
'common/main/lib/view/SignDialog',
|
||||
'common/main/lib/view/ListSettingsDialog',
|
||||
'common/main/lib/view/DocumentPropertyDialog',
|
||||
'common/main/lib/view/MacrosDialog',
|
||||
|
||||
'presentationeditor/main/app/view/FileMenuPanels',
|
||||
'presentationeditor/main/app/view/DocumentHolderExt',
|
||||
|
||||
@ -26,6 +26,7 @@ require([
|
||||
'common/main/lib/view/SignDialog',
|
||||
'common/main/lib/view/ListSettingsDialog',
|
||||
'common/main/lib/view/DocumentPropertyDialog',
|
||||
'common/main/lib/view/MacrosDialog',
|
||||
|
||||
'presentationeditor/main/app/view/FileMenuPanels',
|
||||
'presentationeditor/main/app/view/DocumentHolderExt',
|
||||
|
||||
@ -39,8 +39,7 @@
|
||||
|
||||
define([
|
||||
'core',
|
||||
'spreadsheeteditor/main/app/view/ViewTab',
|
||||
'common/main/lib/view/MacrosDialog'
|
||||
'spreadsheeteditor/main/app/view/ViewTab'
|
||||
], function () {
|
||||
'use strict';
|
||||
|
||||
|
||||
@ -219,6 +219,7 @@ require([
|
||||
'common/main/lib/view/SignDialog',
|
||||
'common/main/lib/view/SignSettingsDialog',
|
||||
'common/main/lib/view/DocumentPropertyDialog',
|
||||
'common/main/lib/view/MacrosDialog',
|
||||
|
||||
'spreadsheeteditor/main/app/view/FileMenuPanels',
|
||||
'spreadsheeteditor/main/app/view/DocumentHolderExt',
|
||||
|
||||
@ -25,6 +25,7 @@ require([
|
||||
'common/main/lib/view/SignDialog',
|
||||
'common/main/lib/view/SignSettingsDialog',
|
||||
'common/main/lib/view/DocumentPropertyDialog',
|
||||
'common/main/lib/view/MacrosDialog',
|
||||
|
||||
'spreadsheeteditor/main/app/view/FileMenuPanels',
|
||||
'spreadsheeteditor/main/app/view/DocumentHolderExt',
|
||||
|
||||
@ -336,6 +336,7 @@ module.exports = function(grunt) {
|
||||
doRegisterTask('fetch');
|
||||
doRegisterTask('es6-promise');
|
||||
doRegisterTask('common-embed');
|
||||
doRegisterTask('ace');
|
||||
doRegisterTask('requirejs', function(defaultConfig, packageFile) {
|
||||
return {
|
||||
terser: {
|
||||
@ -819,6 +820,7 @@ module.exports = function(grunt) {
|
||||
grunt.registerTask('deploy-bootstrap', ['bootstrap-init', 'clean', 'copy']);
|
||||
grunt.registerTask('deploy-requirejs', ['requirejs-init', 'clean', 'terser']);
|
||||
grunt.registerTask('deploy-es6-promise', ['es6-promise-init', 'clean', 'copy']);
|
||||
grunt.registerTask('deploy-ace', ['ace-init', 'clean', 'copy']);
|
||||
grunt.registerTask('deploy-common-embed', ['common-embed-init', 'clean', 'copy']);
|
||||
|
||||
grunt.registerTask('deploy-app-main', ['prebuild-icons-sprite', 'main-app-init', 'clean:prebuild', 'imagemin', 'less',
|
||||
|
||||
@ -253,6 +253,19 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"ace": {
|
||||
"clean": [
|
||||
"../deploy/web-apps/vendor/ace"
|
||||
],
|
||||
"copy": {
|
||||
"script": {
|
||||
"expand": true,
|
||||
"cwd": "../vendor/ace",
|
||||
"src": "**",
|
||||
"dest": "../deploy/web-apps/vendor/ace"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tasks": {
|
||||
"deploy": [
|
||||
"increment-build",
|
||||
@ -268,7 +281,8 @@
|
||||
"deploy-iscroll",
|
||||
"deploy-fetch",
|
||||
"deploy-es6-promise",
|
||||
"deploy-common-embed"
|
||||
"deploy-common-embed",
|
||||
"deploy-ace"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user