MorningPeak/app/assets/javascripts/commentable.coffee
Arthur Poulet 51fbef582f finish ticket thread
- use comments instead of a slave tickets
- fix security issues
2016-01-31 12:01:47 +01:00

12 lines
423 B
CoffeeScript

commentableLoadComments = (base_url) ->
$.get(base_url + "/comments/about").done (e) ->
$("#comments").html(e)
$(document).ready ->
url = window.location.pathname
commentableLoadComments(url)
$(document).on "ajax:success", "#new_comment", (e, data, status, xhr) ->
commentableLoadComments(url)
$(document).on "ajax:complete", ".remove-comment", (e, data, status, xhr) ->
commentableLoadComments(url)