add back comment response flagging

This commit is contained in:
Kevin Chugh
2013-04-05 19:04:18 -04:00
parent de7c511328
commit 24095679a6
4 changed files with 12 additions and 3 deletions

View File

@@ -139,4 +139,8 @@ if Backbone?
if textStatus == 'success'
temp_array = _.clone(@model.get('abuse_flaggers'));
temp_array.pop(window.user.id)
# if you're an admin, clear this
if DiscussionUtil.isStaff(@model.get("user_id"))
temp_array = []
@model.set('abuse_flaggers', temp_array)

View File

@@ -98,7 +98,7 @@ if Backbone?
renderFlagged: =>
if window.user.id in @model.get("abuse_flaggers") or or (DiscussionUtil.isStaff(@model.get("user_id")) and @model.get("abuse_flaggers").length > 0)
if window.user.id in @model.get("abuse_flaggers") or (DiscussionUtil.isStaff(@model.get("user_id")) and @model.get("abuse_flaggers").length > 0)
@$("[data-role=thread-flag]").addClass("flagged")
@$("[data-role=thread-flag]").removeClass("notflagged")
@$(".discussion-flag-abuse .flag-label").html("Misuse Reported")