Vulcan/client/views/posts/modules/post_actions.js
Sacha Greif fb91613cfe refactor all the things!
- changed the layout CSS for post modules
- changed order of modules
- changed markup of modules
2014-12-14 12:38:48 +09:00

18 lines
No EOL
455 B
JavaScript

Template[getTemplate('postActions')].helpers({
});
Template[getTemplate('postActions')].events({
'click .toggle-actions-link': function(e, instance){
e.preventDefault();
var $post = $(e.target).parents('.post');
var h = $post.height();
if ($post.hasClass('show-actions')) {
$post.height('auto');
$post.removeClass('show-actions');
} else {
$post.height(h+'px');
$post.addClass('show-actions');
}
}
});