From 99d6bd4415538a13f2b1030f5546834ada8ced09 Mon Sep 17 00:00:00 2001 From: nztqa Date: Fri, 30 Jun 2017 10:10:42 +0900 Subject: Improve input of checklist When finished input of checklist item title, open new checklist item. --- client/components/cards/checklists.jade | 2 +- client/components/cards/checklists.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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) { -- cgit v1.2.3-1-g7c22 From a26db7f3c8ee93febe19169010ae67c3f4189649 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Fri, 30 Jun 2017 07:33:48 +0300 Subject: When finished input of checklist item, open new checklist item. Thanks to nztqa ! Closes #828 --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fd301c0..54539cda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,11 @@ This release adds the following new features: * [REST API: Add PUT method to update a card](https://github.com/wekan/wekan/pull/1095) and - [related fix](https://github.com/wekan/wekan/pull/1097). + [related fix](https://github.com/wekan/wekan/pull/1097); +* [When finished input of checklist item, open new checklist + item](https://github.com/wekan/wekan/pull/1099). -Thanks to GitHub user zarnifoulette for contributions! +Thanks to GitHub users nztqa and zarnifoulette for their contributions! # v0.27 2017-06-28 Wekan release -- cgit v1.2.3-1-g7c22