Vulcan/client/views/posts/posts_new.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

19 lines
441 B
JavaScript

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