summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornztqa <nztqa@users.noreply.github.com>2017-06-30 10:10:42 +0900
committernztqa <nztqa@users.noreply.github.com>2017-06-30 10:10:42 +0900
commit99d6bd4415538a13f2b1030f5546834ada8ced09 (patch)
treebf95cb2794e2b5ab6a5f2365aa2140fbbd063688
parent9ccffe53424679579d64d831796a0060de7ee577 (diff)
downloadwekan-99d6bd4415538a13f2b1030f5546834ada8ced09.tar.gz
wekan-99d6bd4415538a13f2b1030f5546834ada8ced09.tar.bz2
wekan-99d6bd4415538a13f2b1030f5546834ada8ced09.zip
Improve input of checklist
When finished input of checklist item title, open new checklist item.
-rw-r--r--client/components/cards/checklists.jade2
-rw-r--r--client/components/cards/checklists.js7
2 files changed, 8 insertions, 1 deletions
diff --git a/client/components/cards/checklists.jade b/client/components/cards/checklists.jade
index a0d89351..c59b6307 100644
--- a/client/components/cards/checklists.jade
+++ b/client/components/cards/checklists.jade
@@ -53,7 +53,7 @@ template(name="checklistItems")
else
+itemDetail(item = item checklist = checklist)
if canModifyCard
- +inlinedForm(classNames="js-add-checklist-item" checklist = checklist)
+ +inlinedForm(autoclose=false classNames="js-add-checklist-item" checklist = checklist)
+addChecklistItemForm
else
a.add-checklist-item.js-open-inlined-form
diff --git a/client/components/cards/checklists.js b/client/components/cards/checklists.js
index b8f5e443..93bf0c19 100644
--- a/client/components/cards/checklists.js
+++ b/client/components/cards/checklists.js
@@ -8,6 +8,9 @@ BlazeComponent.extendComponent({
cardId,
title,
});
+ setTimeout(() => {
+ this.$('.add-checklist-item').last().click();
+ }, 100);
},
addChecklistItem(event) {
@@ -16,6 +19,10 @@ BlazeComponent.extendComponent({
const title = textarea.value.trim();
const checklist = this.currentData().checklist;
checklist.addItem(title);
+
+ // We keep the form opened, empty it.
+ textarea.value = '';
+ textarea.focus();
},
editChecklist(event) {