Vulcan/client/views/posts/posts_digest.js

42 lines
1.4 KiB
JavaScript
Raw Normal View History

2012-10-10 13:54:48 +09:00
Template.posts_digest.helpers({
posts: function(){
return digestPosts();
2012-10-09 12:02:37 +09:00
},
hasPosts: function(){
return !!digestPosts().length;
},
2012-10-10 13:54:48 +09:00
currentDate: function(){
// return moment(Session.get('currentDate')).format("dddd, MMMM Do YYYY");
2012-10-10 13:54:48 +09:00
},
previousDateURL: function(){
// var currentDate=moment(Session.get('currentDate'));
// var newDate=currentDate.subtract('days', 1);
// return getDigestURL(newDate);
2012-10-10 13:54:48 +09:00
},
showPreviousDate: function(){
// TODO
return true;
},
nextDateURL: function(){
// var currentDate=moment(Session.get('currentDate'));
// var newDate=currentDate.add('days', 1);
// return getDigestURL(newDate);
2012-10-10 13:54:48 +09:00
},
showNextDate: function(){
// var currentDate=moment(Session.get('currentDate')).startOf('day');
// var today=moment(new Date()).startOf('day');
// return today.diff(currentDate, 'days') > 0
2012-10-09 12:02:37 +09:00
}
2012-10-22 09:28:42 +09:00
});
2012-10-22 14:00:47 +09:00
Template.posts_digest.created = function(){
// var currentDate=moment(Session.get('currentDate')).startOf('day');
// var today=moment(new Date()).startOf('day');
// $(document).bind('keydown', 'left', function(){
// Meteor.Router.to(getDigestURL(currentDate.subtract('days', 1)));
// });
// $(document).bind('keydown', 'right', function(){
// if(today.diff(currentDate, 'days') > 0)
// Meteor.Router.to(getDigestURL(currentDate.add('days', 1)));
// });
2012-10-22 09:28:42 +09:00
};