more work on comments for events

This commit is contained in:
Kyle Drake 2014-05-01 19:20:34 -07:00
parent eba4a6e3f5
commit b96730b83f
17 changed files with 2298 additions and 43 deletions

View file

@ -0,0 +1,16 @@
var Comment = function(eventId, csrfToken) {
this.eventId = eventId
this.csrfToken = csrfToken
}
Comment.prototype.create = function(form) {
var self = this
var form = $(form)
var comment = form.find('[name="comment"]').val()
form.remove()
$.post('/event/'+this.eventId+'/comment', {csrf_token: this.csrfToken, comment: comment}, function(res) {
console.log(res)
})
}