From 873b9e669510f226ce93e4ab3031f60f4ea4b4dc Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Tue, 22 Nov 2022 22:34:22 +0300 Subject: [PATCH] [DE] refactoring --- apps/documenteditor/main/app.js | 4 ++-- apps/documenteditor/main/app/controller/Main.js | 3 ++- apps/documenteditor/main/app_dev.js | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/documenteditor/main/app.js b/apps/documenteditor/main/app.js index 8e57bd105..57cfcab94 100644 --- a/apps/documenteditor/main/app.js +++ b/apps/documenteditor/main/app.js @@ -56,7 +56,7 @@ require.config({ socketio : '../vendor/socketio/socket.io.min', allfonts : '../../sdkjs/common/AllFonts', sdk : '../../sdkjs/word/sdk-all-min', - api : 'api/documents/api', + // api : 'api/documents/api', core : 'common/main/lib/core/application', notification : 'common/main/lib/core/NotificationCenter', keymaster : 'common/main/lib/core/keymaster', @@ -128,7 +128,7 @@ require([ 'bootstrap', 'core', 'sdk', - 'api', + // 'api', 'analytics', 'gateway', 'locale' diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index f2dd0f5fa..16a1bf070 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -2284,7 +2284,8 @@ define([ onServerVersion: function(buildVersion) { 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; Common.UI.warning({ title: this.titleServerVersion, diff --git a/apps/documenteditor/main/app_dev.js b/apps/documenteditor/main/app_dev.js index fcf7ac26f..e99e33aa4 100644 --- a/apps/documenteditor/main/app_dev.js +++ b/apps/documenteditor/main/app_dev.js @@ -54,7 +54,7 @@ require.config({ jmousewheel : '../vendor/perfect-scrollbar/src/jquery.mousewheel', xregexp : '../vendor/xregexp/xregexp-all-min', socketio : '../vendor/socketio/socket.io.min', - api : 'api/documents/api', + // api : 'api/documents/api', core : 'common/main/lib/core/application', notification : 'common/main/lib/core/NotificationCenter', keymaster : 'common/main/lib/core/keymaster', @@ -116,7 +116,7 @@ require([ 'backbone', 'bootstrap', 'core', - 'api', + // 'api', 'analytics', 'gateway', 'locale',