Skip to content
Snippets Groups Projects
Commit 6c6f415c authored by Riyad Preukschas's avatar Riyad Preukschas
Browse files

Fix appending diff line notes

parent 5c2f6d7f
No related branches found
No related tags found
1 merge request!1878Discussions (a.k.a. Grouped Comments)
Loading
Loading
@@ -3,8 +3,8 @@ module Notes
def execute
note = project.notes.new(params[:note])
note.author = current_user
note.notify = true if params[:notify] == '1'
note.notify_author = true if params[:notify_author] == '1'
note.notify = params[:notify].present?
note.notify_author = params[:notify_author].present?
note.save
note
end
Loading
Loading
Loading
Loading
@@ -6,7 +6,7 @@
 
// find the reply button for this line
// (might not be there if this is the first note)
var trRpl = $("a.line_note_reply_link[data-line-code='#{note.line_code}']").closest("tr");
var trRpl = $("a.line_note_reply_link[data-noteable-type='#{note.noteable_type}'][data-noteable-id='#{note.noteable_id}'][data-line-code='#{note.line_code}']").closest("tr");
if (trRpl.size() == 0) {
// find the commented line ...
var trEl = $(".#{note.line_code}").parent();
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment