Commit 2e0039b3 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

_uploadCallback в baseEditorsApi

_addImageUrl временная функция для стыковки

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66433 954022d7-b5bf-4e40-9824-e11837661b57
parent be36a231
......@@ -177,6 +177,22 @@ baseEditorsApi.prototype.asc_addImage = function() {
t.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
});
};
baseEditorsApi.prototype._uploadCallback = function(error, files) {
var t = this;
if (c_oAscError.ID.No !== error) {
this.sendEvent("asc_onError", error, c_oAscError.Level.NoCritical);
} else {
this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
UploadImageFiles(files, this.documentId, this.documentUserId, function(error, url) {
if (c_oAscError.ID.No !== error) {
t.sendEvent("asc_onError", error, c_oAscError.Level.NoCritical);
} else {
t._addImageUrl(url);
}
t.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
});
}
};
// Version History
baseEditorsApi.prototype.asc_showRevision = function(newObj) {
};
......
......@@ -2336,22 +2336,6 @@ var editor;
// ToDo заменить на общую функцию для всех
this.asc_addImage();
};
spreadsheet_api.prototype._uploadCallback = function(error, files) {
var t = this;
if (c_oAscError.ID.No !== error) {
this.handlers.trigger("asc_onError", error, c_oAscError.Level.NoCritical);
} else {
this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
UploadImageFiles(files, this.documentId, this.documentUserId, function(error, url) {
if (c_oAscError.ID.No !== error) {
t.handlers.trigger("asc_onError", error, c_oAscError.Level.NoCritical);
} else {
t._addImageUrl(url);
}
t.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
});
}
};
spreadsheet_api.prototype._addImageUrl = function(url) {
var ws = this.wb.getWorksheet();
if (ws) {
......
......@@ -2868,21 +2868,6 @@ asc_docs_api.prototype.ChangeArtImageFromFile = function()
asc_docs_api.prototype.AddImage = function(){
this.asc_addImage();
};
asc_docs_api.prototype._uploadCallback = function(error, files) {
var t =this;
if (c_oAscError.ID.No !== error) {
t.sync_ErrorCallback(error, c_oAscError.Level.NoCritical);
} else {
t.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
UploadImageFiles(files, this.documentId, this.documentUserId, function (error, url) {
if (c_oAscError.ID.No !== error)
t.sync_ErrorCallback(error, c_oAscError.Level.NoCritical);
else
t.AddImageUrl(url);
t.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
});
}
};
asc_docs_api.prototype.StartAddShape = function(prst, is_apply)
{
this.WordControl.m_oLogicDocument.StartAddShape(prst, is_apply);
......@@ -2911,6 +2896,10 @@ asc_docs_api.prototype.canUnGroup = function()
return this.WordControl.m_oLogicDocument.canUnGroup();
};
asc_docs_api.prototype._addImageUrl = function(url) {
// ToDo пока временная функция для стыковки.
this.AddImageUrl(url);
};
asc_docs_api.prototype.AddImageUrl = function(url){
if(g_oDocumentUrls.getLocal(url))
{
......
......@@ -4351,26 +4351,15 @@ asc_docs_api.prototype.ChangeShapeImageFromFile = function()
asc_docs_api.prototype.AddImage = function(){
this.asc_addImage();
};
asc_docs_api.prototype._uploadCallback = function(error, files){
var t = this;
if (c_oAscError.ID.No !== error) {
t.sync_ErrorCallback(error, c_oAscError.Level.NoCritical);
} else {
t.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
UploadImageFiles(files, this.documentId, this.documentUserId, function (error, url) {
if (c_oAscError.ID.No !== error)
t.sync_ErrorCallback(error, c_oAscError.Level.NoCritical);
else
t.AddImageUrl(url);
t.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
});
}
};
asc_docs_api.prototype.AddImageUrl2 = function(url)
{
this.AddImageUrl(getFullImageSrc2(url));
};
asc_docs_api.prototype._addImageUrl = function(url) {
// ToDo пока временная функция для стыковки.
this.AddImageUrl(url);
};
asc_docs_api.prototype.AddImageUrl = function(url, imgProp)
{
if ( false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Content) )
......
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