boardArchive.js 534 B

123456789101112131415161718192021222324252627
  1. Template.boardListHeaderBar.events({
  2. 'click .js-open-archived-board'() {
  3. Modal.open('archivedBoards');
  4. },
  5. });
  6. BlazeComponent.extendComponent({
  7. onCreated() {
  8. this.subscribe('archivedBoards');
  9. },
  10. archivedBoards() {
  11. return Boards.find({ archived: true }, {
  12. sort: ['title'],
  13. });
  14. },
  15. events() {
  16. return [{
  17. 'click .js-restore-board'() {
  18. const board = this.currentData();
  19. board.restore();
  20. Utils.goBoardId(board._id);
  21. },
  22. }];
  23. },
  24. }).register('archivedBoards');