Vulcan/client/views/posts/posts_top.js
Tom Coleman 218f76347b Refactored the subscriptions to be all separate.
Probably still a bit of work to do to get things up to scratch, but looking good.
2012-10-18 13:07:10 +11:00

18 lines
441 B
JavaScript

Template.posts_top.posts = function() { return topPosts(); };
Template.posts_top.helpers({
moreLinkDistance: function(){
return topPosts().length * 80;
},
allPostsLoaded: function(){
return topPosts().length < Session.get('topPageLimit');
}
});
Template.posts_top.events({
'click .more-link': function(e) {
e.preventDefault();
Session.set('topPageLimit', Session.get('topPageLimit') + TOP_PAGE_PER_PAGE)
}
});