diff options
Diffstat (limited to 'app/assets/javascripts/boards/components')
3 files changed, 27 insertions, 3 deletions
diff --git a/app/assets/javascripts/boards/components/board.js.es6 b/app/assets/javascripts/boards/components/board.js.es6 index 1f3a417aecd..ff9bffafd99 100644 --- a/app/assets/javascripts/boards/components/board.js.es6 +++ b/app/assets/javascripts/boards/components/board.js.es6 @@ -45,7 +45,6 @@ group: 'boards', draggable: '.is-draggable', handle: '.js-board-handle', - filter: '.board-delete', onUpdate: function (e) { BoardsStore.moveList(e.oldIndex, e.newIndex); } diff --git a/app/assets/javascripts/boards/components/board_card.js.es6 b/app/assets/javascripts/boards/components/board_card.js.es6 new file mode 100644 index 00000000000..14191cb881b --- /dev/null +++ b/app/assets/javascripts/boards/components/board_card.js.es6 @@ -0,0 +1,25 @@ +(() => { + const BoardCard = Vue.extend({ + props: { + issue: Object, + issueLinkBase: String, + disabled: Boolean + }, + methods: { + filterByLabel: function (label, $event) { + const labelIndex = BoardsStore.state.filters['label_name'].indexOf(label.title); + // $($event.target).tooltip('hide'); + + if (labelIndex === -1) { + BoardsStore.state.filters['label_name'].push(label.title); + } else { + BoardsStore.state.filters['label_name'].splice(labelIndex, 1); + } + + BoardsStore.updateFiltersUrl(); + } + } + }); + + Vue.component('board-card', BoardCard); +})(); diff --git a/app/assets/javascripts/boards/components/board_delete.js.es6 b/app/assets/javascripts/boards/components/board_delete.js.es6 index b9afb5724f5..958d85cd326 100644 --- a/app/assets/javascripts/boards/components/board_delete.js.es6 +++ b/app/assets/javascripts/boards/components/board_delete.js.es6 @@ -1,14 +1,14 @@ (() => { const BoardDelete = Vue.extend({ props: { - boardId: Number + list: Object }, methods: { deleteBoard: function () { $(this.$el).tooltip('destroy'); if (confirm('Are you sure you want to delete this list?')) { - BoardsStore.removeList(this.boardId); + this.list.destroy(); } } } |