diff options
author | Phil Hughes <me@iamphill.com> | 2016-08-05 16:36:12 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-08-17 19:12:47 +0300 |
commit | 9350de6f15271dfeedff4e05ce266f0628eaf1f9 (patch) | |
tree | 908782e313158baef97e562a783b78162e849662 /app/assets/javascripts | |
parent | 6f6746b43140a4c048c39d931ccb4de0d769b233 (diff) |
Gets issues after the list is saved to the DB
Fixes issue with clipboard.js throwing an error
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/boards/models/list.js.es6 | 7 | ||||
-rw-r--r-- | app/assets/javascripts/boards/stores/boards_store.js.es6 | 1 | ||||
-rw-r--r-- | app/assets/javascripts/copy_to_clipboard.js | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/app/assets/javascripts/boards/models/list.js.es6 b/app/assets/javascripts/boards/models/list.js.es6 index fc63da5429a..4639491f4aa 100644 --- a/app/assets/javascripts/boards/models/list.js.es6 +++ b/app/assets/javascripts/boards/models/list.js.es6 @@ -4,13 +4,14 @@ class List { this.position = obj.position; this.title = obj.title; this.type = obj.list_type; + this.loading = true; this.issues = []; if (obj.label) { this.label = new Label(obj.label); } - if (this.type !== 'blank') { + if (this.type !== 'blank' && this.id) { this.getIssues(); } } @@ -23,6 +24,8 @@ class List { this.id = data.id; this.type = data.list_type; this.position = data.position; + + this.getIssues(); }); } @@ -42,7 +45,7 @@ class List { getIssues (filter = {}) { this.loading = true; - + gl.boardService.getIssuesForList(this.id, filter) .then((resp) => { const data = resp.json(); diff --git a/app/assets/javascripts/boards/stores/boards_store.js.es6 b/app/assets/javascripts/boards/stores/boards_store.js.es6 index 4d430f2a77b..b1edd8d2480 100644 --- a/app/assets/javascripts/boards/stores/boards_store.js.es6 +++ b/app/assets/javascripts/boards/stores/boards_store.js.es6 @@ -59,6 +59,7 @@ } }, removeBlankState: function () { + if ($.cookie('issue_board_welcome_hidden') === 'true') return; this.removeList('blank'); $.cookie('issue_board_welcome_hidden', 'true', { diff --git a/app/assets/javascripts/copy_to_clipboard.js b/app/assets/javascripts/copy_to_clipboard.js index d11d657eba3..3b79331ac6e 100644 --- a/app/assets/javascripts/copy_to_clipboard.js +++ b/app/assets/javascripts/copy_to_clipboard.js @@ -35,7 +35,7 @@ $(function() { 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.on('success', genericSuccess); return clipboard.on('error', genericError); |