Add remaining of checklist feature code

This commit is contained in:
Lauri Ojansivu 2017-02-03 01:49:58 +02:00
parent 1cf9b1be4e
commit 335b91f0a4
2 changed files with 17 additions and 2 deletions

View file

@ -72,3 +72,18 @@ BlazeComponent.extendComponent({
}];
},
}).register('checklists');
BlazeComponent.extendComponent({
toggleItem() {
const checklist = this.currentData().checklist;
const item = this.currentData().item;
if (checklist && item && item._id) {
checklist.toggleItem(item._id);
}
},
events() {
return [{
'click .item .check-box': this.toggleItem,
}];
},
}).register('itemDetail');