diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js index bb79cb55f..ddff08fb3 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -360,6 +360,16 @@ var ApplicationController = new(function(){ } function onError(id, level, errData) { + if (id == Asc.c_oAscError.ID.LoadingScriptError) { + $('#id-critical-error-title').text(me.criticalErrorTitle); + $('#id-critical-error-message').text(me.scriptLoadError); + $('#id-critical-error-close').off().on('click', function(){ + window.location.reload(); + }); + $('#id-critical-error-dialog').css('z-index', 20002).modal('show'); + return; + } + hidePreloader(); var message; @@ -525,6 +535,7 @@ var ApplicationController = new(function(){ convertationErrorText : 'Convertation failed.', downloadErrorText : 'Download failed.', criticalErrorTitle : 'Error', - notcriticalErrorTitle : 'Warning' + notcriticalErrorTitle : 'Warning', + scriptLoadError: 'The connection is too slow, some of the components could not be loaded. Please reload the page.' } })(); \ No newline at end of file diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index f5bc4d2a6..ddc7215de 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1288,6 +1288,11 @@ define([ }, onError: function(id, level, errData) { + if (id == Asc.c_oAscError.ID.LoadingScriptError) { + this.showTips([this.scriptLoadError]); + return; + } + this.hidePreloader(); this.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); @@ -2300,7 +2305,8 @@ define([ errorDataEncrypted: 'Encrypted changes have been received, they cannot be deciphered.', textClose: 'Close', textPaidFeature: 'Paid feature', - textLicencePaidFeature: 'The feature you are trying to use is available for additional payment.
If you need it, please contact Sales Department' + textLicencePaidFeature: 'The feature you are trying to use is available for additional payment.
If you need it, please contact Sales Department', + scriptLoadError: 'The connection is too slow, some of the components could not be loaded. Please reload the page.' } })(), DE.Controllers.Main || {})) }); \ No newline at end of file diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index b12f014c4..a0a9c853b 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -767,6 +767,14 @@ define([ }, onError: function(id, level, errData) { + if (id == Asc.c_oAscError.ID.LoadingScriptError) { + uiApp.addNotification({ + title: this.criticalErrorTitle, + message: this.scriptLoadError + }); + return; + } + this.hidePreloader(); this.onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); @@ -1347,7 +1355,8 @@ define([ warnLicenseExceeded: 'The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.', warnLicenseUsersExceeded: 'The number of concurrent users has been exceeded and the document will be opened for viewing only.
Please contact your administrator for more information.', errorDataEncrypted: 'Encrypted changes have been received, they cannot be deciphered.', - closeButtonText: 'Close File' + closeButtonText: 'Close File', + scriptLoadError: 'The connection is too slow, some of the components could not be loaded. Please reload the page.' } })(), DE.Controllers.Main || {})) }); \ No newline at end of file