Commit f54a94ce authored by Alexander.Trofimov's avatar Alexander.Trofimov

send array of asc_CCommentData on asc_onAddComments event instead array of objects

parent 0167f79d
...@@ -598,7 +598,7 @@ define([ ...@@ -598,7 +598,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);
} }
......
...@@ -472,7 +472,7 @@ define([ ...@@ -472,7 +472,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;
} }
......
...@@ -367,7 +367,7 @@ define([ ...@@ -367,7 +367,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;
} }
......
...@@ -508,7 +508,7 @@ define([ ...@@ -508,7 +508,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