Commit 9350de6f authored by Phil Hughes's avatar Phil Hughes

Gets issues after the list is saved to the DB

Fixes issue with clipboard.js throwing an error
parent 6f6746b4
...@@ -4,13 +4,14 @@ class List { ...@@ -4,13 +4,14 @@ class List {
this.position = obj.position; this.position = obj.position;
this.title = obj.title; this.title = obj.title;
this.type = obj.list_type; this.type = obj.list_type;
this.loading = true;
this.issues = []; this.issues = [];
if (obj.label) { if (obj.label) {
this.label = new Label(obj.label); this.label = new Label(obj.label);
} }
if (this.type !== 'blank') { if (this.type !== 'blank' && this.id) {
this.getIssues(); this.getIssues();
} }
} }
...@@ -23,6 +24,8 @@ class List { ...@@ -23,6 +24,8 @@ class List {
this.id = data.id; this.id = data.id;
this.type = data.list_type; this.type = data.list_type;
this.position = data.position; this.position = data.position;
this.getIssues();
}); });
} }
...@@ -42,7 +45,7 @@ class List { ...@@ -42,7 +45,7 @@ class List {
getIssues (filter = {}) { getIssues (filter = {}) {
this.loading = true; this.loading = true;
gl.boardService.getIssuesForList(this.id, filter) gl.boardService.getIssuesForList(this.id, filter)
.then((resp) => { .then((resp) => {
const data = resp.json(); const data = resp.json();
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
} }
}, },
removeBlankState: function () { removeBlankState: function () {
if ($.cookie('issue_board_welcome_hidden') === 'true') return;
this.removeList('blank'); this.removeList('blank');
$.cookie('issue_board_welcome_hidden', 'true', { $.cookie('issue_board_welcome_hidden', 'true', {
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
$(function() { $(function() {
var clipboard; var clipboard;
if ($('body').attr('data-page') !== 'projects:boards:index') { if ($('body').attr('data-page') !== 'projects:boards:show') {
clipboard = new Clipboard('[data-clipboard-target], [data-clipboard-text]'); clipboard = new Clipboard('[data-clipboard-target], [data-clipboard-text]');
clipboard.on('success', genericSuccess); clipboard.on('success', genericSuccess);
return clipboard.on('error', genericError); return clipboard.on('error', genericError);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment