-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -201,7 +201,8 @@ if Backbone? | |
response.set('thread', @model) | ||
view = new ThreadResponseView($.extend({model: response}, options)) | ||
view.on "comment:add", @addComment | ||
view.on "comment:endorse", @endorseThread | ||
view.on "comment:endorse", (model, value, options) => | ||
@endorseThread(value) | ||
view.render() | ||
@$el.find(listSelector).append(view.el) | ||
view.afterInsert() | ||
|
@@ -221,8 +222,7 @@ if Backbone? | |
addComment: => | ||
@model.comment() | ||
|
||
endorseThread: (endorsed) => | ||
is_endorsed = @$el.find(".action-answer.is-checked").length > 0 | ||
endorseThread: (is_endorsed) => | ||
This comment has been minimized.
Sorry, something went wrong.
gwprice
|
||
@model.set 'endorsed', is_endorsed | ||
|
||
submitComment: (event) -> | ||
|
Comments have a reference to the thread, so we should be able to choose a more specific message here.