Comment should pass endorsed to template.
This commit is contained in:
@@ -16,7 +16,6 @@ if Backbone?
|
||||
urlMappers: {}
|
||||
|
||||
urlFor: (name) ->
|
||||
console.log @
|
||||
@urlMappers[name].apply(@)
|
||||
|
||||
can: (action) ->
|
||||
@@ -24,7 +23,6 @@ if Backbone?
|
||||
|
||||
updateInfo: (info) ->
|
||||
if info
|
||||
console.log info.ability
|
||||
@set('ability', info.ability)
|
||||
@set('voted', info.voted)
|
||||
@set('subscribed', info.subscribed)
|
||||
@@ -248,7 +246,6 @@ if Backbone?
|
||||
@model.set('votes_point', response.votes.point)
|
||||
|
||||
toggleVote: (event) ->
|
||||
console.log("HERE")
|
||||
$elem = $(event.target)
|
||||
value = $elem.attr("value")
|
||||
$elem.toggleClass("is-cast")
|
||||
|
||||
@@ -111,7 +111,7 @@ class @DiscussionThreadView extends DiscussionContentView
|
||||
event.preventDefault()
|
||||
url = @model.urlFor('reply')
|
||||
body = @$("#wmd-input").val()
|
||||
response = new Comment(body: body, created_at: (new Date()).toISOString(), username: window.user.get("username"), votes: { up_count: 0 })
|
||||
response = new Comment(body: body, created_at: (new Date()).toISOString(), username: window.user.get("username"), votes: { up_count: 0 }, endorsed: false)
|
||||
@renderResponse(response)
|
||||
@addComment()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user