Commit 6e9ee649 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Добавил проверку при отправке стилей на нативный редактор и подписку эвентов

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58012 954022d7-b5bf-4e40-9824-e11837661b57
parent d2ed6d6d
......@@ -1804,7 +1804,12 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
};
spreadsheet_api.prototype._sendWorkbookStyles = function () {
if(this.wbModel) {
if (this.wbModel) {
// Для нативной версии не генерируем стили
if (window["NATIVE_EDITOR_ENJINE"] && (!this.handlers.hasTrigger("asc_onInitTablePictures") ||
!this.handlers.hasTrigger("asc_onInitEditorStyles")))
return;
// Отправка стилей форматированных таблиц
var tablePictures = this.wb.getTablePictures();
var bResult = this.handlers.trigger("asc_onInitTablePictures", tablePictures);
......
......@@ -5,12 +5,12 @@
* Author: Alexey.Golubev@avsmedia.net
* Date: June 22, 2012
*/
( /**
* @param {jQuery} $
(
/**
* @param {Window} window
* @param {undefined} undefined
*/
function ($, window, undefined) {
function (window, undefined) {
/*
* Import
......@@ -26,6 +26,10 @@
return this;
}
asc_CHandlersList.prototype.hasTrigger = function (eventName) {
return null != this.handlers[eventName];
};
asc_CHandlersList.prototype.trigger = function (eventName) {
var h = this.handlers[eventName], t = asc_typeOf(h), a = Array.prototype.slice.call(arguments, 1), i;
if (t === "function") {
......@@ -76,4 +80,4 @@
*/
asc.asc_CHandlersList = asc_CHandlersList;
}
)(jQuery, window);
\ No newline at end of file
)(window);
\ No newline at end of file
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