adds moderation to comments and debates [#136]

This commit is contained in:
rgarcia
2015-08-17 13:39:31 +02:00
parent cd0a64ea3e
commit f31ed2940d
35 changed files with 315 additions and 45 deletions

View File

@@ -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}"))

View 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()

View 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()