commit
213283ac34
|
@ -155,7 +155,8 @@ define([
|
||||||
var collection = this.getApplication().getCollection('Common.Collections.Comments'),
|
var collection = this.getApplication().getCollection('Common.Collections.Comments'),
|
||||||
resolved = Common.Utils.InternalSettings.get("de-settings-resolvedcomment");
|
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 && (resolved || !collection.at(i).get('resolved'))) {
|
var comment = collection.at(i);
|
||||||
|
if (!comment.get('hide') && comment.get('userid') !== this.mode.user.id && (resolved || !comment.get('resolved'))) {
|
||||||
this.leftMenu.markCoauthOptions('comments', true);
|
this.leftMenu.markCoauthOptions('comments', true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -690,14 +691,14 @@ define([
|
||||||
|
|
||||||
onApiAddComment: function(id, data) {
|
onApiAddComment: function(id, data) {
|
||||||
var resolved = Common.Utils.InternalSettings.get("de-settings-resolvedcomment");
|
var resolved = Common.Utils.InternalSettings.get("de-settings-resolvedcomment");
|
||||||
if (data && data.asc_getUserId() !== this.mode.user.id && (resolved || !data.asc_getSolved()))
|
if (data && data.asc_getUserId() !== this.mode.user.id && (resolved || !data.asc_getSolved()) && AscCommon.UserInfoParser.canViewComment(data.asc_getUserName()))
|
||||||
this.leftMenu.markCoauthOptions('comments');
|
this.leftMenu.markCoauthOptions('comments');
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiAddComments: function(data) {
|
onApiAddComments: function(data) {
|
||||||
var resolved = Common.Utils.InternalSettings.get("de-settings-resolvedcomment");
|
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 && (resolved || !data[i].asc_getSolved())) {
|
if (data[i].asc_getUserId() !== this.mode.user.id && (resolved || !data[i].asc_getSolved()) && AscCommon.UserInfoParser.canViewComment(data.asc_getUserName())) {
|
||||||
this.leftMenu.markCoauthOptions('comments');
|
this.leftMenu.markCoauthOptions('comments');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,7 +156,8 @@ define([
|
||||||
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');
|
||||||
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) {
|
var comment = collection.at(i);
|
||||||
|
if (!comment.get('hide') && comment.get('userid') !== this.mode.user.id) {
|
||||||
this.leftMenu.markCoauthOptions('comments', true);
|
this.leftMenu.markCoauthOptions('comments', true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -169,6 +170,7 @@ define([
|
||||||
this.leftMenu.getMenu('file').setApi(api);
|
this.leftMenu.getMenu('file').setApi(api);
|
||||||
if (this.mode.canUseHistory)
|
if (this.mode.canUseHistory)
|
||||||
this.getApplication().getController('Common.Controllers.History').setApi(this.api).setMode(this.mode);
|
this.getApplication().getController('Common.Controllers.History').setApi(this.api).setMode(this.mode);
|
||||||
|
this.leftMenu.btnThumbs.toggle(true);
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -208,7 +210,6 @@ define([
|
||||||
(this.mode.trialMode || this.mode.isBeta) && this.leftMenu.setDeveloperMode(this.mode.trialMode, this.mode.isBeta, this.mode.buildVersion);
|
(this.mode.trialMode || this.mode.isBeta) && this.leftMenu.setDeveloperMode(this.mode.trialMode, this.mode.isBeta, this.mode.buildVersion);
|
||||||
/** coauthoring end **/
|
/** coauthoring end **/
|
||||||
Common.util.Shortcuts.resumeEvents();
|
Common.util.Shortcuts.resumeEvents();
|
||||||
this.leftMenu.btnThumbs.toggle(true);
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -578,13 +579,13 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiAddComment: function(id, data) {
|
onApiAddComment: function(id, data) {
|
||||||
if (data && data.asc_getUserId() !== this.mode.user.id)
|
if (data && data.asc_getUserId() !== this.mode.user.id && AscCommon.UserInfoParser.canViewComment(data.asc_getUserName()))
|
||||||
this.leftMenu.markCoauthOptions('comments');
|
this.leftMenu.markCoauthOptions('comments');
|
||||||
},
|
},
|
||||||
|
|
||||||
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].asc_getUserId() !== this.mode.user.id) {
|
if (data[i].asc_getUserId() !== this.mode.user.id && AscCommon.UserInfoParser.canViewComment(data.asc_getUserName())) {
|
||||||
this.leftMenu.markCoauthOptions('comments');
|
this.leftMenu.markCoauthOptions('comments');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -803,7 +803,7 @@ define([
|
||||||
pluginsController = application.getController('Common.Controllers.Plugins');
|
pluginsController = application.getController('Common.Controllers.Plugins');
|
||||||
|
|
||||||
leftmenuController.getView('LeftMenu').getMenu('file').loadDocument({doc:me.document});
|
leftmenuController.getView('LeftMenu').getMenu('file').loadDocument({doc:me.document});
|
||||||
leftmenuController.setMode(me.appOptions).setApi(me.api).createDelayedElements();
|
leftmenuController.setMode(me.appOptions).createDelayedElements().setApi(me.api);
|
||||||
|
|
||||||
chatController.setApi(this.api).setMode(this.appOptions);
|
chatController.setApi(this.api).setMode(this.appOptions);
|
||||||
application.getController('Common.Controllers.ExternalDiagramEditor').setApi(this.api).loadConfig({config:this.editorConfig, customization: this.editorConfig.customization});
|
application.getController('Common.Controllers.ExternalDiagramEditor').setApi(this.api).loadConfig({config:this.editorConfig, customization: this.editorConfig.customization});
|
||||||
|
|
|
@ -682,7 +682,7 @@ define([
|
||||||
var comments = cellinfo.asc_getComments();
|
var comments = cellinfo.asc_getComments();
|
||||||
if (comments.length) {
|
if (comments.length) {
|
||||||
controller.onEditComments(comments);
|
controller.onEditComments(comments);
|
||||||
} else if (this.permissions.canCoAuthoring || this.commentsCollection.getCommentsReplysCount()<3) {
|
} else if (this.permissions.canCoAuthoring) {
|
||||||
controller.addDummyComment();
|
controller.addDummyComment();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,7 +157,8 @@ define([
|
||||||
var collection = comments[name],
|
var collection = comments[name],
|
||||||
resolved = Common.Utils.InternalSettings.get("sse-settings-resolvedcomment");
|
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 && (resolved || !collection.at(i).get('resolved'))) {
|
var comment = collection.at(i);
|
||||||
|
if (!comment.get('hide') && comment.get('userid') !== this.mode.user.id && (resolved || !comment.get('resolved'))) {
|
||||||
this.leftMenu.markCoauthOptions('comments', true);
|
this.leftMenu.markCoauthOptions('comments', true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -718,14 +719,14 @@ define([
|
||||||
|
|
||||||
onApiAddComment: function(id, data) {
|
onApiAddComment: function(id, data) {
|
||||||
var resolved = Common.Utils.InternalSettings.get("sse-settings-resolvedcomment");
|
var resolved = Common.Utils.InternalSettings.get("sse-settings-resolvedcomment");
|
||||||
if (data && data.asc_getUserId() !== this.mode.user.id && (resolved || !data.asc_getSolved()))
|
if (data && data.asc_getUserId() !== this.mode.user.id && (resolved || !data.asc_getSolved()) && AscCommon.UserInfoParser.canViewComment(data.asc_getUserName()))
|
||||||
this.leftMenu.markCoauthOptions('comments');
|
this.leftMenu.markCoauthOptions('comments');
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiAddComments: function(data) {
|
onApiAddComments: function(data) {
|
||||||
var resolved = Common.Utils.InternalSettings.get("sse-settings-resolvedcomment");
|
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 && (resolved || !data[i].asc_getSolved())) {
|
if (data[i].asc_getUserId() !== this.mode.user.id && (resolved || !data[i].asc_getSolved()) && AscCommon.UserInfoParser.canViewComment(data.asc_getUserName())) {
|
||||||
this.leftMenu.markCoauthOptions('comments');
|
this.leftMenu.markCoauthOptions('comments');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue