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

- Вернул asc_onAddComments

- asc_getWorkbookComments только для представлений листов

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53331 954022d7-b5bf-4e40-9824-e11837661b57
parent e338baf0
...@@ -2458,9 +2458,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -2458,9 +2458,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
asc_getWorkbookComments: function() { asc_getWorkbookComments: function() {
var _this = this, comments = []; var _this = this, comments = [];
if ( _this.wb ) { if ( _this.wb ) {
for (var key in _this.wb.model.aWorksheets) { for (var key in _this.wb.wsViews) {
var wsModel = _this.wb.model.aWorksheets[key]; var ws = _this.wb.wsViews[key];
var ws = _this.wb.getWorksheet(wsModel.index);
if ( ws ) { if ( ws ) {
for (var i = 0; i < ws.cellCommentator.aComments.length; i++) { for (var i = 0; i < ws.cellCommentator.aComments.length; i++) {
var comment = ws.cellCommentator.aComments[i]; var comment = ws.cellCommentator.aComments[i];
......
...@@ -1074,10 +1074,14 @@ ...@@ -1074,10 +1074,14 @@
_prepareComments: function () { _prepareComments: function () {
// Теперь получение всех комментариев через asc_getWorkbookComments // Теперь получение всех комментариев через asc_getWorkbookComments
for (var i = 0, length = this.model.aComments.length; i < length; ++i) { var commentList = [];
for (var i = 0; i < this.model.aComments.length; i++) {
var comment = { "Id": this.model.aComments[i].asc_getId(), "Comment": this.model.aComments[i] }; var comment = { "Id": this.model.aComments[i].asc_getId(), "Comment": this.model.aComments[i] };
this.cellCommentator.addCommentSerialize(comment["Comment"]); this.cellCommentator.addCommentSerialize(comment["Comment"]);
commentList.push(comment);
} }
if ( commentList.length )
this.model.workbook.handlers.trigger("asc_onAddComments", commentList);
}, },
_prepareDrawingObjects: function () { _prepareDrawingObjects: function () {
......
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