Commit cb84e920 authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

Получение всех комментариев через asc_getWorkbookComments

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53178 954022d7-b5bf-4e40-9824-e11837661b57
parent 00bbfa3f
......@@ -2176,8 +2176,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.IsFocus = isEnabled;
},
asc_searchEnabled: function(bIsEnabled)
{
asc_searchEnabled: function(bIsEnabled) {
},
asc_findText: function (text, scanByRows, scanForward, isMatchCase, isWholeCell) {
......@@ -2458,9 +2457,14 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
asc_getWorkbookComments: function() {
var _this = this, comments = [];
if ( _this.wb ) {
for (var i = 0; i < _this.wb.model.aWorksheets.length; i++) {
for (var j = 0; j < _this.wb.model.aWorksheets[i].aComments.length; j++) {
comments.push( { "Id": _this.wb.model.aWorksheets[i].aComments[j].asc_getId(), "Comment": _this.wb.model.aWorksheets[i].aComments[j] } );
for (var key in _this.wb.model.aWorksheets) {
var wsModel = _this.wb.model.aWorksheets[key];
var ws = _this.wb.getWorksheet(wsModel.index);
if ( ws ) {
for (var i = 0; i < ws.cellCommentator.aComments.length; i++) {
var comment = ws.cellCommentator.aComments[i];
comments.push( { "Id": comment.asc_getId(), "Comment": comment } );
}
}
}
}
......@@ -2469,6 +2473,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
// Shapes
setStartPointHistory: function(){History.Create_NewPoint(); History.StartTransaction()},
setEndPointHistory: function(){History.EndTransaction()},
asc_startAddShape: function(sPreset) {
......
......@@ -987,6 +987,7 @@
// initializing is completed
this._trigger("initialized");
},
_initConditionalFormatting: function () {
var oGradient = null;
var aCFs = this.model.aConditionalFormatting;
......@@ -1052,19 +1053,15 @@
}
}
},
_prepareComments: function () {
var commentList = []; // для отправки за один раз
for(var i = 0, length = this.model.aComments.length; i < length; ++i)
{
// Теперь получение всех комментариев через asc_getWorkbookComments
for (var i = 0, length = this.model.aComments.length; i < length; ++i) {
var comment = { "Id": this.model.aComments[i].asc_getId(), "Comment": this.model.aComments[i] };
this.cellCommentator.addCommentSerialize(comment["Comment"]);
commentList.push(comment);
// Если, например, перемещаем лист
this.model.workbook.handlers.trigger("asc_onRemoveComment", comment["Id"]);
}
if ( commentList.length )
this.model.workbook.handlers.trigger("asc_onAddComments", commentList);
},
_prepareDrawingObjects: function () {
if ( !this.settings.objectRender ) {
this.objectRender = new DrawingObjects();
......@@ -1073,6 +1070,7 @@
else
this.objectRender = this.settings.objectRender;
},
_initWorksheetDefaultWidth: function () {
this.nBaseColWidth = this.model.nBaseColWidth || this.nBaseColWidth;
// Теперь рассчитываем число px
......@@ -1097,6 +1095,7 @@
var tm = this._roundTextMetrics(sr.measureString("A"));
this.headersHeightByFont = tm.height;
},
_initConstValues: function () {
var ppiX = this._getPPIX();
var ppiY = this._getPPIY();
......@@ -1111,6 +1110,7 @@
this.height_3px = asc_calcnpt(0, ppiY, 3/*px*/);
this.height_4px = asc_calcnpt(0, ppiY, 4/*px*/);
},
_initCellsArea: function (fullRecalc) {
// calculate rows heights and visible rows
this._calcHeaderRowHeight();
......@@ -1126,6 +1126,7 @@
this._calcVisibleColumns();
this._updateVisibleColsCount(/*skipScrolReinit*/true);
},
_initPane: function () {
var pane = this.model.sheetViews[0].pane;
if (null !== pane) {
......
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