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:
Diffstat (limited to 'app/assets/javascripts/boards/models/list.js')
-rw-r--r--app/assets/javascripts/boards/models/list.js14
1 files changed, 5 insertions, 9 deletions
diff --git a/app/assets/javascripts/boards/models/list.js b/app/assets/javascripts/boards/models/list.js
index 1edaf971afd..b3e56a34c28 100644
--- a/app/assets/javascripts/boards/models/list.js
+++ b/app/assets/javascripts/boards/models/list.js
@@ -1,4 +1,4 @@
-/* eslint-disable no-underscore-dangle, class-methods-use-this, consistent-return, no-shadow, no-param-reassign */
+/* eslint-disable no-underscore-dangle, class-methods-use-this, consistent-return, no-shadow */
import { __ } from '~/locale';
import ListLabel from './label';
@@ -45,7 +45,7 @@ class List {
const typeInfo = this.getTypeInfo(this.type);
this.preset = Boolean(typeInfo.isPreset);
this.isExpandable = Boolean(typeInfo.isExpandable);
- this.isExpanded = true;
+ this.isExpanded = !obj.collapsed;
this.page = 1;
this.loading = true;
this.loadingMore = false;
@@ -113,7 +113,8 @@ class List {
}
update() {
- gl.boardService.updateList(this.id, this.position).catch(() => {
+ const collapsed = !this.isExpanded;
+ return gl.boardService.updateList(this.id, this.position, collapsed).catch(() => {
// TODO: handle request error
});
}
@@ -259,12 +260,7 @@ class List {
}
onNewIssueResponse(issue, data) {
- issue.id = data.id;
- issue.iid = data.iid;
- issue.project = data.project;
- issue.path = data.real_path;
- issue.referencePath = data.reference_path;
- issue.assignableLabelsEndpoint = data.assignable_labels_endpoint;
+ issue.refreshData(data);
if (this.issuesSize > 1) {
const moveBeforeId = this.issues[1].id;