[SSE] Add Asc.c_oAscError.ID.DataValidate error
This commit is contained in:
parent
bd1d3af79f
commit
61de22e1d7
|
@ -1367,6 +1367,17 @@ define([
|
||||||
config.msg = this.errorFrmlMaxTextLength;
|
config.msg = this.errorFrmlMaxTextLength;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Asc.c_oAscError.ID.DataValidate:
|
||||||
|
var icon = errData ? errData.asc_getErrorStyle() : null;
|
||||||
|
if (icon) {
|
||||||
|
config.iconCls = (icon==Asc.c_oAscEDataValidationErrorStyle.Stop) ? 'error' : ((icon==Asc.c_oAscEDataValidationErrorStyle.Information) ? 'info' : 'warn');
|
||||||
|
}
|
||||||
|
errData && errData.asc_getErrorTitle() && (config.title = errData.asc_getErrorTitle());
|
||||||
|
config.buttons = ['ok', 'cancel'];
|
||||||
|
config.msg = errData && errData.asc_getError() ? errData.asc_getError() : this.errorDataValidate;
|
||||||
|
config.maxwidth = 600;
|
||||||
|
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;
|
||||||
|
@ -1395,9 +1406,9 @@ define([
|
||||||
} else {
|
} else {
|
||||||
Common.Gateway.reportWarning(id, config.msg);
|
Common.Gateway.reportWarning(id, config.msg);
|
||||||
|
|
||||||
config.title = this.notcriticalErrorTitle;
|
config.title = config.title || this.notcriticalErrorTitle;
|
||||||
config.iconCls = 'warn';
|
config.iconCls = config.iconCls || 'warn';
|
||||||
config.buttons = ['ok'];
|
config.buttons = config.buttons || ['ok'];
|
||||||
config.callback = _.bind(function(btn){
|
config.callback = _.bind(function(btn){
|
||||||
if (id == Asc.c_oAscError.ID.Warning && btn == 'ok' && this.appOptions.canDownload) {
|
if (id == Asc.c_oAscError.ID.Warning && btn == 'ok' && this.appOptions.canDownload) {
|
||||||
Common.UI.Menu.Manager.hideAll();
|
Common.UI.Menu.Manager.hideAll();
|
||||||
|
@ -1405,6 +1416,8 @@ define([
|
||||||
} else if (id == Asc.c_oAscError.ID.EditingError) {
|
} else if (id == Asc.c_oAscError.ID.EditingError) {
|
||||||
this.disableEditing(true);
|
this.disableEditing(true);
|
||||||
Common.NotificationCenter.trigger('api:disconnect', true); // enable download and print
|
Common.NotificationCenter.trigger('api:disconnect', true); // enable download and print
|
||||||
|
} else if (id == Asc.c_oAscError.ID.DataValidate && btn !== 'ok') {
|
||||||
|
this.api.asc_closeCellEditor();
|
||||||
}
|
}
|
||||||
this._state.lostEditingRights = false;
|
this._state.lostEditingRights = false;
|
||||||
this.onEditComplete();
|
this.onEditComplete();
|
||||||
|
@ -2376,7 +2389,8 @@ define([
|
||||||
errorNoDataToParse: 'No data was selected to parse.',
|
errorNoDataToParse: 'No data was selected to parse.',
|
||||||
errorCannotUngroup: 'Cannot ungroup. To start an outline, select the detail rows or columns and group them.',
|
errorCannotUngroup: 'Cannot ungroup. To start an outline, select the detail rows or columns and group them.',
|
||||||
errorFrmlMaxTextLength: 'Text values in formulas are limited to 255 characters.<br>Use the CONCATENATE function or concatenation operator (&)',
|
errorFrmlMaxTextLength: 'Text values in formulas are limited to 255 characters.<br>Use the CONCATENATE function or concatenation operator (&)',
|
||||||
waitText: 'Please, wait...'
|
waitText: 'Please, wait...',
|
||||||
|
errorDataValidate: 'The value you entered is not valid.<br>A user has restricted values that can be entered into this cell.'
|
||||||
}
|
}
|
||||||
})(), SSE.Controllers.Main || {}))
|
})(), SSE.Controllers.Main || {}))
|
||||||
});
|
});
|
||||||
|
|
|
@ -471,6 +471,7 @@
|
||||||
"SSE.Controllers.Main.errorWrongBracketsCount": "An error in the entered formula.<br>Wrong number of brackets is used.",
|
"SSE.Controllers.Main.errorWrongBracketsCount": "An error in the entered formula.<br>Wrong number of brackets is used.",
|
||||||
"SSE.Controllers.Main.errorWrongOperator": "An error in the entered formula. Wrong operator is used.<br>Please correct the error.",
|
"SSE.Controllers.Main.errorWrongOperator": "An error in the entered formula. Wrong operator is used.<br>Please correct the error.",
|
||||||
"SSE.Controllers.Main.errorFrmlMaxTextLength": "Text values in formulas are limited to 255 characters.<br>Use the CONCATENATE function or concatenation operator (&).",
|
"SSE.Controllers.Main.errorFrmlMaxTextLength": "Text values in formulas are limited to 255 characters.<br>Use the CONCATENATE function or concatenation operator (&).",
|
||||||
|
"SSE.Controllers.Main.errorDataValidate": "The value you entered is not valid.<br>A user has restricted values that can be entered into this cell.",
|
||||||
"SSE.Controllers.Main.leavePageText": "You have unsaved changes in this spreadsheet. Click 'Stay on this Page' then 'Save' to save them. Click 'Leave this Page' to discard all the unsaved changes.",
|
"SSE.Controllers.Main.leavePageText": "You have unsaved changes in this spreadsheet. Click 'Stay on this Page' then 'Save' to save them. Click 'Leave this Page' to discard all the unsaved changes.",
|
||||||
"SSE.Controllers.Main.loadFontsTextText": "Loading data...",
|
"SSE.Controllers.Main.loadFontsTextText": "Loading data...",
|
||||||
"SSE.Controllers.Main.loadFontsTitleText": "Loading Data",
|
"SSE.Controllers.Main.loadFontsTitleText": "Loading Data",
|
||||||
|
|
Loading…
Reference in a new issue