about summary refs log tree commit diff stats
path: root/app/assets/javascripts/main/comments.coffee
blob: d33e2004108a74711f4f175bad7217e4829db861 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
comments_ready = ->
  $(".comment-reply-to").click ->
    $("#comment_reply_to_id").val($(this).data("commentId"))
    $("#comment-reply-msg .comment-reply-author").text($(this).data("commentAuthor"))
    $("#comment-reply-msg").show()
    return false

  $(".comment-reply-cancel").click ->
    $("#comment_reply_to_id").val("")
    $("#comment-reply-msg").hide()
    return false

$(document).ready(comments_ready)
$(document).on('turbolinks:load', comments_ready)