Remove the move and archive all cards of a list feature

This operation should now be handled using the multi-selection
feature, ie “select all cards” and then move them or click the
“archive selection” button. This new process add an extra click which
I consider reasonable enough for a relatively rare operation -- plus I
want to encourage mutli-selection usage.

Closes #390.
reviewable/pr438/r1
Maxime Quandalle 10 years ago
parent f9a60616df
commit 5bdf91bd05
  1. 9
      client/components/lists/listHeader.jade
  2. 19
      client/components/lists/listHeader.js
  3. 1
      client/components/sidebar/sidebarFilters.js
  4. 2
      i18n/en.i18n.json

@ -21,16 +21,11 @@ template(name="listActionPopup")
li: a.js-add-card {{_ 'add-card'}} li: a.js-add-card {{_ 'add-card'}}
if cards.count if cards.count
li: a.js-select-cards {{_ 'list-select-cards'}} li: a.js-select-cards {{_ 'list-select-cards'}}
li: a.js-move-cards {{_ 'list-move-cards'}}
li: a.js-archive-cards {{_ 'list-archive-cards'}}
hr hr
ul.pop-over-list ul.pop-over-list
li: a.js-import-card {{_ 'import-card'}} li: a.js-import-card {{_ 'import-card'}}
li: a.js-close-list {{_ 'archive-list'}} li: a.js-close-list {{_ 'archive-list'}}
template(name="listMoveCardsPopup")
+boardLists
template(name="boardLists") template(name="boardLists")
ul.pop-over-list ul.pop-over-list
each currentBoard.lists each currentBoard.lists
@ -39,7 +34,3 @@ template(name="boardLists")
a.disabled {{title}} ({{_ 'current'}}) a.disabled {{title}} ({{_ 'current'}})
else else
a.js-select-list= title a.js-select-list= title
template(name="listArchiveCardsPopup")
p {{_ 'list-archive-cards-pop'}}
input.js-confirm.negate.full(type="submit" value="{{_ 'archive-all'}}")

@ -34,28 +34,9 @@ Template.listActionPopup.events({
Popup.close(); Popup.close();
}, },
'click .js-import-card': Popup.open('listImportCard'), 'click .js-import-card': Popup.open('listImportCard'),
'click .js-move-cards': Popup.open('listMoveCards'),
'click .js-archive-cards': Popup.afterConfirm('listArchiveCards', function() {
this.allCards().forEach((card) => {
card.archive();
});
Popup.close();
}),
'click .js-close-list'(evt) { 'click .js-close-list'(evt) {
evt.preventDefault(); evt.preventDefault();
this.archive(); this.archive();
Popup.close(); Popup.close();
}, },
}); });
Template.listMoveCardsPopup.events({
'click .js-select-list'() {
const fromList = Template.parentData(2).data;
const toList = this._id;
fromList.allCards().forEach((card) => {
card.move(toList);
});
Popup.close();
},
});

@ -95,6 +95,7 @@ BlazeComponent.extendComponent({
}, },
'click .js-archive-selection'() { 'click .js-archive-selection'() {
mutateSelectedCards('archive'); mutateSelectedCards('archive');
EscapeActions.executeUpTo('multiselection');
}, },
}]; }];
}, },

@ -183,9 +183,7 @@
"list-move-cards": "Move all cards in this list", "list-move-cards": "Move all cards in this list",
"list-select-cards": "Select all cards in this list", "list-select-cards": "Select all cards in this list",
"listActionPopup-title": "List Actions", "listActionPopup-title": "List Actions",
"listArchiveCardsPopup-title": "Archive All Cards in this List?",
"listImportCardPopup-title": "Import a Trello card", "listImportCardPopup-title": "Import a Trello card",
"listMoveCardsPopup-title": "Move All Cards in List",
"lists": "Lists", "lists": "Lists",
"log-out": "Log Out", "log-out": "Log Out",
"loginPopup-title": "Log In", "loginPopup-title": "Log In",

Loading…
Cancel
Save