mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 12:16:37 -04:00
19 lines
No EOL
598 B
JavaScript
19 lines
No EOL
598 B
JavaScript
Template[getTemplate('comment_list')].created = function(){
|
|
postObject = this.data;
|
|
};
|
|
|
|
Template[getTemplate('comment_list')].helpers({
|
|
comment_item: function () {
|
|
return getTemplate('comment_item');
|
|
},
|
|
child_comments: function(){
|
|
var post = this;
|
|
var comments = Comments.find({postId: post._id, parentCommentId: null}, {sort: {score: -1, postedAt: -1}});
|
|
return comments;
|
|
}
|
|
});
|
|
|
|
Template[getTemplate('comment_list')].rendered = function(){
|
|
// once all comments have been rendered, activate comment queuing for future real-time comments
|
|
window.queueComments = true;
|
|
}; |