mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Completed rules
This commit is contained in:
parent
3b62b5ec5d
commit
1f5f429fc4
21 changed files with 551 additions and 157 deletions
|
@ -47,6 +47,18 @@ Checklists.helpers({
|
|||
isFinished() {
|
||||
return 0 !== this.itemCount() && this.itemCount() === this.finishedCount();
|
||||
},
|
||||
checkAllItems(){
|
||||
const checkItems = ChecklistItems.find({checklistId: this._id});
|
||||
checkItems.forEach(function(item){
|
||||
item.check();
|
||||
});
|
||||
},
|
||||
uncheckAllItems(){
|
||||
const checkItems = ChecklistItems.find({checklistId: this._id});
|
||||
checkItems.forEach(function(item){
|
||||
item.uncheck();
|
||||
});
|
||||
},
|
||||
itemIndex(itemId) {
|
||||
const items = self.findOne({_id : this._id}).items;
|
||||
return _.pluck(items, '_id').indexOf(itemId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue