Commit e344b7c0 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

to Revision: 64905(напутал с кодами ошибок)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64915 954022d7-b5bf-4e40-9824-e11837661b57
parent fe4a3015
...@@ -605,7 +605,7 @@ function InitOnMessage (callback) { ...@@ -605,7 +605,7 @@ function InitOnMessage (callback) {
break; break;
} }
} }
callback(c_oAscServerError.NoError, firstUrl); callback(c_oAscError.ID.No, firstUrl);
} }
} else } else
...@@ -623,9 +623,9 @@ function ShowImageFileDialog (documentId, documentUserId, callback, callbackOld) ...@@ -623,9 +623,9 @@ function ShowImageFileDialog (documentId, documentUserId, callback, callbackOld)
fileName = GetUploadInput(function (e) { fileName = GetUploadInput(function (e) {
if (e && e.target && e.target.files) { if (e && e.target && e.target.files) {
var nError = ValidateUploadImage(e.target.files); var nError = ValidateUploadImage(e.target.files);
callback(nError, e.target.files); callback(g_fMapAscServerErrorToAscError(nError), e.target.files);
} else { } else {
callback(c_oAscServerError.Unknown); callback(c_oAscError.ID.Unknown);
} }
}); });
} else { } else {
...@@ -642,11 +642,11 @@ function ShowImageFileDialog (documentId, documentUserId, callback, callbackOld) ...@@ -642,11 +642,11 @@ function ShowImageFileDialog (documentId, documentUserId, callback, callbackOld)
if (e && e.target && e.target.files) { if (e && e.target && e.target.files) {
var nError = ValidateUploadImage(e.target.files); var nError = ValidateUploadImage(e.target.files);
if (c_oAscServerError.NoError != nError) { if (c_oAscServerError.NoError != nError) {
callbackOld(nError); callbackOld(g_fMapAscServerErrorToAscError(nError));
return; return;
} }
} }
callbackOld(c_oAscServerError.NoError); callbackOld(c_oAscError.ID.No);
fileSubmit.click(); fileSubmit.click();
}; };
} }
...@@ -668,7 +668,7 @@ function InitDragAndDrop (oHtmlElement, callback) { ...@@ -668,7 +668,7 @@ function InitDragAndDrop (oHtmlElement, callback) {
e.preventDefault(); e.preventDefault();
var files = e.dataTransfer.files; var files = e.dataTransfer.files;
var nError = ValidateUploadImage(files); var nError = ValidateUploadImage(files);
callback(nError, files); callback(g_fMapAscServerErrorToAscError(nError), files);
}; };
} }
} }
...@@ -688,7 +688,7 @@ function UploadImageFiles (files, documentId, documentUserId, callback) { ...@@ -688,7 +688,7 @@ function UploadImageFiles (files, documentId, documentUserId, callback) {
break; break;
} }
} }
callback(c_oAscServerError.NoError, firstUrl); callback(c_oAscError.ID.No, firstUrl);
} else } else
callback(c_oAscError.ID.Unknown); callback(c_oAscError.ID.Unknown);
} }
......
...@@ -175,7 +175,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -175,7 +175,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.topLineEditorElement = document.getElementById(this.topLineEditorName); this.topLineEditorElement = document.getElementById(this.topLineEditorName);
// init OnMessage // init OnMessage
InitOnMessage(function(error, url) { InitOnMessage(function(error, url) {
if (c_oAscServerError.NoError !== error) { if (c_oAscError.ID.No !== error) {
t.handlers.trigger("asc_onError", error, c_oAscError.Level.NoCritical); t.handlers.trigger("asc_onError", error, c_oAscError.Level.NoCritical);
} else { } else {
t._addImageUrl(url); t._addImageUrl(url);
...@@ -2620,7 +2620,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -2620,7 +2620,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
ShowImageFileDialog(this.documentId, this.documentUserId, function(error, files) { ShowImageFileDialog(this.documentId, this.documentUserId, function(error, files) {
t._uploadCallback(error, files); t._uploadCallback(error, files);
}, function(error) { }, function(error) {
if (c_oAscServerError.NoError !== error) { if (c_oAscError.ID.No !== error) {
t.handlers.trigger("asc_onError", error, c_oAscError.Level.NoCritical); t.handlers.trigger("asc_onError", error, c_oAscError.Level.NoCritical);
} }
t.handlers.trigger("asc_onStartAction", c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage); t.handlers.trigger("asc_onStartAction", c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
...@@ -2628,12 +2628,12 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -2628,12 +2628,12 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
}; };
spreadsheet_api.prototype._uploadCallback = function(error, files) { spreadsheet_api.prototype._uploadCallback = function(error, files) {
var t = this; var t = this;
if (c_oAscServerError.NoError !== error) { if (c_oAscError.ID.No !== error) {
t.handlers.trigger("asc_onError", error, c_oAscError.Level.NoCritical); t.handlers.trigger("asc_onError", error, c_oAscError.Level.NoCritical);
} else { } else {
t.handlers.trigger("asc_onStartAction", c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage); t.handlers.trigger("asc_onStartAction", c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
UploadImageFiles(files, t.documentId, t.documentUserId, function(error, url) { UploadImageFiles(files, t.documentId, t.documentUserId, function(error, url) {
if (c_oAscServerError.NoError !== error) { if (c_oAscError.ID.No !== error) {
t.handlers.trigger("asc_onError", error, c_oAscError.Level.NoCritical); t.handlers.trigger("asc_onError", error, c_oAscError.Level.NoCritical);
} else { } else {
t._addImageUrl(url); t._addImageUrl(url);
......
...@@ -178,7 +178,7 @@ function asc_docs_api(name) ...@@ -178,7 +178,7 @@ function asc_docs_api(name)
var oThis = this; var oThis = this;
// init OnMessage // init OnMessage
InitOnMessage(function (error, url) { InitOnMessage(function (error, url) {
if (c_oAscServerError.NoError !== error) if (c_oAscError.ID.No !== error)
oThis.sync_ErrorCallback(error, c_oAscError.Level.NoCritical); oThis.sync_ErrorCallback(error, c_oAscError.Level.NoCritical);
else else
oThis.AddImageUrl(url); oThis.AddImageUrl(url);
...@@ -3010,19 +3010,19 @@ asc_docs_api.prototype.AddImage = function(){ ...@@ -3010,19 +3010,19 @@ asc_docs_api.prototype.AddImage = function(){
ShowImageFileDialog(documentId, documentUserId, function (error, files) { ShowImageFileDialog(documentId, documentUserId, function (error, files) {
t._uploadCallback(error, files); t._uploadCallback(error, files);
}, function (error) { }, function (error) {
if (c_oAscServerError.NoError !== error) if (c_oAscError.ID.No !== error)
t.asc_fireCallback("asc_onError", error, c_oAscError.Level.NoCritical); t.asc_fireCallback("asc_onError", error, c_oAscError.Level.NoCritical);
t.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage); t.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
}); });
}; };
asc_docs_api.prototype._uploadCallback = function(error, files) { asc_docs_api.prototype._uploadCallback = function(error, files) {
var t =this; var t =this;
if (c_oAscServerError.NoError !== error) { if (c_oAscError.ID.No !== error) {
t.sync_ErrorCallback(error, c_oAscError.Level.NoCritical); t.sync_ErrorCallback(error, c_oAscError.Level.NoCritical);
} else { } else {
t.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage); t.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
UploadImageFiles(files, documentId, documentUserId, function (error, url) { UploadImageFiles(files, documentId, documentUserId, function (error, url) {
if (c_oAscServerError.NoError !== error) if (c_oAscError.ID.No !== error)
t.sync_ErrorCallback(error, c_oAscError.Level.NoCritical); t.sync_ErrorCallback(error, c_oAscError.Level.NoCritical);
else else
t.AddImageUrl(url); t.AddImageUrl(url);
......
...@@ -528,7 +528,7 @@ function asc_docs_api(name) ...@@ -528,7 +528,7 @@ function asc_docs_api(name)
var oThis = this; var oThis = this;
// init OnMessage // init OnMessage
InitOnMessage(function (error, url) { InitOnMessage(function (error, url) {
if (c_oAscServerError.NoError !== error) if (c_oAscError.ID.No !== error)
oThis.sync_ErrorCallback(error, c_oAscError.Level.NoCritical); oThis.sync_ErrorCallback(error, c_oAscError.Level.NoCritical);
else else
oThis.AddImageUrl(url); oThis.AddImageUrl(url);
...@@ -4710,19 +4710,19 @@ asc_docs_api.prototype.AddImage = function(){ ...@@ -4710,19 +4710,19 @@ asc_docs_api.prototype.AddImage = function(){
ShowImageFileDialog(documentId, documentUserId, function(error, files){ ShowImageFileDialog(documentId, documentUserId, function(error, files){
t._uploadCallback(error, files); t._uploadCallback(error, files);
}, function (error) { }, function (error) {
if (c_oAscServerError.NoError !== error) if (c_oAscError.ID.No !== error)
t.asc_fireCallback("asc_onError", error, c_oAscError.Level.NoCritical); t.asc_fireCallback("asc_onError", error, c_oAscError.Level.NoCritical);
t.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage); t.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
}); });
}; };
asc_docs_api.prototype._uploadCallback = function(error, files){ asc_docs_api.prototype._uploadCallback = function(error, files){
var t = this; var t = this;
if (c_oAscServerError.NoError !== error) { if (c_oAscError.ID.No !== error) {
t.sync_ErrorCallback(error, c_oAscError.Level.NoCritical); t.sync_ErrorCallback(error, c_oAscError.Level.NoCritical);
} else { } else {
t.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage); t.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
UploadImageFiles(files, documentId, documentUserId, function (error, url) { UploadImageFiles(files, documentId, documentUserId, function (error, url) {
if (c_oAscServerError.NoError !== error) if (c_oAscError.ID.No !== error)
t.sync_ErrorCallback(error, c_oAscError.Level.NoCritical); t.sync_ErrorCallback(error, c_oAscError.Level.NoCritical);
else else
t.AddImageUrl(url); t.AddImageUrl(url);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment