mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-02-10 18:15:19 +08:00
[all] Add c_oAscError.ID.ForcedViewMode error; For bug 76155
This commit is contained in:
@ -1927,7 +1927,8 @@
|
||||
};
|
||||
this.CoAuthoringApi.onWarning = function(code)
|
||||
{
|
||||
t.sendEvent('asc_onError', code || c_oAscError.ID.Warning, c_oAscError.Level.NoCritical);
|
||||
const error = undefined !== code ? AscCommon.mapAscServerErrorToAscError(code) : c_oAscError.ID.Warning;
|
||||
t.sendEvent('asc_onError', error, c_oAscError.Level.NoCritical);
|
||||
};
|
||||
this.CoAuthoringApi.onMeta = function(data)
|
||||
{
|
||||
|
||||
@ -1102,7 +1102,7 @@
|
||||
} else if (code === c_oAscServerCommandErrors.NotModified) {
|
||||
this.onForceSave({type: c_oAscForceSaveTypes.Button, refuse: true});
|
||||
} else {
|
||||
this.onWarning(Asc.c_oAscError.ID.Unknown);
|
||||
this.onWarning(AscCommon.c_oAscServerError.Unknown);
|
||||
}
|
||||
};
|
||||
DocsCoApi.prototype._onForceSave = function(data) {
|
||||
@ -1512,7 +1512,7 @@
|
||||
};
|
||||
|
||||
DocsCoApi.prototype._onWarning = function(data) {
|
||||
this.onWarning(Asc.c_oAscError.ID.Warning);
|
||||
this.onWarning(data.code);
|
||||
};
|
||||
|
||||
DocsCoApi.prototype._onLicense = function(data) {
|
||||
|
||||
@ -1119,6 +1119,9 @@
|
||||
case c_oAscServerError.ChangeDocInfo :
|
||||
nRes = Asc.c_oAscError.ID.AccessDeny;
|
||||
break;
|
||||
case c_oAscServerError.ForcedViewMode :
|
||||
nRes = Asc.c_oAscError.ID.ForcedViewMode;
|
||||
break;
|
||||
case c_oAscServerError.Storage :
|
||||
case c_oAscServerError.StorageFileNoFound :
|
||||
case c_oAscServerError.StorageRead :
|
||||
@ -1716,7 +1719,9 @@
|
||||
VKeyKeyExpire: -122,
|
||||
VKeyUserCountExceed: -123,
|
||||
|
||||
Password: -180
|
||||
Password: -180,
|
||||
|
||||
ForcedViewMode: -200
|
||||
};
|
||||
|
||||
//todo get from server config
|
||||
@ -15444,6 +15449,7 @@
|
||||
window["AscCommon"].openFileCommand = openFileCommand;
|
||||
window["AscCommon"].sendCommand = sendCommand;
|
||||
window["AscCommon"].sendSaveFile = sendSaveFile;
|
||||
window["AscCommon"].c_oAscServerError = c_oAscServerError;
|
||||
window["AscCommon"].mapAscServerErrorToAscError = mapAscServerErrorToAscError;
|
||||
window["AscCommon"].joinUrls = joinUrls;
|
||||
window["AscCommon"].getFullImageSrc2 = getFullImageSrc2;
|
||||
|
||||
@ -136,6 +136,7 @@
|
||||
UserDrop : -100,
|
||||
Warning : -101,
|
||||
UpdateVersion : -102,
|
||||
ForcedViewMode : -103,
|
||||
|
||||
PrintMaxPagesCount : -110,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user