mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 12:16:37 -04:00
15 lines
402 B
JavaScript
15 lines
402 B
JavaScript
Template.selected_post.events = {
|
|
'click input[type=submit]': function(e){
|
|
e.preventDefault();
|
|
|
|
var post = Posts.findOne(Session.get('selected_post_id'));
|
|
var $comment = $('#comment');
|
|
Meteor.call('comment', post, null, $comment.val());
|
|
$comment.val('');
|
|
}
|
|
};
|
|
|
|
Template.post_edit.post = function(){
|
|
var post = Posts.findOne(Session.get('selected_post_id'));
|
|
return post;
|
|
};
|