|
@@ -44,19 +44,67 @@ BlazeComponent.extendComponent({
|
|
card.restore();
|
|
card.restore();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ 'click .js-restore-all-cards'() {
|
|
|
|
+ this.archivedCards().forEach((card) => {
|
|
|
|
+ if(card.canBeRestored()){
|
|
|
|
+ card.restore();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
'click .js-delete-card': Popup.afterConfirm('cardDelete', function() {
|
|
'click .js-delete-card': Popup.afterConfirm('cardDelete', function() {
|
|
const cardId = this._id;
|
|
const cardId = this._id;
|
|
Cards.remove(cardId);
|
|
Cards.remove(cardId);
|
|
Popup.close();
|
|
Popup.close();
|
|
}),
|
|
}),
|
|
|
|
+ 'click .js-delete-all-cards': Popup.afterConfirm('cardDelete', () => {
|
|
|
|
+ this.archivedCards().forEach((card) => {
|
|
|
|
+ Cards.remove(card._id);
|
|
|
|
+ });
|
|
|
|
+ Popup.close();
|
|
|
|
+ }),
|
|
|
|
+
|
|
'click .js-restore-list'() {
|
|
'click .js-restore-list'() {
|
|
const list = this.currentData();
|
|
const list = this.currentData();
|
|
list.restore();
|
|
list.restore();
|
|
},
|
|
},
|
|
|
|
+ 'click .js-restore-all-lists'() {
|
|
|
|
+ this.archivedLists().forEach((list) => {
|
|
|
|
+ list.restore();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ 'click .js-delete-list': Popup.afterConfirm('listDelete', function() {
|
|
|
|
+ this.remove();
|
|
|
|
+ Popup.close();
|
|
|
|
+ }),
|
|
|
|
+ 'click .js-delete-all-lists': Popup.afterConfirm('listDelete', () => {
|
|
|
|
+ this.archivedLists().forEach((list) => {
|
|
|
|
+ list.remove();
|
|
|
|
+ });
|
|
|
|
+ Popup.close();
|
|
|
|
+ }),
|
|
|
|
+
|
|
'click .js-restore-swimlane'() {
|
|
'click .js-restore-swimlane'() {
|
|
const swimlane = this.currentData();
|
|
const swimlane = this.currentData();
|
|
swimlane.restore();
|
|
swimlane.restore();
|
|
},
|
|
},
|
|
|
|
+ 'click .js-restore-all-swimlanes'() {
|
|
|
|
+ this.archivedSwimlanes().forEach((swimlane) => {
|
|
|
|
+ swimlane.restore();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ 'click .js-delete-swimlane': Popup.afterConfirm('swimlaneDelete', function() {
|
|
|
|
+ this.remove();
|
|
|
|
+ Popup.close();
|
|
|
|
+ }),
|
|
|
|
+ 'click .js-delete-all-swimlanes': Popup.afterConfirm('swimlaneDelete', () => {
|
|
|
|
+ this.archivedSwimlanes().forEach((swimlane) => {
|
|
|
|
+ swimlane.remove();
|
|
|
|
+ });
|
|
|
|
+ Popup.close();
|
|
|
|
+ }),
|
|
}];
|
|
}];
|
|
},
|
|
},
|
|
}).register('archivesSidebar');
|
|
}).register('archivesSidebar');
|