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

asc_onStartAction, asc_onEndAction при вставке по url

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49076 954022d7-b5bf-4e40-9824-e11837661b57
parent ef3a482d
......@@ -2091,12 +2091,14 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
asc_addImageDrawingObject: function(imageUrl) {
var rData = {"id":this.documentId, "c":"imgurl", "data": imageUrl};
var oThis = this;
this.handlers.trigger("asc_onStartAction", c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadImage);
this._asc_sendCommand( function(incomeObject){
if(null != incomeObject && "imgurl" == incomeObject.type)
{
var ws = oThis.wb.getWorksheet();
return ws.objectRender.addImageDrawingObject(incomeObject.data, null);
}
oThis.handlers.trigger("asc_onEndAction", c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadImage);
}, JSON.stringify(rData) );
},
......
......@@ -2522,9 +2522,11 @@ asc_docs_api.prototype.AddImageUrl = function(url){
{
var rData = {"id":documentId, "c":"imgurl", "data": url};
var oThis = this;
this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
sendCommand(this, function(incomeObject){
if(null != incomeObject && "imgurl" == incomeObject.type)
oThis.AddImageUrlAction(incomeObject.data);
oThis.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
}, JSON.stringify(rData) );
}
};
......
......@@ -4640,9 +4640,11 @@ asc_docs_api.prototype.AddImageUrl = function(url, imgProp)
{
var rData = {"id":documentId, "c":"imgurl", "data": url};
var oThis = this;
this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
sendCommand( oThis, function(incomeObject){
if(null != incomeObject && "imgurl" ==incomeObject.type)
oThis.AddImageUrlAction(incomeObject.data, imgProp);
oThis.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
}, JSON.stringify(rData) );
}
}
......
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