summaryrefslogtreecommitdiffstats
path: root/client/components/lists/listHeader.js
diff options
context:
space:
mode:
authorMário Orlický <mario.orlicky@softcap.de>2017-09-24 15:17:14 +0200
committerMário Orlický <mario.orlicky@softcap.de>2017-09-24 15:17:14 +0200
commit3fa969eb2621e9e92e0267c5098d339eead9d582 (patch)
treeba009d7a21a776d0d4ab227e52bb9a86caadc98c /client/components/lists/listHeader.js
parent5f697eac0559710a68da11ebf85fca3ea5ca9a66 (diff)
downloadwekan-3fa969eb2621e9e92e0267c5098d339eead9d582.tar.gz
wekan-3fa969eb2621e9e92e0267c5098d339eead9d582.tar.bz2
wekan-3fa969eb2621e9e92e0267c5098d339eead9d582.zip
#1233 Added plus button to add card on top of the list
Diffstat (limited to 'client/components/lists/listHeader.js')
-rw-r--r--client/components/lists/listHeader.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js
index 1ad9f9dd..7fe42884 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);