mirror of
https://github.com/wekan/wekan.git
synced 2026-03-10 23:52:34 +01:00
Add two way binding of checklists
This commit is contained in:
parent
b2e175ba8c
commit
49c415f023
4 changed files with 37 additions and 13 deletions
|
|
@ -6,7 +6,7 @@ template(name="editCardSpentTime")
|
|||
input.js-time-field#time(type="number" step="0.01" name="time" value="{{card.getSpentTime}}" placeholder=timeFormat autofocus)
|
||||
label(for="overtime") {{_ 'overtime'}}
|
||||
a.js-toggle-overtime
|
||||
.materialCheckBox#overtime(class="{{#if card.getIsOvertime}}is-checked{{/if}}" name="overtime")
|
||||
.materialCheckBox#overtime(class="{{#if getIsOvertime}}is-checked{{/if}}" name="overtime")
|
||||
|
||||
if error.get
|
||||
.warning {{_ error.get}}
|
||||
|
|
|
|||
|
|
@ -64,9 +64,6 @@ BlazeComponent.extendComponent({
|
|||
showTime() {
|
||||
return this.data().getSpentTime();
|
||||
},
|
||||
isOvertime() {
|
||||
return this.data().getIsOvertime();
|
||||
},
|
||||
events() {
|
||||
return [{
|
||||
'click .js-edit-time': Popup.open('editCardSpentTime'),
|
||||
|
|
|
|||
|
|
@ -74,8 +74,10 @@ BlazeComponent.extendComponent({
|
|||
event.preventDefault();
|
||||
const textarea = this.find('textarea.js-add-checklist-item');
|
||||
const title = textarea.value.trim();
|
||||
const cardId = this.currentData().cardId;
|
||||
let cardId = this.currentData().cardId;
|
||||
const card = Cards.findOne(cardId);
|
||||
if (card.isImported())
|
||||
cardId = card.importedId;
|
||||
|
||||
if (title) {
|
||||
Checklists.insert({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue