mirror of
https://github.com/wekan/wekan.git
synced 2026-01-02 23:58:49 +01:00
Replace the old (and broken) jshint + jscsrc by eslint and configure it to support some of the ES6 features. The command `eslint` currently has one error which is a bug that was discovered by its static analysis and should be fixed (usage of a dead object).
35 lines
661 B
JavaScript
35 lines
661 B
JavaScript
Template.headerTitle.events({
|
|
'click .js-open-archived-board'() {
|
|
Modal.open('archivedBoards');
|
|
},
|
|
});
|
|
|
|
BlazeComponent.extendComponent({
|
|
template() {
|
|
return 'archivedBoards';
|
|
},
|
|
|
|
onCreated() {
|
|
this.subscribe('archivedBoards');
|
|
},
|
|
|
|
archivedBoards() {
|
|
return Boards.find({ archived: true }, {
|
|
sort: ['title'],
|
|
});
|
|
},
|
|
|
|
events() {
|
|
return [{
|
|
'click .js-restore-board'() {
|
|
const boardId = this.currentData()._id;
|
|
Boards.update(boardId, {
|
|
$set: {
|
|
archived: false,
|
|
},
|
|
});
|
|
Utils.goBoardId(boardId);
|
|
},
|
|
}];
|
|
},
|
|
}).register('archivedBoards');
|