mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
26 lines
674 B
JavaScript
26 lines
674 B
JavaScript
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');
|