mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Checklist, hide all checklist items possible, regardless if the checklist item is finished or not
This commit is contained in:
parent
bb17feaa17
commit
0783b733b0
4 changed files with 36 additions and 3 deletions
|
@ -70,6 +70,13 @@ Checklists.attachSchema(
|
|||
type: Boolean,
|
||||
optional: true,
|
||||
},
|
||||
hideAllChecklistItems: {
|
||||
/**
|
||||
* hide all checklist items ?
|
||||
*/
|
||||
type: Boolean,
|
||||
optional: true,
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
|
@ -123,7 +130,11 @@ Checklists.helpers({
|
|||
return ret;
|
||||
},
|
||||
isFinished() {
|
||||
return 0 !== this.itemCount() && this.itemCount() === this.finishedCount();
|
||||
let ret = this.hideAllChecklistItems;
|
||||
if (!ret) {
|
||||
ret = 0 !== this.itemCount() && this.itemCount() === this.finishedCount();
|
||||
}
|
||||
return ret;
|
||||
},
|
||||
showChecklist(hideFinishedChecklistIfItemsAreHidden) {
|
||||
let ret = true;
|
||||
|
@ -212,6 +223,13 @@ Checklists.mutations({
|
|||
}
|
||||
};
|
||||
},
|
||||
toggleHideAllChecklistItems() {
|
||||
return {
|
||||
$set: {
|
||||
hideAllChecklistItems: !this.hideAllChecklistItems,
|
||||
}
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
if (Meteor.isServer) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue