Bug 39667

This commit is contained in:
Julia Radzhabova 2019-02-20 14:13:10 +03:00
parent 041dca188f
commit b53773a298
2 changed files with 14 additions and 8 deletions

View file

@ -153,9 +153,10 @@ define([
if (this.mode.canComments) {
this.api.asc_registerCallback('asc_onAddComment', _.bind(this.onApiAddComment, this));
this.api.asc_registerCallback('asc_onAddComments', _.bind(this.onApiAddComments, this));
var collection = this.getApplication().getCollection('Common.Collections.Comments');
var collection = this.getApplication().getCollection('Common.Collections.Comments'),
resolved = Common.Utils.InternalSettings.get("de-settings-resolvedcomment");
for (var i = 0; i < collection.length; ++i) {
if (collection.at(i).get('userid') !== this.mode.user.id) {
if (collection.at(i).get('userid') !== this.mode.user.id && (resolved || !collection.at(i).get('resolved'))) {
this.leftMenu.markCoauthOptions('comments', true);
break;
}
@ -613,13 +614,15 @@ define([
},
onApiAddComment: function(id, data) {
if (data && data.asc_getUserId() !== this.mode.user.id)
var resolved = Common.Utils.InternalSettings.get("de-settings-resolvedcomment");
if (data && data.asc_getUserId() !== this.mode.user.id && (resolved || !data.asc_getSolved()))
this.leftMenu.markCoauthOptions('comments');
},
onApiAddComments: function(data) {
var resolved = Common.Utils.InternalSettings.get("de-settings-resolvedcomment");
for (var i = 0; i < data.length; ++i) {
if (data[i].asc_getUserId() !== this.mode.user.id) {
if (data[i].asc_getUserId() !== this.mode.user.id && (resolved || !data[i].asc_getSolved())) {
this.leftMenu.markCoauthOptions('comments');
break;
}

View file

@ -154,9 +154,10 @@ define([
this.api.asc_registerCallback('asc_onAddComments', _.bind(this.onApiAddComments, this));
var comments = this.getApplication().getController('Common.Controllers.Comments').groupCollection;
for (var name in comments) {
var collection = comments[name];
var collection = comments[name],
resolved = Common.Utils.InternalSettings.get("sse-settings-resolvedcomment");
for (var i = 0; i < collection.length; ++i) {
if (collection.at(i).get('userid') !== this.mode.user.id) {
if (collection.at(i).get('userid') !== this.mode.user.id && (resolved || !collection.at(i).get('resolved'))) {
this.leftMenu.markCoauthOptions('comments', true);
break;
}
@ -663,13 +664,15 @@ define([
},
onApiAddComment: function(id, data) {
if (data && data.asc_getUserId() !== this.mode.user.id)
var resolved = Common.Utils.InternalSettings.get("sse-settings-resolvedcomment");
if (data && data.asc_getUserId() !== this.mode.user.id && (resolved || !data.asc_getSolved()))
this.leftMenu.markCoauthOptions('comments');
},
onApiAddComments: function(data) {
var resolved = Common.Utils.InternalSettings.get("sse-settings-resolvedcomment");
for (var i = 0; i < data.length; ++i) {
if (data[i].asc_getUserId() !== this.mode.user.id) {
if (data[i].asc_getUserId() !== this.mode.user.id && (resolved || !data[i].asc_getSolved())) {
this.leftMenu.markCoauthOptions('comments');
break;
}