[Comments] Use original guid for comment mentions
This commit is contained in:
parent
112c12d64c
commit
c9dbd128e8
|
@ -496,7 +496,7 @@ define([
|
|||
ascComment.asc_addReply(addReply);
|
||||
|
||||
me.api.asc_changeComment(id, ascComment);
|
||||
me.mode && me.mode.canRequestUsers && me.view.pickEMail(ascComment.asc_getDurableId ? ascComment.asc_getDurableId() : ascComment.asc_getGuid(), replyVal);
|
||||
me.mode && me.mode.canRequestUsers && me.view.pickEMail(ascComment.asc_getGuid(), replyVal);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1194,7 +1194,7 @@ define([
|
|||
groupname = id.substr(0, id.lastIndexOf('_')+1).match(/^(doc|sheet[0-9_]+)_/);
|
||||
var comment = new Common.Models.Comment({
|
||||
uid : id,
|
||||
originalUid : data.asc_getDurableId ? data.asc_getDurableId() : data.asc_getGuid(),
|
||||
guid : data.asc_getGuid(),
|
||||
userid : data.asc_getUserId(),
|
||||
username : data.asc_getUserName(),
|
||||
usercolor : (user) ? user.get('color') : null,
|
||||
|
@ -1344,14 +1344,13 @@ define([
|
|||
comment.asc_putUserId(this.currentUserId);
|
||||
comment.asc_putUserName(this.currentUserName);
|
||||
comment.asc_putSolved(false);
|
||||
comment.asc_putDurableId ? comment.asc_putDurableId(AscCommon.CreateUInt32()) : comment.asc_putGuid(AscCommon.CreateUInt32());
|
||||
|
||||
if (!_.isUndefined(comment.asc_putDocumentFlag))
|
||||
comment.asc_putDocumentFlag(false);
|
||||
|
||||
var commentId = this.api.asc_addComment(comment);
|
||||
this.api.asc_addComment(comment);
|
||||
this.view.showEditContainer(false);
|
||||
this.mode && this.mode.canRequestUsers && this.view.pickEMail(comment.asc_getDurableId ? comment.asc_getDurableId() : comment.asc_getGuid(), commentVal);
|
||||
this.mode && this.mode.canRequestUsers && this.view.pickEMail(comment.asc_getGuid(), commentVal);
|
||||
if (!_.isUndefined(this.api.asc_SetDocumentPlaceChangedEnabled)) {
|
||||
this.api.asc_SetDocumentPlaceChangedEnabled(false);
|
||||
}
|
||||
|
@ -1527,7 +1526,7 @@ define([
|
|||
},
|
||||
|
||||
onShowAction: function(id, selected) {
|
||||
var comment = this.collection.findWhere({originalUid: id});
|
||||
var comment = this.collection.findWhere({guid: id});
|
||||
comment && this.onShowComment(comment, selected);
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ define([
|
|||
Common.Models.Comment = Backbone.Model.extend({
|
||||
defaults: {
|
||||
uid : 0, // asc
|
||||
originalUid : 0,
|
||||
guid : '',
|
||||
userid : 0,
|
||||
username : 'Guest',
|
||||
usercolor : null,
|
||||
|
|
|
@ -705,7 +705,7 @@ define([
|
|||
arr = _.map(arr, function(str){
|
||||
return str.slice(1, str.length);
|
||||
});
|
||||
Common.Gateway.requestSendNotify({
|
||||
(arr.length>0) && Common.Gateway.requestSendNotify({
|
||||
emails: arr,
|
||||
actionId: commentId, // comment id
|
||||
actionLink: {
|
||||
|
|
Loading…
Reference in a new issue