summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/line_comments/application.js.coffee
blob: ae65502800e10cce2a7961340d3a166ff061718e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#= require mithril
#= require_directory ./components
#= require_directory .

$ ->
  # Render all the buttons
  $('.discussion').each ->
    $this = $(this)

    $('.js-line-comment', $(this)).each ->
      m.mount $(this).get(0), m(CommentButton,
        discussion_id: $this.data('discussion-id')
        note_id: $(this).data('id')
        resolved: !!$(this).data('resolved')
      )