summaryrefslogtreecommitdiffstats
path: root/client/components/cards/checklists.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2017-02-03 01:49:58 +0200
committerLauri Ojansivu <x@xet7.org>2017-02-03 01:49:58 +0200
commit335b91f0a48c2c64a96a74e8a2b9866bf590714a (patch)
tree70bb050626b491155f393db2ff3f5546d6a6ae2c /client/components/cards/checklists.js
parent1cf9b1be4e11e276e344088a63e5e0986da70250 (diff)
downloadwekan-335b91f0a48c2c64a96a74e8a2b9866bf590714a.tar.gz
wekan-335b91f0a48c2c64a96a74e8a2b9866bf590714a.tar.bz2
wekan-335b91f0a48c2c64a96a74e8a2b9866bf590714a.zip
Add remaining of checklist feature code
Diffstat (limited to 'client/components/cards/checklists.js')
-rw-r--r--client/components/cards/checklists.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/client/components/cards/checklists.js b/client/components/cards/checklists.js
index b8113a54..5dac7bd3 100644
--- a/client/components/cards/checklists.js
+++ b/client/components/cards/checklists.js
@@ -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');