Commit 6805b325 by Matthew Mongeau

Track comment

parent 1b5388ab
......@@ -91,6 +91,7 @@ class @DiscussionThreadView extends Backbone.View
body = @$("#wmd-input").val()
response = new Comment(body: body, created_at: (new Date()).toISOString(), username: window.user.get("username"), votes: { up_count: 0 })
@renderResponse(response)
@addComment()
DiscussionUtil.safeAjax
$elem: $(event.target)
......
......@@ -16,9 +16,12 @@ class @ThreadListItemView extends Backbone.View
threadSelected: ->
@trigger("thread:selected", @model.id)
false
follow: =>
@$("a").addClass("followed")
unfollow: =>
@$("a").removeClass("followed")
addComment: =>
@$(".comments-count").html(parseInt(@$(".comments-count").html()) + 1)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment