2015-04-13 14:52:03 +09:00
|
|
|
Template.postThumbnail.helpers({
|
2014-08-29 10:37:35 +09:00
|
|
|
postLink: function () {
|
2015-04-20 13:57:37 +09:00
|
|
|
return !!this.url ? Posts.getOutgoingUrl(this.url) : "/posts/"+this._id;
|
2014-08-29 10:37:35 +09:00
|
|
|
},
|
|
|
|
playVideoClass: function () {
|
|
|
|
return !!this.media ? 'post-thumbnail-has-video': '';
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2015-04-13 14:52:03 +09:00
|
|
|
Template.postThumbnail.events({
|
2014-08-29 10:37:35 +09:00
|
|
|
'click .post-thumbnail-has-video': function (e) {
|
|
|
|
e.preventDefault();
|
|
|
|
$('body').addClass('showing-lightbox');
|
|
|
|
$(e.target).parents('.post').find('.post-video-lightbox').fadeIn('fast');
|
|
|
|
}
|
2015-04-13 16:29:33 +09:00
|
|
|
});
|