Show critical error with custom message.

This commit is contained in:
Julia Radzhabova 2018-03-01 17:37:15 +03:00
parent c74517cfae
commit d04a61933e
3 changed files with 6 additions and 7 deletions

View file

@ -1376,11 +1376,10 @@ define([
break;
default:
config.msg = this.errorDefaultMessage.replace('%1', id);
config.msg = (typeof id == 'string') ? id : this.errorDefaultMessage.replace('%1', id);
break;
}
if (level == Asc.c_oAscError.Level.Critical) {
// report only critical errors
@ -1389,7 +1388,7 @@ define([
config.title = this.criticalErrorTitle;
config.iconCls = 'error';
if (this.appOptions.canBackToFolder && !this.appOptions.isDesktopApp) {
if (this.appOptions.canBackToFolder && !this.appOptions.isDesktopApp && typeof id !== 'string') {
config.msg += '<br/><br/>' + this.criticalErrorExtText;
config.callback = function(btn) {
if (btn == 'ok')

View file

@ -1116,7 +1116,7 @@ define([
break;
default:
config.msg = this.errorDefaultMessage.replace('%1', id);
config.msg = (typeof id == 'string') ? id : this.errorDefaultMessage.replace('%1', id);
break;
}
@ -1129,7 +1129,7 @@ define([
config.title = this.criticalErrorTitle;
config.iconCls = 'error';
if (this.appOptions.canBackToFolder && !this.appOptions.isDesktopApp) {
if (this.appOptions.canBackToFolder && !this.appOptions.isDesktopApp && typeof id !== 'string') {
config.msg += '<br/><br/>' + this.criticalErrorExtText;
config.fn = function(btn) {
if (btn == 'ok') {

View file

@ -1285,7 +1285,7 @@ define([
break;
default:
config.msg = this.errorDefaultMessage.replace('%1', id);
config.msg = (typeof id == 'string') ? id : this.errorDefaultMessage.replace('%1', id);
break;
}
@ -1296,7 +1296,7 @@ define([
config.title = this.criticalErrorTitle;
config.iconCls = 'error';
if (this.appOptions.canBackToFolder && !this.appOptions.isDesktopApp) {
if (this.appOptions.canBackToFolder && !this.appOptions.isDesktopApp && typeof id !== 'string') {
config.msg += '<br/><br/>' + this.criticalErrorExtText;
config.callback = function(btn) {
if (btn == 'ok') {