Commit 94b5e999 authored by Alexander.Trofimov's avatar Alexander.Trofimov

InitOnMessage в baseEditorsApi

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66442 954022d7-b5bf-4e40-9824-e11837661b57
parent e20a642e
...@@ -91,6 +91,16 @@ baseEditorsApi.prototype._baseInit = function() { ...@@ -91,6 +91,16 @@ baseEditorsApi.prototype._baseInit = function() {
var t = this; var t = this;
this.HtmlElement = document.getElementById(this.HtmlElementName); this.HtmlElement = document.getElementById(this.HtmlElementName);
// init OnMessage
InitOnMessage(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);
});
// init drag&drop // init drag&drop
InitDragAndDrop(this.HtmlElement, function(error, files) { InitDragAndDrop(this.HtmlElement, function(error, files) {
t._uploadCallback(error, files); t._uploadCallback(error, files);
...@@ -179,6 +189,8 @@ baseEditorsApi.prototype.asc_getTextArtPreviews = function() { ...@@ -179,6 +189,8 @@ baseEditorsApi.prototype.asc_getTextArtPreviews = function() {
return this.textArtPreviewManager.getWordArtStyles(); return this.textArtPreviewManager.getWordArtStyles();
}; };
// Add image // Add image
baseEditorsApi.prototype._addImageUrl = function() {
};
baseEditorsApi.prototype.asc_addImage = function() { baseEditorsApi.prototype.asc_addImage = function() {
var t = this; var t = this;
ShowImageFileDialog(this.documentId, this.documentUserId, function(error, files) { ShowImageFileDialog(this.documentId, this.documentUserId, function(error, files) {
......
...@@ -97,19 +97,7 @@ var editor; ...@@ -97,19 +97,7 @@ var editor;
}; };
spreadsheet_api.prototype._init = function() { spreadsheet_api.prototype._init = function() {
var t = this;
this.topLineEditorElement = document.getElementById(this.topLineEditorName); this.topLineEditorElement = document.getElementById(this.topLineEditorName);
// init OnMessage
InitOnMessage(function(error, url) {
if (c_oAscError.ID.No !== error) {
t.handlers.trigger("asc_onError", error, c_oAscError.Level.NoCritical);
} else {
t._addImageUrl(url);
}
t.handlers.trigger("asc_onEndAction", c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
});
this.formulasList = getFormulasInfo(); this.formulasList = getFormulasInfo();
}; };
......
...@@ -94,15 +94,6 @@ function asc_docs_api(name) ...@@ -94,15 +94,6 @@ function asc_docs_api(name)
this.LongActionCallbacksParams = []; this.LongActionCallbacksParams = [];
var oThis = this; var oThis = this;
// init OnMessage
InitOnMessage(function (error, url) {
if (c_oAscError.ID.No !== error)
oThis.sync_ErrorCallback(error, c_oAscError.Level.NoCritical);
else
oThis.AddImageUrl(url);
editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
});
if (window.editor == undefined) if (window.editor == undefined)
{ {
......
...@@ -366,15 +366,6 @@ function asc_docs_api(name) ...@@ -366,15 +366,6 @@ function asc_docs_api(name)
this.isStartCoAuthoringOnEndLoad = false; // Подсоединились раньше, чем документ загрузился this.isStartCoAuthoringOnEndLoad = false; // Подсоединились раньше, чем документ загрузился
var oThis = this; var oThis = this;
// init OnMessage
InitOnMessage(function (error, url) {
if (c_oAscError.ID.No !== error)
oThis.sync_ErrorCallback(error, c_oAscError.Level.NoCritical);
else
oThis.AddImageUrl(url);
editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
});
if (window.editor == undefined) if (window.editor == undefined)
{ {
......
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