diff options
author | Valery Sizov <valery@gitlab.com> | 2017-05-23 14:10:16 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2017-05-23 14:10:16 +0300 |
commit | 2158beddeed688fee701a00d21752dd253866548 (patch) | |
tree | a615157f9ada6da50717b8da69ec45c3f06b378d /app/assets/javascripts/boards/models/list.js | |
parent | 719e30c53d1d0690fa9e96fa488047e0a68d00a2 (diff) | |
parent | 12e77890c29c0451ac7a1a59727df4d56bc9741b (diff) | |
download | gitlab-ce-2158beddeed688fee701a00d21752dd253866548.tar.gz |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into 17489-hide-code-from-guests
Diffstat (limited to 'app/assets/javascripts/boards/models/list.js')
-rw-r--r-- | app/assets/javascripts/boards/models/list.js | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/app/assets/javascripts/boards/models/list.js b/app/assets/javascripts/boards/models/list.js index bd2f62bcc1a..90561d0f7a8 100644 --- a/app/assets/javascripts/boards/models/list.js +++ b/app/assets/javascripts/boards/models/list.js @@ -25,7 +25,9 @@ class List { } if (this.type !== 'blank' && this.id) { - this.getIssues(); + this.getIssues().catch(() => { + // TODO: handle request error + }); } } @@ -52,11 +54,17 @@ class List { gl.issueBoards.BoardsStore.state.lists.splice(index, 1); gl.issueBoards.BoardsStore.updateNewListDropdown(this.id); - gl.boardService.destroyList(this.id); + gl.boardService.destroyList(this.id) + .catch(() => { + // TODO: handle request error + }); } update () { - gl.boardService.updateList(this.id, this.position); + gl.boardService.updateList(this.id, this.position) + .catch(() => { + // TODO: handle request error + }); } nextPage () { @@ -146,11 +154,17 @@ class List { this.issues.splice(oldIndex, 1); this.issues.splice(newIndex, 0, issue); - gl.boardService.moveIssue(issue.id, null, null, moveBeforeIid, moveAfterIid); + gl.boardService.moveIssue(issue.id, null, null, moveBeforeIid, moveAfterIid) + .catch(() => { + // TODO: handle request error + }); } updateIssueLabel(issue, listFrom, moveBeforeIid, moveAfterIid) { - gl.boardService.moveIssue(issue.id, listFrom.id, this.id, moveBeforeIid, moveAfterIid); + gl.boardService.moveIssue(issue.id, listFrom.id, this.id, moveBeforeIid, moveAfterIid) + .catch(() => { + // TODO: handle request error + }); } findIssue (id) { |