Commit b0214945 authored by Phil Hughes's avatar Phil Hughes

Changed what property is added into DOM

parent e82837ee
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
_this.last_fetched_at = data.last_fetched_at; _this.last_fetched_at = data.last_fetched_at;
_this.setPollingInterval(data.notes.length); _this.setPollingInterval(data.notes.length);
return $.each(notes, function(i, note) { return $.each(notes, function(i, note) {
if (note.discussion_with_diff_html != null) { if (note.discussion_html != null) {
return _this.renderDiscussionNote(note); return _this.renderDiscussionNote(note);
} else { } else {
return _this.renderNote(note); return _this.renderNote(note);
...@@ -287,12 +287,12 @@ ...@@ -287,12 +287,12 @@
discussionContainer = $(".notes[data-discussion-id='" + note.original_discussion_id + "']"); discussionContainer = $(".notes[data-discussion-id='" + note.original_discussion_id + "']");
} }
if (discussionContainer.length === 0) { if (discussionContainer.length === 0) {
row.after(note.discussion_html); row.after(note.diff_discussion_html);
row.next().find(".note").remove(); row.next().find(".note").remove();
discussionContainer = $(".notes[data-discussion-id='" + note.discussion_id + "']"); discussionContainer = $(".notes[data-discussion-id='" + note.discussion_id + "']");
discussionContainer.append(note_html); discussionContainer.append(note_html);
if ($('body').attr('data-page').indexOf('projects:merge_request') === 0) { if ($('body').attr('data-page').indexOf('projects:merge_request') === 0) {
$('ul.main-notes-list').append(note.discussion_with_diff_html).syntaxHighlight(); $('ul.main-notes-list').append(note.discussion_html).syntaxHighlight();
} }
} else { } else {
discussionContainer.append(note_html); discussionContainer.append(note_html);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment