Commit 275ce718 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

HtmlElement в baseEditorsApi

InitDragAndDrop в baseEditorsApi

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66436 954022d7-b5bf-4e40-9824-e11837661b57
parent 2e0039b3
......@@ -7,6 +7,7 @@ function baseEditorsApi(name) {
g_fontApplication.Init();
this.HtmlElementName = name;
this.HtmlElement = null;
this.isMobileVersion = false;
......@@ -82,7 +83,19 @@ function baseEditorsApi(name) {
this.isUseEmbeddedCutFonts = ("true" == ASC_DOCS_API_USE_EMBEDDED_FONTS.toLowerCase());
this.fCurCallback = null;
this._baseInit();
return this;
}
baseEditorsApi.prototype._baseInit = function() {
var t = this;
this.HtmlElement = document.getElementById(this.HtmlElementName);
// init drag&drop
InitDragAndDrop(this.HtmlElement, function(error, files) {
t._uploadCallback(error, files);
});
};
baseEditorsApi.prototype.asc_GetFontThumbnailsPath = function() {
return '../Common/Images/';
};
......
......@@ -98,7 +98,6 @@ var editor;
spreadsheet_api.prototype._init = function() {
var t = this;
this.HtmlElement = document.getElementById(this.HtmlElementName);
this.topLineEditorElement = document.getElementById(this.topLineEditorName);
// init OnMessage
InitOnMessage(function(error, url) {
......@@ -110,10 +109,6 @@ var editor;
t.handlers.trigger("asc_onEndAction", c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
});
// init drag&drop
InitDragAndDrop(this.HtmlElement, function(error, files) {
t._uploadCallback(error, files);
});
this.formulasList = getFormulasInfo();
};
......
......@@ -103,10 +103,6 @@ function asc_docs_api(name)
editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
});
// init drag&drop
InitDragAndDrop(document.getElementById(this.HtmlElementName), function (error, files) {
oThis._uploadCallback(error, files);
});
if (window.editor == undefined)
{
......@@ -789,13 +785,12 @@ asc_docs_api.prototype.CreateComponents = function()
</div>";
}
var element = document.getElementById(this.HtmlElementName);
if (element != null)
if (this.HtmlElement != null)
{
if (GlobalSkin.Name == "flat")
element.style.backgroundColor = GlobalSkin.BackgroundColorThumbnails;
this.HtmlElement.style.backgroundColor = GlobalSkin.BackgroundColorThumbnails;
element.innerHTML = _innerHTML;
this.HtmlElement.innerHTML = _innerHTML;
}
};
......
......@@ -375,10 +375,6 @@ function asc_docs_api(name)
editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
});
// init drag&drop
InitDragAndDrop(document.getElementById(this.HtmlElementName), function (error, files) {
oThis._uploadCallback(error, files);
});
if (window.editor == undefined)
{
......@@ -683,9 +679,8 @@ asc_docs_api.prototype.CreateComponents = function()
{
this.CreateCSS();
var element = document.getElementById(this.HtmlElementName);
if (element != null)
element.innerHTML = "<div id=\"id_main\" class=\"block_elem\" style=\"-moz-user-select:none;-khtml-user-select:none;user-select:none;background-color:" + GlobalSkin.BackgroundColor + ";overflow:hidden;\" UNSELECTABLE=\"on\">\
if (this.HtmlElement != null)
this.HtmlElement.innerHTML = "<div id=\"id_main\" class=\"block_elem\" style=\"-moz-user-select:none;-khtml-user-select:none;user-select:none;background-color:" + GlobalSkin.BackgroundColor + ";overflow:hidden;\" UNSELECTABLE=\"on\">\
<div id=\"id_panel_left\" class=\"block_elem\">\
<canvas id=\"id_buttonTabs\" class=\"block_elem\"></canvas>\
<canvas id=\"id_vert_ruler\" class=\"block_elem\"></canvas>\
......
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