Fix problems highlighted by Codacy/PR Quality Review

This commit is contained in:
RJevnikar 2018-06-05 21:21:14 +00:00
parent 3ce3fa74b3
commit 78b9436f38
4 changed files with 13 additions and 2 deletions

View file

@ -17,6 +17,12 @@ Template.boardMenuPopup.events({
// confirm that the board was successfully archived.
FlowRouter.go('home');
}),
'click .js-delete-board': Popup.afterConfirm('deleteBoard', function() {
const currentBoard = Boards.findOne(Session.get('currentBoard'));
Popup.close();
Boards.remove(currentBoard._id);
FlowRouter.go('home');
}),
'click .js-outgoing-webhooks': Popup.open('outgoingWebhooks'),
'click .js-import-board': Popup.open('chooseBoardSource'),
});