Fix Bug 47212

This commit is contained in:
Julia Radzhabova 2020-11-02 18:38:20 +03:00
parent 35bf0fac86
commit 537a3e2817

View file

@ -1542,7 +1542,9 @@ define([
date = (data.asc_getReply(i).asc_getOnlyOfficeTime()) ? new Date(this.stringOOToLocalDate(data.asc_getReply(i).asc_getOnlyOfficeTime())) : date = (data.asc_getReply(i).asc_getOnlyOfficeTime()) ? new Date(this.stringOOToLocalDate(data.asc_getReply(i).asc_getOnlyOfficeTime())) :
((data.asc_getReply(i).asc_getTime() == '') ? new Date() : new Date(this.stringUtcToLocalDate(data.asc_getReply(i).asc_getTime()))); ((data.asc_getReply(i).asc_getTime() == '') ? new Date() : new Date(this.stringUtcToLocalDate(data.asc_getReply(i).asc_getTime())));
var user = _.findWhere(editUsers, {idOriginal: data.asc_getReply(i).asc_getUserId()}); var user = _.find(editUsers, function(item){
return (item.asc_getIdOriginal()==data.asc_getReply(i).asc_getUserId());
});
var username = data.asc_getReply(i).asc_getUserName(); var username = data.asc_getReply(i).asc_getUserName();
replies.push({ replies.push({
ind : i, ind : i,
@ -1563,8 +1565,10 @@ define([
readSDKComment: function(id, data) { readSDKComment: function(id, data) {
var date = (data.asc_getOnlyOfficeTime()) ? new Date(this.stringOOToLocalDate(data.asc_getOnlyOfficeTime())) : var date = (data.asc_getOnlyOfficeTime()) ? new Date(this.stringOOToLocalDate(data.asc_getOnlyOfficeTime())) :
((data.asc_getTime() == '') ? new Date() : new Date(this.stringUtcToLocalDate(data.asc_getTime()))); ((data.asc_getTime() == '') ? new Date() : new Date(this.stringUtcToLocalDate(data.asc_getTime())));
var user = _.findWhere(editUsers, {idOriginal: data.asc_getUserId()}), var user = _.find(editUsers, function(item){
groupname = id.substr(0, id.lastIndexOf('_')+1).match(/^(doc|sheet[0-9_]+)_/); return (item.asc_getIdOriginal()==data.asc_getUserId());
});
var groupname = id.substr(0, id.lastIndexOf('_')+1).match(/^(doc|sheet[0-9_]+)_/);
var username = data.asc_getUserName(); var username = data.asc_getUserName();
var comment = { var comment = {
uid : id, uid : id,
@ -1605,7 +1609,9 @@ define([
date = (data.asc_getOnlyOfficeTime()) ? new Date(this.stringOOToLocalDate(data.asc_getOnlyOfficeTime())) : date = (data.asc_getOnlyOfficeTime()) ? new Date(this.stringOOToLocalDate(data.asc_getOnlyOfficeTime())) :
((data.asc_getTime() == '') ? new Date() : new Date(this.stringUtcToLocalDate(data.asc_getTime()))); ((data.asc_getTime() == '') ? new Date() : new Date(this.stringUtcToLocalDate(data.asc_getTime())));
var user = _.findWhere(editUsers, {idOriginal: data.asc_getUserId()}); var user = _.find(editUsers, function(item){
return (item.asc_getIdOriginal()==data.asc_getUserId());
});
comment.comment = data.asc_getText(); comment.comment = data.asc_getText();
comment.userid = data.asc_getUserId(); comment.userid = data.asc_getUserId();
comment.username = data.asc_getUserName(); comment.username = data.asc_getUserName();
@ -1625,7 +1631,9 @@ define([
dateReply = (data.asc_getReply(i).asc_getOnlyOfficeTime()) ? new Date(this.stringOOToLocalDate(data.asc_getReply(i).asc_getOnlyOfficeTime())) : dateReply = (data.asc_getReply(i).asc_getOnlyOfficeTime()) ? new Date(this.stringOOToLocalDate(data.asc_getReply(i).asc_getOnlyOfficeTime())) :
((data.asc_getReply(i).asc_getTime() == '') ? new Date() : new Date(this.stringUtcToLocalDate(data.asc_getReply(i).asc_getTime()))); ((data.asc_getReply(i).asc_getTime() == '') ? new Date() : new Date(this.stringUtcToLocalDate(data.asc_getReply(i).asc_getTime())));
user = _.findWhere(editUsers, {idOriginal: data.asc_getReply(i).asc_getUserId()}); user = _.find(editUsers, function(item){
return (item.asc_getIdOriginal()==data.asc_getReply(i).asc_getUserId());
});
var username = data.asc_getReply(i).asc_getUserName(); var username = data.asc_getReply(i).asc_getUserName();
replies.push({ replies.push({
ind : i, ind : i,