The Open Source kanban (built with Meteor). Keep variable/table/field names camelCase. For translations, only add Pull Request changes to wekan/i18n/en.i18n.json , other translations are done at https://transifex.com/wekan/wekan only.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
wekan/client/components/sidebar/sidebarArchives.js

48 lines
1.0 KiB

BlazeComponent.extendComponent({
tabs() {
return [
{ name: TAPi18n.__('cards'), slug: 'cards' },
{ name: TAPi18n.__('lists'), slug: 'lists' },
];
},
archivedCards() {
return Cards.find({
archived: true,
boardId: Session.get('currentBoard'),
});
},
archivedLists() {
return Lists.find({
archived: true,
boardId: Session.get('currentBoard'),
});
},
cardIsInArchivedList() {
return this.currentData().list().archived;
},
onRendered() {
// XXX We should support dragging a card from the sidebar to the board
},
events() {
return [{
'click .js-restore-card'() {
const card = this.currentData();
card.restore();
},
'click .js-delete-card': Popup.afterConfirm('cardDelete', function() {
const cardId = this._id;
Cards.remove(cardId);
Popup.close();
}),
'click .js-restore-list'() {
const list = this.currentData();
list.restore();
},
}];
},
}).register('archivesSidebar');