Show critical error with custom message.
This commit is contained in:
parent
c74517cfae
commit
d04a61933e
|
@ -1376,11 +1376,10 @@ define([
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
config.msg = this.errorDefaultMessage.replace('%1', id);
|
config.msg = (typeof id == 'string') ? id : this.errorDefaultMessage.replace('%1', id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (level == Asc.c_oAscError.Level.Critical) {
|
if (level == Asc.c_oAscError.Level.Critical) {
|
||||||
|
|
||||||
// report only critical errors
|
// report only critical errors
|
||||||
|
@ -1389,7 +1388,7 @@ define([
|
||||||
config.title = this.criticalErrorTitle;
|
config.title = this.criticalErrorTitle;
|
||||||
config.iconCls = 'error';
|
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.msg += '<br/><br/>' + this.criticalErrorExtText;
|
||||||
config.callback = function(btn) {
|
config.callback = function(btn) {
|
||||||
if (btn == 'ok')
|
if (btn == 'ok')
|
||||||
|
|
|
@ -1116,7 +1116,7 @@ define([
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
config.msg = this.errorDefaultMessage.replace('%1', id);
|
config.msg = (typeof id == 'string') ? id : this.errorDefaultMessage.replace('%1', id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1129,7 +1129,7 @@ define([
|
||||||
config.title = this.criticalErrorTitle;
|
config.title = this.criticalErrorTitle;
|
||||||
config.iconCls = 'error';
|
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.msg += '<br/><br/>' + this.criticalErrorExtText;
|
||||||
config.fn = function(btn) {
|
config.fn = function(btn) {
|
||||||
if (btn == 'ok') {
|
if (btn == 'ok') {
|
||||||
|
|
|
@ -1285,7 +1285,7 @@ define([
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
config.msg = this.errorDefaultMessage.replace('%1', id);
|
config.msg = (typeof id == 'string') ? id : this.errorDefaultMessage.replace('%1', id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1296,7 +1296,7 @@ define([
|
||||||
config.title = this.criticalErrorTitle;
|
config.title = this.criticalErrorTitle;
|
||||||
config.iconCls = 'error';
|
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.msg += '<br/><br/>' + this.criticalErrorExtText;
|
||||||
config.callback = function(btn) {
|
config.callback = function(btn) {
|
||||||
if (btn == 'ok') {
|
if (btn == 'ok') {
|
||||||
|
|
Loading…
Reference in a new issue