Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2017-05-09 07:15:34 +0300
committerJacob Schatz <jschatz@gitlab.com>2017-05-09 07:15:34 +0300
commit0151325dacebb99d54b6effb1d5842c0c712168c (patch)
tree767ea3c8cfeedab5a0ce1921d5842b149ea7c0be /app/assets/javascripts/notes.js
parent9ada13d343a4736275d2c026ee980abe5c5e5763 (diff)
Merge request widget redesign
Diffstat (limited to 'app/assets/javascripts/notes.js')
-rw-r--r--app/assets/javascripts/notes.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js
index 55391ebc089..d2e602a0763 100644
--- a/app/assets/javascripts/notes.js
+++ b/app/assets/javascripts/notes.js
@@ -276,7 +276,7 @@ const normalizeNewlines = function(str) {
var votesBlock;
if (noteEntity.commands_changes) {
if ('merge' in noteEntity.commands_changes) {
- $.get(mrRefreshWidgetUrl);
+ Notes.checkMergeRequestStatus();
}
if ('emoji_award' in noteEntity.commands_changes) {
@@ -424,6 +424,7 @@ const normalizeNewlines = function(str) {
}
gl.utils.localTimeAgo($('.js-timeago'), false);
+ Notes.checkMergeRequestStatus();
return this.updateNotesCount(1);
};
@@ -769,7 +770,8 @@ const normalizeNewlines = function(str) {
}
};
})(this));
- // Decrement the "Discussions" counter only once
+
+ Notes.checkMergeRequestStatus();
return this.updateNotesCount(-1);
};
@@ -1115,6 +1117,12 @@ const normalizeNewlines = function(str) {
return $form;
};
+ Notes.checkMergeRequestStatus = function() {
+ if (gl.utils.getPagePath(1) === 'merge_requests') {
+ gl.mrWidget.checkStatus();
+ }
+ };
+
Notes.animateAppendNote = function(noteHtml, $notesList) {
const $note = $(noteHtml);