Confirm Archive Card.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2021-10-04 17:51:07 +03:00
parent 22cbd5097b
commit 6c3fcdcc4c
4 changed files with 14 additions and 5 deletions

View file

@ -826,6 +826,12 @@ template(name="cardDeletePopup")
p {{_ "card-delete-suggest-archive"}}
button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
template(name="cardArchivePopup")
p {{_ "card-archive-pop"}}
unless archived
p {{_ "card-archive-suggest-cancel"}}
button.js-confirm.negate.full(type="submit") {{_ 'archive'}}
template(name="deleteVotePopup")
p {{_ "vote-delete-pop"}}
button.js-confirm.negate.full(type="submit") {{_ 'delete'}}

View file

@ -663,11 +663,11 @@ Template.cardDetailsActionsPopup.events({
);
this.move(this.boardId, this.swimlaneId, this.listId, maxOrder + 1);
},
'click .js-archive'(event) {
event.preventDefault();
this.archive();
'click .js-archive': Popup.afterConfirm('cardArchive', function () {
Popup.close();
},
this.archive();
Utils.goBoardId(this.boardId);
}),
'click .js-more': Popup.open('cardMore'),
'click .js-toggle-watch-card'() {
const currentCard = this;

View file

@ -159,6 +159,8 @@
"card-delete-notice": "Deleting is permanent. You will lose all actions associated with this card.",
"card-delete-pop": "All actions will be removed from the activity feed and you won't be able to re-open the card. There is no undo.",
"card-delete-suggest-archive": "You can move a card to Archive to remove it from the board and preserve the activity.",
"card-archive-pop": "Card will not be visible at this list after archiving card.",
"card-archive-suggest-cancel": "You can later restore card from Archive.",
"card-due": "Due",
"card-due-on": "Due on",
"card-spent": "Spent Time",
@ -207,6 +209,7 @@
"deletePokerPopup-title": "Delete planning poker?",
"poker-delete-pop": "Deleting is permanent. You will lose all actions associated with this planning poker.",
"cardDeletePopup-title": "Delete Card?",
"cardArchivePopup-title": "Archive Card?",
"cardDetailsActionsPopup-title": "Card Actions",
"cardLabelsPopup-title": "Labels",
"cardMembersPopup-title": "Members",

View file

@ -48,7 +48,7 @@ RulesHelper = {
}
}
let matchesList = [value, '*'];
if (field === 'cardTitle') {
if ((field === 'cardTitle') && (value !== undefined)) {
matchesList = value.split(/\W/).concat(matchesList);
}
matchingMap[field] = {