mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 21:17:18 -04:00
Merge branch 'thuanpq-auto-update-card-cover-with-latest-uploaded-image' into devel
This commit is contained in:
commit
7214e4bb2f
2 changed files with 8 additions and 1 deletions
|
@ -4,6 +4,7 @@ This release adds the following new features:
|
|||
|
||||
* [Change password of any user in Standalone Wekan Admin Panel](https://github.com/wekan/wekan/pull/1372);
|
||||
* [Performance optimization: Move more global subscriptions to template subscription](https://github.com/wekan/wekan/pull/1373);
|
||||
* [Auto update card cover with latest uploaded image attachment](https://github.com/wekan/wekan/pull/1387).
|
||||
* Update tranlations. Add Latvian language;
|
||||
* Update to Meteor 1.6.0, Node 6.12.2 and MongoDB 3.2.18.
|
||||
|
||||
|
|
|
@ -60,7 +60,13 @@ Template.cardAttachmentsPopup.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);
|
||||
}
|
||||
|
||||
Popup.close();
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue