adds moderation to comments and debates [#136]
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
App.Comments =
|
||||
|
||||
add_response: (parent_id, response_html) ->
|
||||
add_comment: (parent_id, response_html) ->
|
||||
$(response_html).insertAfter($("#js-comment-form-#{parent_id}"))
|
||||
|
||||
add_reply: (parent_id, response_html) ->
|
||||
$("##{parent_id} .comment-children:first").prepend($(response_html))
|
||||
|
||||
display_error: (field_with_errors, error_html) ->
|
||||
$(error_html).insertAfter($("#{field_with_errors}"))
|
||||
|
||||
|
||||
7
app/assets/javascripts/moderator_comment.js.coffee
Normal file
7
app/assets/javascripts/moderator_comment.js.coffee
Normal file
@@ -0,0 +1,7 @@
|
||||
App.ModeratorComments =
|
||||
|
||||
add_class_faded: (id) ->
|
||||
$("##{id} .comment-body:first").addClass("faded")
|
||||
|
||||
hide_moderator_actions: (id) ->
|
||||
$("##{id} #moderator-comment-actions:first").hide()
|
||||
8
app/assets/javascripts/moderator_debates.js.coffee
Normal file
8
app/assets/javascripts/moderator_debates.js.coffee
Normal file
@@ -0,0 +1,8 @@
|
||||
App.ModeratorDebates =
|
||||
|
||||
add_class_faded: (id) ->
|
||||
$("##{id}").addClass("faded")
|
||||
$("#comments").addClass("faded")
|
||||
|
||||
hide_moderator_actions: (id) ->
|
||||
$("##{id} #moderator-debate-actions:first").hide()
|
||||
Reference in New Issue
Block a user