Commit 7335f366dc952aa371e1e17cfbe2874d51dd6f16
1 parent
db2c1536
Exists in
master
and in
4 other branches
Fix comment and reply buttons
Showing
4 changed files
with
4 additions
and
1 deletions
Show diff stats
app/assets/javascripts/notes.js
... | ... | @@ -244,6 +244,7 @@ var NoteList = { |
244 | 244 | setupDiscussionNoteForm: function(dataHolder, form) { |
245 | 245 | // setup note target |
246 | 246 | form.attr("rel", dataHolder.data("discussionId")); |
247 | + form.find("#note_commit_id").val(dataHolder.data("commitId")); | |
247 | 248 | form.find("#note_line_code").val(dataHolder.data("lineCode")); |
248 | 249 | form.find("#note_noteable_type").val(dataHolder.data("noteableType")); |
249 | 250 | form.find("#note_noteable_id").val(dataHolder.data("noteableId")); | ... | ... |
app/controllers/commit_controller.rb
... | ... | @@ -23,7 +23,7 @@ class CommitController < ProjectResourceController |
23 | 23 | |
24 | 24 | @comments_allowed = @reply_allowed = true |
25 | 25 | @comments_target = { noteable_type: 'Commit', |
26 | - noteable_id: @commit.id } | |
26 | + commit_id: @commit.id } | |
27 | 27 | |
28 | 28 | respond_to do |format| |
29 | 29 | format.html do | ... | ... |
app/views/notes/_diff_note_link.html.haml
... | ... | @@ -4,6 +4,7 @@ |
4 | 4 | class: "add-diff-note js-add-diff-note-button", |
5 | 5 | data: { noteable_type: note.noteable_type, |
6 | 6 | noteable_id: note.noteable_id, |
7 | + commit_id: note.commit_id, | |
7 | 8 | line_code: note.line_code, |
8 | 9 | discussion_id: note.discussion_id }, |
9 | 10 | title: "Add a comment to this line" | ... | ... |
app/views/notes/_discussion_reply_button.html.haml