From 3fa969eb2621e9e92e0267c5098d339eead9d582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rio=20Orlick=C3=BD?= Date: Sun, 24 Sep 2017 15:17:14 +0200 Subject: [PATCH 1/2] #1233 Added plus button to add card on top of the list --- client/components/lists/list.styl | 5 ++++- client/components/lists/listHeader.jade | 7 ++++--- client/components/lists/listHeader.js | 15 +++++++-------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/client/components/lists/list.styl b/client/components/lists/list.styl index cf939a6ef..5e20476e3 100644 --- a/client/components/lists/list.styl +++ b/client/components/lists/list.styl @@ -69,13 +69,16 @@ padding-left: 10px color: #a6a6a6 - .list-header-menu-icon + .list-header-menu position: absolute padding: 7px margin-top: 1px top: -@padding right: -@padding + .list-header-plus-icon + color: #a6a6a6 + .list-body flex: 1 display: flex diff --git a/client/components/lists/listHeader.jade b/client/components/lists/listHeader.jade index 119055861..68336320d 100644 --- a/client/components/lists/listHeader.jade +++ b/client/components/lists/listHeader.jade @@ -13,7 +13,9 @@ template(name="listHeader") if currentUser.isBoardMember if isWatching i.list-header-watch-icon.fa.fa-eye - a.list-header-menu-icon.fa.fa-navicon.js-open-list-menu + div.list-header-menu + a.js-add-card.fa.fa-plus.list-header-plus-icon + a.fa.fa-navicon.js-open-list-menu template(name="editListTitleForm") .list-composer @@ -28,10 +30,9 @@ template(name="listActionPopup") unless currentUser.isCommentOnly hr ul.pop-over-list - li: a.js-add-card {{_ 'add-card'}} if cards.count li: a.js-select-cards {{_ 'list-select-cards'}} - hr + hr ul.pop-over-list li: a.js-close-list {{_ 'archive-list'}} hr diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js index 1ad9f9dd5..7fe42884d 100644 --- a/client/components/lists/listHeader.js +++ b/client/components/lists/listHeader.js @@ -24,6 +24,13 @@ BlazeComponent.extendComponent({ events() { return [{ 'click .js-open-list-menu': Popup.open('listAction'), + 'click .js-add-card' () { + const listDom = document.getElementById(`js-list-${this.currentData()._id}`); + const listComponent = BlazeComponent.getComponentForElement(listDom); + listComponent.openForm({ + position: 'top', + }); + }, submit: this.editTitle, }]; }, @@ -36,14 +43,6 @@ Template.listActionPopup.helpers({ }); Template.listActionPopup.events({ - 'click .js-add-card' () { - const listDom = document.getElementById(`js-list-${this._id}`); - const listComponent = BlazeComponent.getComponentForElement(listDom); - listComponent.openForm({ - position: 'top', - }); - Popup.close(); - }, 'click .js-list-subscribe' () {}, 'click .js-select-cards' () { const cardIds = this.allCards().map((card) => card._id); From d0d2406186be79d9a04185a31d616feb1d597f71 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Sun, 24 Sep 2017 17:00:40 +0300 Subject: [PATCH 2/2] Added plus button to add card on top of the list. Thanks to mario-orlicky ! Closes #1233 --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60df23e3f..27470c6e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,14 +3,15 @@ This release adds the following new features: * [Add translations (en/de/fi) for email notifications regarding checklists and checklist - items](https://github.com/wekan/wekan/pull/1238). + items](https://github.com/wekan/wekan/pull/1238); +* [Added plus button to add card on top of the list](https://github.com/wekan/wekan/pull/1244). and fixes the following bugs: * [Checklist items are lost when moving items to another checklist](https://github.com/wekan/wekan/pull/1240); * [Keep state of checklist items when moved to another checklist](https://github.com/wekan/wekan/pull/1242). -Thanks to GitHub users GhassenRjab, umbertooo and xet7 for their contributions. +Thanks to GitHub users GhassenRjab, mario-orlicky, umbertooo and xet7 for their contributions. # v0.39 2017-09-18 Wekan release