12345678910111213141516171819202122 |
- /**
- * @file
- *
- *
- * User: marand
- * Date: 31/08/15
- * Time: 20:47
- */
- Template.postSubmit.events({
- 'submit form': function (e) {
- e.preventDefault();
- var post = {
- url: $(e.target).find('[name=url]').val(),
- title: $(e.target).find('[name=title]').val()
- };
- post._id = Posts.insert(post);
- Router.go('postPage', post);
- }
- });
|