diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js index 2238c2de6..be5cfa956 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -731,6 +731,10 @@ DE.ApplicationController = new(function(){ message = me.errorLoadingFont; break; + case Asc.c_oAscError.ID.KeyExpire: + message = me.errorTokenExpire; + break; + default: message = me.errorDefaultMessage.replace('%1', id); break; @@ -935,6 +939,7 @@ DE.ApplicationController = new(function(){ errorForceSave: "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.", txtEmpty: '(Empty)', txtPressLink: 'Press Ctrl and click link', - errorLoadingFont: 'Fonts are not loaded.
Please contact your Document Server administrator.' + errorLoadingFont: 'Fonts are not loaded.
Please contact your Document Server administrator.', + errorTokenExpire: 'The document security token has expired.
Please contact your Document Server administrator.' } })(); \ No newline at end of file diff --git a/apps/documenteditor/embed/locale/en.json b/apps/documenteditor/embed/locale/en.json index 87c407871..17ba71f73 100644 --- a/apps/documenteditor/embed/locale/en.json +++ b/apps/documenteditor/embed/locale/en.json @@ -19,6 +19,7 @@ "DE.ApplicationController.errorSubmit": "Submit failed.", "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.
Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.", "DE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", + "DE.ApplicationController.errorTokenExpire": "The document security token has expired.
Please contact your Document Server administrator.", "DE.ApplicationController.notcriticalErrorTitle": "Warning", "DE.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.", "DE.ApplicationController.textAnonymous": "Anonymous", diff --git a/apps/documenteditor/forms/app/controller/ApplicationController.js b/apps/documenteditor/forms/app/controller/ApplicationController.js index 8d095d3c7..1692decd0 100644 --- a/apps/documenteditor/forms/app/controller/ApplicationController.js +++ b/apps/documenteditor/forms/app/controller/ApplicationController.js @@ -224,6 +224,15 @@ define([ config.msg = this.errorLoadingFont; break; + case Asc.c_oAscError.ID.Warning: + config.msg = this.errorConnectToServer; + config.closable = false; + break; + + case Asc.c_oAscError.ID.KeyExpire: + config.msg = this.errorTokenExpire; + break; + default: config.msg = (typeof id == 'string') ? id : this.errorDefaultMessage.replace('%1', id); break; @@ -253,7 +262,14 @@ define([ config.iconCls = 'warn'; config.buttons = ['ok']; config.callback = _.bind(function(btn){ - if (id == Asc.c_oAscError.ID.EditingError) { + if (id == Asc.c_oAscError.ID.Warning && btn == 'ok' && this.appOptions.canDownload) { + Common.UI.Menu.Manager.hideAll(); + var me = this; + setTimeout(function() { + $('button', me.view.btnOptions.cmpEl).click(); + }, 10); + + } else if (id == Asc.c_oAscError.ID.EditingError) { Common.NotificationCenter.trigger('api:disconnect', true); // enable download and print } }, this); @@ -1347,7 +1363,9 @@ define([ textBuyNow: 'Visit website', textNoLicenseTitle: 'License limit reached', textContactUs: 'Contact sales', - errorLoadingFont: 'Fonts are not loaded.
Please contact your Document Server administrator.' + errorLoadingFont: 'Fonts are not loaded.
Please contact your Document Server administrator.', + errorConnectToServer: 'The document could not be saved. Please check connection settings or contact your administrator.
When you click the \'OK\' button, you will be prompted to download the document.', + errorTokenExpire: 'The document security token has expired.
Please contact your Document Server administrator.' }, DE.Controllers.ApplicationController)); }); diff --git a/apps/documenteditor/forms/locale/en.json b/apps/documenteditor/forms/locale/en.json index 78089db32..32300d02c 100644 --- a/apps/documenteditor/forms/locale/en.json +++ b/apps/documenteditor/forms/locale/en.json @@ -75,6 +75,8 @@ "DE.Controllers.ApplicationController.errorUpdateVersion": "The file version has been changed. The page will be reloaded.", "DE.Controllers.ApplicationController.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.
Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.", "DE.Controllers.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", + "DE.Controllers.ApplicationController.errorConnectToServer": "The document could not be saved. Please check connection settings or contact your administrator.
When you click the 'OK' button, you will be prompted to download the document.", + "DE.Controllers.ApplicationController.errorTokenExpire": "The document security token has expired.
Please contact your Document Server administrator.", "DE.Controllers.ApplicationController.notcriticalErrorTitle": "Warning", "DE.Controllers.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.", "DE.Controllers.ApplicationController.textAnonymous": "Anonymous", diff --git a/apps/presentationeditor/embed/js/ApplicationController.js b/apps/presentationeditor/embed/js/ApplicationController.js index 2519cb58b..1066ac1ca 100644 --- a/apps/presentationeditor/embed/js/ApplicationController.js +++ b/apps/presentationeditor/embed/js/ApplicationController.js @@ -566,6 +566,10 @@ PE.ApplicationController = new(function(){ message = me.errorLoadingFont; break; + case Asc.c_oAscError.ID.KeyExpire: + message = me.errorTokenExpire; + break; + default: message = me.errorDefaultMessage.replace('%1', id); break; @@ -730,6 +734,7 @@ PE.ApplicationController = new(function(){ textGuest: 'Guest', textAnonymous: 'Anonymous', errorForceSave: "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.", - errorLoadingFont: 'Fonts are not loaded.
Please contact your Document Server administrator.' + errorLoadingFont: 'Fonts are not loaded.
Please contact your Document Server administrator.', + errorTokenExpire: 'The document security token has expired.
Please contact your Document Server administrator.' } })(); diff --git a/apps/presentationeditor/embed/locale/en.json b/apps/presentationeditor/embed/locale/en.json index 8ee3a58b1..1f1adbde6 100644 --- a/apps/presentationeditor/embed/locale/en.json +++ b/apps/presentationeditor/embed/locale/en.json @@ -17,6 +17,7 @@ "PE.ApplicationController.errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator.", "PE.ApplicationController.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.
Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.", "PE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", + "PE.ApplicationController.errorTokenExpire": "The document security token has expired.
Please contact your Document Server administrator.", "PE.ApplicationController.notcriticalErrorTitle": "Warning", "PE.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.", "PE.ApplicationController.textAnonymous": "Anonymous", diff --git a/apps/spreadsheeteditor/embed/js/ApplicationController.js b/apps/spreadsheeteditor/embed/js/ApplicationController.js index c17650446..5dd383796 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -477,6 +477,10 @@ SSE.ApplicationController = new(function(){ message = me.errorLoadingFont; break; + case Asc.c_oAscError.ID.KeyExpire: + message = me.errorTokenExpire; + break; + default: message = me.errorDefaultMessage.replace('%1', id); break; @@ -679,6 +683,7 @@ SSE.ApplicationController = new(function(){ textGuest: 'Guest', textAnonymous: 'Anonymous', errorForceSave: "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.", - errorLoadingFont: 'Fonts are not loaded.
Please contact your Document Server administrator.' + errorLoadingFont: 'Fonts are not loaded.
Please contact your Document Server administrator.', + errorTokenExpire: 'The document security token has expired.
Please contact your Document Server administrator.' } })(); \ No newline at end of file diff --git a/apps/spreadsheeteditor/embed/locale/en.json b/apps/spreadsheeteditor/embed/locale/en.json index 730f84d67..424dca2fe 100644 --- a/apps/spreadsheeteditor/embed/locale/en.json +++ b/apps/spreadsheeteditor/embed/locale/en.json @@ -17,6 +17,7 @@ "SSE.ApplicationController.errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator.", "SSE.ApplicationController.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.
Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.", "SSE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", + "SSE.ApplicationController.errorTokenExpire": "The document security token has expired.
Please contact your Document Server administrator.", "SSE.ApplicationController.notcriticalErrorTitle": "Warning", "SSE.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.", "SSE.ApplicationController.textAnonymous": "Anonymous",