Bug 39667
This commit is contained in:
parent
041dca188f
commit
b53773a298
|
@ -153,9 +153,10 @@ define([
|
||||||
if (this.mode.canComments) {
|
if (this.mode.canComments) {
|
||||||
this.api.asc_registerCallback('asc_onAddComment', _.bind(this.onApiAddComment, this));
|
this.api.asc_registerCallback('asc_onAddComment', _.bind(this.onApiAddComment, this));
|
||||||
this.api.asc_registerCallback('asc_onAddComments', _.bind(this.onApiAddComments, 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) {
|
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);
|
this.leftMenu.markCoauthOptions('comments', true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -613,13 +614,15 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiAddComment: function(id, data) {
|
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');
|
this.leftMenu.markCoauthOptions('comments');
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiAddComments: function(data) {
|
onApiAddComments: function(data) {
|
||||||
|
var resolved = Common.Utils.InternalSettings.get("de-settings-resolvedcomment");
|
||||||
for (var i = 0; i < data.length; ++i) {
|
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');
|
this.leftMenu.markCoauthOptions('comments');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,9 +154,10 @@ define([
|
||||||
this.api.asc_registerCallback('asc_onAddComments', _.bind(this.onApiAddComments, this));
|
this.api.asc_registerCallback('asc_onAddComments', _.bind(this.onApiAddComments, this));
|
||||||
var comments = this.getApplication().getController('Common.Controllers.Comments').groupCollection;
|
var comments = this.getApplication().getController('Common.Controllers.Comments').groupCollection;
|
||||||
for (var name in comments) {
|
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) {
|
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);
|
this.leftMenu.markCoauthOptions('comments', true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -663,13 +664,15 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiAddComment: function(id, data) {
|
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');
|
this.leftMenu.markCoauthOptions('comments');
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiAddComments: function(data) {
|
onApiAddComments: function(data) {
|
||||||
|
var resolved = Common.Utils.InternalSettings.get("sse-settings-resolvedcomment");
|
||||||
for (var i = 0; i < data.length; ++i) {
|
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');
|
this.leftMenu.markCoauthOptions('comments');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue