diff options
author | Lauri Ojansivu <x@xet7.org> | 2017-12-20 14:15:38 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2017-12-20 14:15:38 +0200 |
commit | 9e3e63f4940ce58d986c5b473025d04582d36d71 (patch) | |
tree | d53c3d3ccf260983746a96f138ffc0eb437d4259 /client/components | |
parent | 0c15048bdd1da5928525585b1d24c5dbe8a68bbc (diff) | |
parent | ba2d9b89dc4460a2f6d6abb530b9ba74b107d4e1 (diff) | |
download | wekan-9e3e63f4940ce58d986c5b473025d04582d36d71.tar.gz wekan-9e3e63f4940ce58d986c5b473025d04582d36d71.tar.bz2 wekan-9e3e63f4940ce58d986c5b473025d04582d36d71.zip |
Merge branch 'thuanpq-auto-setting-card-cover-with-drag-drop' into devel
Diffstat (limited to 'client/components')
-rw-r--r-- | client/components/cards/attachments.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client/components/cards/attachments.js b/client/components/cards/attachments.js index b1f88bf1..bc7d3979 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(); |