Opened card Checklist menu: Hide finished tasks. Show Checklist at Minicard.

Thanks to C0rn3j and xet7 !

Fixes #6019,
fixes #5567,
fixes #2984
This commit is contained in:
Lauri Ojansivu 2025-12-29 21:42:19 +02:00
parent cf62807ad5
commit fbfde81bc8
13 changed files with 312 additions and 161 deletions

View file

@ -230,10 +230,6 @@ BlazeComponent.extendComponent({
'focus .js-add-checklist-item': this.focusChecklistItem,
// add and delete checklist / checklist-item
'click .js-open-inlined-form': this.closeAllInlinedForms,
'click #toggleHideFinishedChecklist'(event) {
event.preventDefault();
this.data().card.toggleHideFinishedChecklist();
},
keydown: this.pressKey,
},
];
@ -335,6 +331,12 @@ BlazeComponent.extendComponent({
this.data().checklist.toggleHideAllChecklistItems();
Popup.back();
},
'click .js-toggle-show-checklist-at-minicard'(event) {
event.preventDefault();
const checklist = this.data().checklist;
checklist.toggleShowChecklistAtMinicard();
Popup.back();
},
}
]
}
@ -388,7 +390,12 @@ BlazeComponent.extendComponent({
}
setDone(cardId, options) {
ReactiveCache.getCurrentUser().setMoveChecklistDialogOption(this.currentBoardId, options);
this.data().checklist.move(cardId);
const checklist = this.data().checklist;
Meteor.call('moveChecklist', checklist._id, cardId, (error) => {
if (error) {
console.error('Error moving checklist:', error);
}
});
}
}).register('moveChecklistPopup');