mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 16:30:13 +01:00
Improve input of checklist
When finished input of checklist item title, open new checklist item.
This commit is contained in:
parent
9ccffe5342
commit
99d6bd4415
2 changed files with 8 additions and 1 deletions
|
|
@ -53,7 +53,7 @@ template(name="checklistItems")
|
||||||
else
|
else
|
||||||
+itemDetail(item = item checklist = checklist)
|
+itemDetail(item = item checklist = checklist)
|
||||||
if canModifyCard
|
if canModifyCard
|
||||||
+inlinedForm(classNames="js-add-checklist-item" checklist = checklist)
|
+inlinedForm(autoclose=false classNames="js-add-checklist-item" checklist = checklist)
|
||||||
+addChecklistItemForm
|
+addChecklistItemForm
|
||||||
else
|
else
|
||||||
a.add-checklist-item.js-open-inlined-form
|
a.add-checklist-item.js-open-inlined-form
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,9 @@ BlazeComponent.extendComponent({
|
||||||
cardId,
|
cardId,
|
||||||
title,
|
title,
|
||||||
});
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$('.add-checklist-item').last().click();
|
||||||
|
}, 100);
|
||||||
},
|
},
|
||||||
|
|
||||||
addChecklistItem(event) {
|
addChecklistItem(event) {
|
||||||
|
|
@ -16,6 +19,10 @@ BlazeComponent.extendComponent({
|
||||||
const title = textarea.value.trim();
|
const title = textarea.value.trim();
|
||||||
const checklist = this.currentData().checklist;
|
const checklist = this.currentData().checklist;
|
||||||
checklist.addItem(title);
|
checklist.addItem(title);
|
||||||
|
|
||||||
|
// We keep the form opened, empty it.
|
||||||
|
textarea.value = '';
|
||||||
|
textarea.focus();
|
||||||
},
|
},
|
||||||
|
|
||||||
editChecklist(event) {
|
editChecklist(event) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue