Commit fe4c8072 authored by bbaer's avatar bbaer
Browse files

fixed unknown user.

generates new event when new comment is added
parent d90896df
Pipeline #1446 passed with stage
in 2 minutes and 15 seconds
......@@ -259,6 +259,7 @@ var QfqNS = QfqNS || {};
comments.commentController = new n.CommentController();
comments.commentController.buildContainer($hook);
comments.commentController.displayEditor();
comments.commentController.setCurrentUser(this.currentUser);
this._setListeners(comments.commentController);
this.annotations.push(comments);
}
......
......@@ -102,6 +102,7 @@ var QfqNS = QfqNS || {};
var commentObject = new n.Comment(comment, user, this.$container);
commentObject.display();
this.comments.push(commentObject);
this._changeHandler("new");
this.updateHeight();
return this.comments.length - 1;
};
......@@ -132,7 +133,7 @@ var QfqNS = QfqNS || {};
n.CommentController.prototype.buildCommentObject = function(text) {
var comment = {};
comment.comment = text;
comment.dateTime = new Date().toISOString();
comment.dateTime = new Date().toLocaleString('de-CH');
comment.uid = this.currentUser.uid;
return comment;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment