mirror of
https://github.com/wekan/wekan.git
synced 2026-01-06 01:28:49 +01:00
Use checklist checkbox for the custom field checkbox
This commit is contained in:
parent
b9338a78f4
commit
f476143e92
4 changed files with 18 additions and 28 deletions
|
|
@ -86,18 +86,14 @@ CardCustomField.register('cardCustomField');
|
|||
super.onCreated();
|
||||
}
|
||||
|
||||
isNull() {
|
||||
return !this.data().value;
|
||||
toggleItem() {
|
||||
this.card.setCustomField(this.customFieldId, !this.data().value);
|
||||
}
|
||||
|
||||
events() {
|
||||
return [
|
||||
{
|
||||
'submit .js-card-customfield-checkbox'(event) {
|
||||
event.preventDefault();
|
||||
const value = this.find('input').checked;
|
||||
this.card.setCustomField(this.customFieldId, value);
|
||||
},
|
||||
'click .js-checklist-item .check-box-container': this.toggleItem,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue