[all] delayed loading for api.js
This commit is contained in:
parent
00fbf050b0
commit
9232bcdcac
|
@ -120,7 +120,9 @@ define([
|
||||||
}
|
}
|
||||||
externalEditor.attachMouseEvents();
|
externalEditor.attachMouseEvents();
|
||||||
} else {
|
} else {
|
||||||
createExternalEditor.apply(this);
|
require(['api'], function () {
|
||||||
|
createExternalEditor.apply(this);
|
||||||
|
}.bind(this));
|
||||||
}
|
}
|
||||||
this.isExternalEditorVisible = true;
|
this.isExternalEditorVisible = true;
|
||||||
this.isHandlerCalled = false;
|
this.isHandlerCalled = false;
|
||||||
|
|
|
@ -118,7 +118,9 @@ define([
|
||||||
}
|
}
|
||||||
externalEditor.attachMouseEvents();
|
externalEditor.attachMouseEvents();
|
||||||
} else {
|
} else {
|
||||||
createExternalEditor.apply(this);
|
require(['api'], function () {
|
||||||
|
createExternalEditor.apply(this);
|
||||||
|
}.bind(this))
|
||||||
}
|
}
|
||||||
this.isExternalEditorVisible = true;
|
this.isExternalEditorVisible = true;
|
||||||
this.isHandlerCalled = false;
|
this.isHandlerCalled = false;
|
||||||
|
|
|
@ -120,7 +120,9 @@ define([
|
||||||
}
|
}
|
||||||
externalEditor.attachMouseEvents();
|
externalEditor.attachMouseEvents();
|
||||||
} else {
|
} else {
|
||||||
createExternalEditor.apply(this);
|
require(['api'], function () {
|
||||||
|
createExternalEditor.apply(this);
|
||||||
|
}.bind(this));
|
||||||
}
|
}
|
||||||
this.isExternalEditorVisible = true;
|
this.isExternalEditorVisible = true;
|
||||||
this.isHandlerCalled = false;
|
this.isHandlerCalled = false;
|
||||||
|
|
|
@ -56,7 +56,7 @@ require.config({
|
||||||
socketio : '../vendor/socketio/socket.io.min',
|
socketio : '../vendor/socketio/socket.io.min',
|
||||||
allfonts : '../../sdkjs/common/AllFonts',
|
allfonts : '../../sdkjs/common/AllFonts',
|
||||||
sdk : '../../sdkjs/word/sdk-all-min',
|
sdk : '../../sdkjs/word/sdk-all-min',
|
||||||
// api : 'api/documents/api',
|
api : 'api/documents/api',
|
||||||
core : 'common/main/lib/core/application',
|
core : 'common/main/lib/core/application',
|
||||||
notification : 'common/main/lib/core/NotificationCenter',
|
notification : 'common/main/lib/core/NotificationCenter',
|
||||||
keymaster : 'common/main/lib/core/keymaster',
|
keymaster : 'common/main/lib/core/keymaster',
|
||||||
|
@ -128,7 +128,6 @@ require([
|
||||||
'backbone',
|
'backbone',
|
||||||
'bootstrap',
|
'bootstrap',
|
||||||
'core',
|
'core',
|
||||||
// 'api',
|
|
||||||
'analytics',
|
'analytics',
|
||||||
'gateway',
|
'gateway',
|
||||||
'locale'
|
'locale'
|
||||||
|
|
|
@ -54,7 +54,7 @@ require.config({
|
||||||
jmousewheel : '../vendor/perfect-scrollbar/src/jquery.mousewheel',
|
jmousewheel : '../vendor/perfect-scrollbar/src/jquery.mousewheel',
|
||||||
xregexp : '../vendor/xregexp/xregexp-all-min',
|
xregexp : '../vendor/xregexp/xregexp-all-min',
|
||||||
socketio : '../vendor/socketio/socket.io.min',
|
socketio : '../vendor/socketio/socket.io.min',
|
||||||
// api : 'api/documents/api',
|
api : 'api/documents/api',
|
||||||
core : 'common/main/lib/core/application',
|
core : 'common/main/lib/core/application',
|
||||||
notification : 'common/main/lib/core/NotificationCenter',
|
notification : 'common/main/lib/core/NotificationCenter',
|
||||||
keymaster : 'common/main/lib/core/keymaster',
|
keymaster : 'common/main/lib/core/keymaster',
|
||||||
|
@ -116,7 +116,6 @@ require([
|
||||||
'backbone',
|
'backbone',
|
||||||
'bootstrap',
|
'bootstrap',
|
||||||
'core',
|
'core',
|
||||||
// 'api',
|
|
||||||
'analytics',
|
'analytics',
|
||||||
'gateway',
|
'gateway',
|
||||||
'locale',
|
'locale',
|
||||||
|
|
|
@ -127,7 +127,6 @@ require([
|
||||||
'bootstrap',
|
'bootstrap',
|
||||||
'core',
|
'core',
|
||||||
'sdk',
|
'sdk',
|
||||||
'api',
|
|
||||||
'analytics',
|
'analytics',
|
||||||
'gateway',
|
'gateway',
|
||||||
'locale'
|
'locale'
|
||||||
|
|
|
@ -1869,7 +1869,8 @@ define([
|
||||||
onServerVersion: function(buildVersion) {
|
onServerVersion: function(buildVersion) {
|
||||||
if (this.changeServerVersion) return true;
|
if (this.changeServerVersion) return true;
|
||||||
|
|
||||||
if (DocsAPI.DocEditor.version() !== buildVersion && !window.compareVersions) {
|
const cur_version = this.getApplication().getController('LeftMenu').leftMenu.getMenu('about').txtVersionNum;
|
||||||
|
if ( !window.compareVersions && cur_version !== buildVersion ) {
|
||||||
this.changeServerVersion = true;
|
this.changeServerVersion = true;
|
||||||
Common.UI.warning({
|
Common.UI.warning({
|
||||||
title: this.titleServerVersion,
|
title: this.titleServerVersion,
|
||||||
|
|
|
@ -115,7 +115,6 @@ require([
|
||||||
'backbone',
|
'backbone',
|
||||||
'bootstrap',
|
'bootstrap',
|
||||||
'core',
|
'core',
|
||||||
'api',
|
|
||||||
'analytics',
|
'analytics',
|
||||||
'gateway',
|
'gateway',
|
||||||
'locale',
|
'locale',
|
||||||
|
|
|
@ -127,7 +127,6 @@ require([
|
||||||
'bootstrap',
|
'bootstrap',
|
||||||
'core',
|
'core',
|
||||||
'sdk',
|
'sdk',
|
||||||
'api',
|
|
||||||
'analytics',
|
'analytics',
|
||||||
'gateway',
|
'gateway',
|
||||||
'locale'
|
'locale'
|
||||||
|
|
|
@ -2263,7 +2263,8 @@ define([
|
||||||
onServerVersion: function(buildVersion) {
|
onServerVersion: function(buildVersion) {
|
||||||
if (this.changeServerVersion) return true;
|
if (this.changeServerVersion) return true;
|
||||||
|
|
||||||
if (DocsAPI.DocEditor.version() !== buildVersion && !window.compareVersions) {
|
const cur_version = this.getApplication().getController('LeftMenu').leftMenu.getMenu('about').txtVersionNum;
|
||||||
|
if (!window.compareVersions && cur_version !== buildVersion) {
|
||||||
this.changeServerVersion = true;
|
this.changeServerVersion = true;
|
||||||
Common.UI.warning({
|
Common.UI.warning({
|
||||||
title: this.titleServerVersion,
|
title: this.titleServerVersion,
|
||||||
|
|
|
@ -115,7 +115,6 @@ require([
|
||||||
'backbone',
|
'backbone',
|
||||||
'bootstrap',
|
'bootstrap',
|
||||||
'core',
|
'core',
|
||||||
'api',
|
|
||||||
'analytics',
|
'analytics',
|
||||||
'gateway',
|
'gateway',
|
||||||
'locale',
|
'locale',
|
||||||
|
|
Loading…
Reference in a new issue