From c3e67510c8da555e036006068b383479ba6ab07e Mon Sep 17 00:00:00 2001 From: Thuan Pham Quoc Date: Mon, 18 Dec 2017 22:40:01 +0700 Subject: [PATCH 1/2] Update - auto update card cover with new image uploaded via drag&drop --- client/components/cards/attachments.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/components/cards/attachments.js b/client/components/cards/attachments.js index b1f88bf10..bc7d3979b 100644 --- a/client/components/cards/attachments.js +++ b/client/components/cards/attachments.js @@ -113,7 +113,12 @@ Template.previewClipboardImagePopup.events({ file.boardId = card.boardId; file.cardId = card._id; file.userId = Meteor.userId(); - Attachments.insert(file); + const attachment = Attachments.insert(file); + + if (attachment && attachment._id && attachment.isImage()) { + card.setCover(attachment._id); + } + pastedResults = null; $(document.body).pasteImageReader(() => {}); Popup.close(); From ba2d9b89dc4460a2f6d6abb530b9ba74b107d4e1 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Wed, 20 Dec 2017 14:14:46 +0200 Subject: [PATCH 2/2] Auto update card cover with new image uploaded via drag&drop. Thanks to thuanpq ! --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58da6d0cc..5730a3ec7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,10 @@ This release adds the following new features: -* Update to Node 4.8.7 +* [Auto update card cover with new image uploaded via drag&drop](https://github.com/wekan/wekan/pull/1401); +* Update to Node 4.8.7. -Thanks to GitHub user xet7 for contributions. +Thanks to GitHub users thuanpq and xet7 for their contributions. # v0.62 2017-12-12 Wekan release