Track comment
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user