summaryrefslogtreecommitdiffstats
path: root/client/components/sidebar/sidebarArchives.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-06-29 08:38:52 -0400
committerLauri Ojansivu <x@xet7.org>2019-06-29 08:38:52 -0400
commit40b782788afdf2d1cf5ecd9cf157526946f322c4 (patch)
treeb0aa59515089e84d86449dc246a4c0efed0253e9 /client/components/sidebar/sidebarArchives.js
parent100288b3e1bce882ab9923a5bff7b5f620f33ee8 (diff)
parent45163e2d2db3eb7c8b3edbdc133a9ea7e0594c5a (diff)
downloadwekan-40b782788afdf2d1cf5ecd9cf157526946f322c4.tar.gz
wekan-40b782788afdf2d1cf5ecd9cf157526946f322c4.tar.bz2
wekan-40b782788afdf2d1cf5ecd9cf157526946f322c4.zip
Merge branch 'justinr1234-linting' into meteor-1.8
Diffstat (limited to 'client/components/sidebar/sidebarArchives.js')
-rw-r--r--client/components/sidebar/sidebarArchives.js133
1 files changed, 70 insertions, 63 deletions
diff --git a/client/components/sidebar/sidebarArchives.js b/client/components/sidebar/sidebarArchives.js
index 546d7e1a..53fc29b9 100644
--- a/client/components/sidebar/sidebarArchives.js
+++ b/client/components/sidebar/sidebarArchives.js
@@ -10,12 +10,11 @@ BlazeComponent.extendComponent({
// unfortunatly, Blaze doesn't have this notion.
this.autorun(() => {
const currentBoardId = Session.get('currentBoard');
- if (!currentBoardId)
- return;
+ if (!currentBoardId) return;
const handle = subManager.subscribe('board', currentBoardId, true);
Tracker.nonreactive(() => {
Tracker.autorun(() => {
- this.isArchiveReady.set( handle.ready() );
+ this.isArchiveReady.set(handle.ready());
});
});
});
@@ -59,74 +58,82 @@ BlazeComponent.extendComponent({
},
events() {
- return [{
- 'click .js-restore-card'() {
- const card = this.currentData();
- if(card.canBeRestored()){
- card.restore();
- }
- },
- 'click .js-restore-all-cards'() {
- this.archivedCards().forEach((card) => {
- if(card.canBeRestored()){
+ return [
+ {
+ 'click .js-restore-card'() {
+ const card = this.currentData();
+ if (card.canBeRestored()) {
card.restore();
}
- });
- },
+ },
+ 'click .js-restore-all-cards'() {
+ this.archivedCards().forEach(card => {
+ if (card.canBeRestored()) {
+ card.restore();
+ }
+ });
+ },
- 'click .js-delete-card': Popup.afterConfirm('cardDelete', function() {
- const cardId = this._id;
- Cards.remove(cardId);
- Popup.close();
- }),
- 'click .js-delete-all-cards': Popup.afterConfirm('cardDelete', () => {
- this.archivedCards().forEach((card) => {
- Cards.remove(card._id);
- });
- Popup.close();
- }),
+ 'click .js-delete-card': Popup.afterConfirm('cardDelete', function() {
+ const cardId = this._id;
+ Cards.remove(cardId);
+ Popup.close();
+ }),
+ 'click .js-delete-all-cards': Popup.afterConfirm('cardDelete', () => {
+ this.archivedCards().forEach(card => {
+ Cards.remove(card._id);
+ });
+ Popup.close();
+ }),
- 'click .js-restore-list'() {
- const list = this.currentData();
- list.restore();
- },
- 'click .js-restore-all-lists'() {
- this.archivedLists().forEach((list) => {
+ 'click .js-restore-list'() {
+ const list = this.currentData();
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-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'() {
- const swimlane = this.currentData();
- swimlane.restore();
- },
- 'click .js-restore-all-swimlanes'() {
- this.archivedSwimlanes().forEach((swimlane) => {
+ 'click .js-restore-swimlane'() {
+ const swimlane = this.currentData();
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();
- }),
- }];
+ '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');