Vulcan/packages/telescope-comments/lib/client/templates/comment_list.js
2015-04-23 17:45:37 +09:00

15 lines
481 B
JavaScript

Template.comment_list.helpers({
child_comments: function(){
var post = this;
var comments = Comments.find({postId: post._id, parentCommentId: null}, {sort: {score: -1, postedAt: -1}});
return comments;
},
threadModules: function () {
return Telescope.getModules("thread");
}
});
Template.comment_list.rendered = function(){
// once all comments have been rendered, activate comment queuing for future real-time comments
window.queueComments = true;
};