mirror of
https://github.com/wekan/wekan.git
synced 2025-04-20 12:07:11 -04:00
Add remaining of checklist feature code
This commit is contained in:
parent
1cf9b1be4e
commit
335b91f0a4
2 changed files with 17 additions and 2 deletions
|
@ -11,7 +11,7 @@ template(name="checklists")
|
|||
| {{_ 'add-checklist'}}...
|
||||
|
||||
template(name="checklistDetail")
|
||||
+inlinedForm(classNames="js-edit-checklist-title")
|
||||
+inlinedForm(classNames="js-edit-checklist-title" checklist = checklist)
|
||||
+editChecklistItemForm(checklist = checklist)
|
||||
else
|
||||
.checklist-title
|
||||
|
@ -43,7 +43,7 @@ template(name="editChecklistItemForm")
|
|||
template(name="checklistItems")
|
||||
.checklist-items
|
||||
each item in checklist.items
|
||||
+inlinedForm(classNames="js-edit-checklist-item")
|
||||
+inlinedForm(classNames="js-edit-checklist-item" item = item checklist = checklist)
|
||||
+editChecklistItemForm(type = 'item' item = item checklist = checklist)
|
||||
else
|
||||
+itemDetail(item = item checklist = checklist)
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue