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:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-21 21:06:26 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-21 21:06:26 +0300
commit7aada820a908502f40080274fb181281afd44615 (patch)
treee82fbe264cb5d410fce7acea0a7fd74a962952ba /app/assets/javascripts/boards
parentb5ad06174bb1de39438c90847abb86ac6988e944 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/boards')
-rw-r--r--app/assets/javascripts/boards/models/list.js26
1 files changed, 12 insertions, 14 deletions
diff --git a/app/assets/javascripts/boards/models/list.js b/app/assets/javascripts/boards/models/list.js
index 34e0d0a83ea..f6a1718155d 100644
--- a/app/assets/javascripts/boards/models/list.js
+++ b/app/assets/javascripts/boards/models/list.js
@@ -93,7 +93,7 @@ class List {
entityType = 'milestone_id';
}
- return gl.boardService
+ return boardsStore
.createList(entity.id, entityType)
.then(res => res.data)
.then(data => {
@@ -111,14 +111,14 @@ class List {
boardsStore.state.lists.splice(index, 1);
boardsStore.updateNewListDropdown(this.id);
- gl.boardService.destroyList(this.id).catch(() => {
+ boardsStore.destroyList(this.id).catch(() => {
// TODO: handle request error
});
}
update() {
const collapsed = !this.isExpanded;
- return gl.boardService.updateList(this.id, this.position, collapsed).catch(() => {
+ return boardsStore.updateList(this.id, this.position, collapsed).catch(() => {
// TODO: handle request error
});
}
@@ -147,7 +147,7 @@ class List {
this.loading = true;
}
- return gl.boardService
+ return boardsStore
.getIssuesForList(this.id, data)
.then(res => res.data)
.then(data => {
@@ -168,7 +168,7 @@ class List {
this.addIssue(issue, null, 0);
this.issuesSize += 1;
- return gl.boardService
+ return boardsStore
.newIssue(this.id, issue)
.then(res => res.data)
.then(data => this.onNewIssueResponse(issue, data));
@@ -276,7 +276,7 @@ class List {
this.issues.splice(oldIndex, 1);
this.issues.splice(newIndex, 0, issue);
- gl.boardService.moveIssue(issue.id, null, null, moveBeforeId, moveAfterId).catch(() => {
+ boardsStore.moveIssue(issue.id, null, null, moveBeforeId, moveAfterId).catch(() => {
// TODO: handle request error
});
}
@@ -287,7 +287,7 @@ class List {
});
this.issues.splice(newIndex, 0, ...issues);
- gl.boardService
+ boardsStore
.moveMultipleIssues({
ids: issues.map(issue => issue.id),
fromListId: null,
@@ -299,15 +299,13 @@ class List {
}
updateIssueLabel(issue, listFrom, moveBeforeId, moveAfterId) {
- gl.boardService
- .moveIssue(issue.id, listFrom.id, this.id, moveBeforeId, moveAfterId)
- .catch(() => {
- // TODO: handle request error
- });
+ boardsStore.moveIssue(issue.id, listFrom.id, this.id, moveBeforeId, moveAfterId).catch(() => {
+ // TODO: handle request error
+ });
}
updateMultipleIssues(issues, listFrom, moveBeforeId, moveAfterId) {
- gl.boardService
+ boardsStore
.moveMultipleIssues({
ids: issues.map(issue => issue.id),
fromListId: listFrom.id,
@@ -359,7 +357,7 @@ class List {
if (this.issuesSize > 1) {
const moveBeforeId = this.issues[1].id;
- gl.boardService.moveIssue(issue.id, null, null, null, moveBeforeId);
+ boardsStore.moveIssue(issue.id, null, null, null, moveBeforeId);
}
}
}