Handle errors
This commit is contained in:
parent
adefe3f056
commit
6875b60d5e
|
@ -731,6 +731,10 @@ DE.ApplicationController = new(function(){
|
||||||
message = me.errorLoadingFont;
|
message = me.errorLoadingFont;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Asc.c_oAscError.ID.KeyExpire:
|
||||||
|
message = me.errorTokenExpire;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
message = me.errorDefaultMessage.replace('%1', id);
|
message = me.errorDefaultMessage.replace('%1', id);
|
||||||
break;
|
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.",
|
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)',
|
txtEmpty: '(Empty)',
|
||||||
txtPressLink: 'Press Ctrl and click link',
|
txtPressLink: 'Press Ctrl and click link',
|
||||||
errorLoadingFont: 'Fonts are not loaded.<br>Please contact your Document Server administrator.'
|
errorLoadingFont: 'Fonts are not loaded.<br>Please contact your Document Server administrator.',
|
||||||
|
errorTokenExpire: 'The document security token has expired.<br>Please contact your Document Server administrator.'
|
||||||
}
|
}
|
||||||
})();
|
})();
|
|
@ -19,6 +19,7 @@
|
||||||
"DE.ApplicationController.errorSubmit": "Submit failed.",
|
"DE.ApplicationController.errorSubmit": "Submit failed.",
|
||||||
"DE.ApplicationController.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.<br>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.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.<br>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.errorUserDrop": "The file cannot be accessed right now.",
|
||||||
|
"DE.ApplicationController.errorTokenExpire": "The document security token has expired.<br>Please contact your Document Server administrator.",
|
||||||
"DE.ApplicationController.notcriticalErrorTitle": "Warning",
|
"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.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.",
|
||||||
"DE.ApplicationController.textAnonymous": "Anonymous",
|
"DE.ApplicationController.textAnonymous": "Anonymous",
|
||||||
|
|
|
@ -224,6 +224,15 @@ define([
|
||||||
config.msg = this.errorLoadingFont;
|
config.msg = this.errorLoadingFont;
|
||||||
break;
|
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:
|
default:
|
||||||
config.msg = (typeof id == 'string') ? id : this.errorDefaultMessage.replace('%1', id);
|
config.msg = (typeof id == 'string') ? id : this.errorDefaultMessage.replace('%1', id);
|
||||||
break;
|
break;
|
||||||
|
@ -253,7 +262,14 @@ define([
|
||||||
config.iconCls = 'warn';
|
config.iconCls = 'warn';
|
||||||
config.buttons = ['ok'];
|
config.buttons = ['ok'];
|
||||||
config.callback = _.bind(function(btn){
|
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
|
Common.NotificationCenter.trigger('api:disconnect', true); // enable download and print
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
|
@ -1347,7 +1363,9 @@ define([
|
||||||
textBuyNow: 'Visit website',
|
textBuyNow: 'Visit website',
|
||||||
textNoLicenseTitle: 'License limit reached',
|
textNoLicenseTitle: 'License limit reached',
|
||||||
textContactUs: 'Contact sales',
|
textContactUs: 'Contact sales',
|
||||||
errorLoadingFont: 'Fonts are not loaded.<br>Please contact your Document Server administrator.'
|
errorLoadingFont: 'Fonts are not loaded.<br>Please contact your Document Server administrator.',
|
||||||
|
errorConnectToServer: 'The document could not be saved. Please check connection settings or contact your administrator.<br>When you click the \'OK\' button, you will be prompted to download the document.',
|
||||||
|
errorTokenExpire: 'The document security token has expired.<br>Please contact your Document Server administrator.'
|
||||||
|
|
||||||
}, DE.Controllers.ApplicationController));
|
}, DE.Controllers.ApplicationController));
|
||||||
});
|
});
|
||||||
|
|
|
@ -75,6 +75,8 @@
|
||||||
"DE.Controllers.ApplicationController.errorUpdateVersion": "The file version has been changed. The page will be reloaded.",
|
"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.<br>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.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.<br>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.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.<br>When you click the 'OK' button, you will be prompted to download the document.",
|
||||||
|
"DE.Controllers.ApplicationController.errorTokenExpire": "The document security token has expired.<br>Please contact your Document Server administrator.",
|
||||||
"DE.Controllers.ApplicationController.notcriticalErrorTitle": "Warning",
|
"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.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.",
|
||||||
"DE.Controllers.ApplicationController.textAnonymous": "Anonymous",
|
"DE.Controllers.ApplicationController.textAnonymous": "Anonymous",
|
||||||
|
|
|
@ -566,6 +566,10 @@ PE.ApplicationController = new(function(){
|
||||||
message = me.errorLoadingFont;
|
message = me.errorLoadingFont;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Asc.c_oAscError.ID.KeyExpire:
|
||||||
|
message = me.errorTokenExpire;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
message = me.errorDefaultMessage.replace('%1', id);
|
message = me.errorDefaultMessage.replace('%1', id);
|
||||||
break;
|
break;
|
||||||
|
@ -730,6 +734,7 @@ PE.ApplicationController = new(function(){
|
||||||
textGuest: 'Guest',
|
textGuest: 'Guest',
|
||||||
textAnonymous: 'Anonymous',
|
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.",
|
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.<br>Please contact your Document Server administrator.'
|
errorLoadingFont: 'Fonts are not loaded.<br>Please contact your Document Server administrator.',
|
||||||
|
errorTokenExpire: 'The document security token has expired.<br>Please contact your Document Server administrator.'
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
"PE.ApplicationController.errorLoadingFont": "Fonts are not loaded.<br>Please contact your Document Server administrator.",
|
"PE.ApplicationController.errorLoadingFont": "Fonts are not loaded.<br>Please contact your Document Server administrator.",
|
||||||
"PE.ApplicationController.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.<br>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.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.<br>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.errorUserDrop": "The file cannot be accessed right now.",
|
||||||
|
"PE.ApplicationController.errorTokenExpire": "The document security token has expired.<br>Please contact your Document Server administrator.",
|
||||||
"PE.ApplicationController.notcriticalErrorTitle": "Warning",
|
"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.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.",
|
||||||
"PE.ApplicationController.textAnonymous": "Anonymous",
|
"PE.ApplicationController.textAnonymous": "Anonymous",
|
||||||
|
|
|
@ -477,6 +477,10 @@ SSE.ApplicationController = new(function(){
|
||||||
message = me.errorLoadingFont;
|
message = me.errorLoadingFont;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Asc.c_oAscError.ID.KeyExpire:
|
||||||
|
message = me.errorTokenExpire;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
message = me.errorDefaultMessage.replace('%1', id);
|
message = me.errorDefaultMessage.replace('%1', id);
|
||||||
break;
|
break;
|
||||||
|
@ -679,6 +683,7 @@ SSE.ApplicationController = new(function(){
|
||||||
textGuest: 'Guest',
|
textGuest: 'Guest',
|
||||||
textAnonymous: 'Anonymous',
|
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.",
|
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.<br>Please contact your Document Server administrator.'
|
errorLoadingFont: 'Fonts are not loaded.<br>Please contact your Document Server administrator.',
|
||||||
|
errorTokenExpire: 'The document security token has expired.<br>Please contact your Document Server administrator.'
|
||||||
}
|
}
|
||||||
})();
|
})();
|
|
@ -17,6 +17,7 @@
|
||||||
"SSE.ApplicationController.errorLoadingFont": "Fonts are not loaded.<br>Please contact your Document Server administrator.",
|
"SSE.ApplicationController.errorLoadingFont": "Fonts are not loaded.<br>Please contact your Document Server administrator.",
|
||||||
"SSE.ApplicationController.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.<br>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.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.<br>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.errorUserDrop": "The file cannot be accessed right now.",
|
||||||
|
"SSE.ApplicationController.errorTokenExpire": "The document security token has expired.<br>Please contact your Document Server administrator.",
|
||||||
"SSE.ApplicationController.notcriticalErrorTitle": "Warning",
|
"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.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.",
|
||||||
"SSE.ApplicationController.textAnonymous": "Anonymous",
|
"SSE.ApplicationController.textAnonymous": "Anonymous",
|
||||||
|
|
Loading…
Reference in a new issue