summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkushalpandya <kushal@gitlab.com>2017-05-18 01:05:03 +0530
committerkushalpandya <kushal@gitlab.com>2017-05-18 01:05:03 +0530
commitbf24764ef2602dab56590d4611c465a1c2b39094 (patch)
tree61e633b2fda9a128b4000b207da8b438c941f065
parent6a2bcb4b2ae8bed4730f3589c2693b17c57b4a75 (diff)
downloadgitlab-ce-32425-fix-diff-notes-instant-editing.tar.gz
Fix missing editing note reference32425-fix-diff-notes-instant-editing
-rw-r--r--app/assets/javascripts/notes.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js
index 91d1afba7b6..0f1d42ab542 100644
--- a/app/assets/javascripts/notes.js
+++ b/app/assets/javascripts/notes.js
@@ -594,12 +594,12 @@ const normalizeNewlines = function(str) {
Updates the current note field.
*/
- Notes.prototype.updateNote = function(_xhr, noteEntity, _status) {
+ Notes.prototype.updateNote = function(noteEntity, $targetNote) {
var $noteEntityEl, $note_li;
// Convert returned HTML to a jQuery object so we can modify it further
$noteEntityEl = $(noteEntity.html);
$noteEntityEl.addClass('fade-in-full');
- this.revertNoteEditForm();
+ this.revertNoteEditForm($targetNote);
gl.utils.localTimeAgo($('.js-timeago', $noteEntityEl));
$noteEntityEl.renderGFM();
$noteEntityEl.find('.js-task-list-container').taskList('enable');
@@ -1392,7 +1392,7 @@ const normalizeNewlines = function(str) {
gl.utils.ajaxPost(formAction, formData)
.then((note) => {
// Submission successful! render final note element
- this.updateNote(null, note, null);
+ this.updateNote(note, $editingNote);
})
.fail(() => {
// Submission failed, revert back to original note