blob: b106f705fa931288e77f993821cbd42af68bb68f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
BlazeComponent.extendComponent({
template: function() {
return 'archivesSidebar';
},
archivedCards: function() {
return Cards.find({archived: true});
},
onRendered: function() {
//XXX We should support dragging a card from the sidebar to the board
},
events: function() {
return [{
'click .js-restore': function() {
var cardId = this.currentData()._id;
Cards.update(cardId, {$set: {archived: false}});
},
'click .js-delete': Popup.afterConfirm('cardDelete', function() {
var cardId = this._id;
Cards.remove(cardId);
Popup.close();
})
}];
}
}).register('archivesSidebar');
|