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:
authorPhil Hughes <me@iamphill.com>2016-08-01 12:06:31 +0300
committerPhil Hughes <me@iamphill.com>2016-08-01 12:06:31 +0300
commitc51cbc1f2f3b590c4f38198dd886c4e372b4e476 (patch)
tree5c4b1e26c68b810fa46bf42d200bf2f30e452f10 /app/assets/javascripts/diff_notes/services/resolve.js.es6
parentdb8c4bce381a137d7afea99d39ffd4d5e70b5580 (diff)
Updated issues with jump tp button
Fixed styling bugs
Diffstat (limited to 'app/assets/javascripts/diff_notes/services/resolve.js.es6')
-rw-r--r--app/assets/javascripts/diff_notes/services/resolve.js.es622
1 files changed, 15 insertions, 7 deletions
diff --git a/app/assets/javascripts/diff_notes/services/resolve.js.es6 b/app/assets/javascripts/diff_notes/services/resolve.js.es6
index d15959c0909..a1ddd260c65 100644
--- a/app/assets/javascripts/diff_notes/services/resolve.js.es6
+++ b/app/assets/javascripts/diff_notes/services/resolve.js.es6
@@ -11,14 +11,18 @@
resolve(namespace, noteId) {
this.setCSRF();
- Vue.http.options.root = `/${namespace}`;
+ if (Vue.http.options.root !== `/${namespace}`) {
+ Vue.http.options.root = `/${namespace}`;
+ }
return this.noteResource.save({ noteId }, {});
}
unresolve(namespace, noteId) {
this.setCSRF();
- Vue.http.options.root = `/${namespace}`;
+ if (Vue.http.options.root !== `/${namespace}`) {
+ Vue.http.options.root = `/${namespace}`;
+ }
return this.noteResource.delete({ noteId }, {});
}
@@ -37,18 +41,22 @@
const discussion = CommentsStore.state[discussionId];
this.setCSRF();
- Vue.http.options.root = `/${namespace}`;
+
+ if (Vue.http.options.root !== `/${namespace}`) {
+ Vue.http.options.root = `/${namespace}`;
+ }
discussion.loading = true;
+ console.log(discussion.loading);
return this.discussionResource.save({
mergeRequestId,
discussionId
}, {}).then((response) => {
if (response.status === 200) {
- const data = response.data;
- const user = data ? data.resolved_by : null;
- discussion.resolveAllNotes(user);
+ const data = response.json();
+ const resolved_by = data ? data.resolved_by : null;
+ discussion.resolveAllNotes(resolved_by);
discussion.loading = false;
this.updateUpdatedHtml(discussionId, data);
@@ -71,7 +79,7 @@
discussionId
}, {}).then((response) => {
if (response.status === 200) {
- const data = response.data;
+ const data = response.json();
discussion.unResolveAllNotes();
discussion.loading = false;