Commit 8e4e1386 authored by Alexander.Trofimov's avatar Alexander.Trofimov

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

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58012 954022d7-b5bf-4e40-9824-e11837661b57
parent e05d1e3e
...@@ -1804,7 +1804,12 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -1804,7 +1804,12 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
}; };
spreadsheet_api.prototype._sendWorkbookStyles = function () { 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 tablePictures = this.wb.getTablePictures();
var bResult = this.handlers.trigger("asc_onInitTablePictures", tablePictures); var bResult = this.handlers.trigger("asc_onInitTablePictures", tablePictures);
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
* Author: Alexey.Golubev@avsmedia.net * Author: Alexey.Golubev@avsmedia.net
* Date: June 22, 2012 * Date: June 22, 2012
*/ */
( /** (
* @param {jQuery} $ /**
* @param {Window} window * @param {Window} window
* @param {undefined} undefined * @param {undefined} undefined
*/ */
function ($, window, undefined) { function (window, undefined) {
/* /*
* Import * Import
...@@ -26,6 +26,10 @@ ...@@ -26,6 +26,10 @@
return this; return this;
} }
asc_CHandlersList.prototype.hasTrigger = function (eventName) {
return null != this.handlers[eventName];
};
asc_CHandlersList.prototype.trigger = function (eventName) { asc_CHandlersList.prototype.trigger = function (eventName) {
var h = this.handlers[eventName], t = asc_typeOf(h), a = Array.prototype.slice.call(arguments, 1), i; var h = this.handlers[eventName], t = asc_typeOf(h), a = Array.prototype.slice.call(arguments, 1), i;
if (t === "function") { if (t === "function") {
...@@ -76,4 +80,4 @@ ...@@ -76,4 +80,4 @@
*/ */
asc.asc_CHandlersList = asc_CHandlersList; asc.asc_CHandlersList = asc_CHandlersList;
} }
)(jQuery, window); )(window);
\ No newline at end of file \ 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