Commit 7a5d0258 authored by Alexander.Trofimov's avatar Alexander.Trofimov

send array of asc_CCommentData on asc_onAddComments event instead array of objects

parent c6b48565
...@@ -606,7 +606,7 @@ define([ ...@@ -606,7 +606,7 @@ define([
}, },
onApiAddComments: function (data) { onApiAddComments: function (data) {
for (var i = 0; i < data.length; ++i) { for (var i = 0; i < data.length; ++i) {
var comment = this.readSDKComment(data[i].Id, data[i].Comment); var comment = this.readSDKComment(data[i].asc_getId(), data[i]);
this.collection.push(comment); this.collection.push(comment);
} }
......
...@@ -480,7 +480,7 @@ define([ ...@@ -480,7 +480,7 @@ define([
onApiAddComments: function(data) { onApiAddComments: function(data) {
for (var i = 0; i < data.length; ++i) { for (var i = 0; i < data.length; ++i) {
if (data[i].Comment && data[i].Comment.asc_getUserId() !== this.mode.user.id) { if (data[i].asc_getUserId() !== this.mode.user.id) {
this.leftMenu.markCoauthOptions('comments'); this.leftMenu.markCoauthOptions('comments');
break; break;
} }
......
...@@ -375,7 +375,7 @@ define([ ...@@ -375,7 +375,7 @@ define([
onApiAddComments: function(data) { onApiAddComments: function(data) {
for (var i = 0; i < data.length; ++i) { for (var i = 0; i < data.length; ++i) {
if (data[i].Comment && data[i].Comment.asc_getUserId() !== this.mode.user.id) { if (data[i].asc_getUserId() !== this.mode.user.id) {
this.leftMenu.markCoauthOptions('comments'); this.leftMenu.markCoauthOptions('comments');
break; break;
} }
......
...@@ -516,7 +516,7 @@ define([ ...@@ -516,7 +516,7 @@ define([
onApiAddComments: function(data) { onApiAddComments: function(data) {
for (var i = 0; i < data.length; ++i) { for (var i = 0; i < data.length; ++i) {
if (data[i].Comment && data[i].Comment.asc_getUserId() !== this.mode.user.id) { if (data[i].asc_getUserId() !== this.mode.user.id) {
this.leftMenu.markCoauthOptions('comments'); this.leftMenu.markCoauthOptions('comments');
break; break;
} }
......
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