mirror of
https://github.com/wekan/wekan.git
synced 2025-04-20 12:07:11 -04:00
Set card attachment as background image. Part 4.
Thanks to xet7 ! Related #486
This commit is contained in:
parent
4640effb16
commit
47380244b8
1 changed files with 5 additions and 2 deletions
|
@ -197,14 +197,17 @@ BlazeComponent.extendComponent({
|
|||
Popup.back();
|
||||
},
|
||||
'click .js-add-background-image'() {
|
||||
Utils.setBackgroundImage($(".attachment-thumbnail-img").attr("src"));
|
||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
const url=$(".attachment-thumbnail-img").attr("src");
|
||||
currentBoard.setBackgroundImageURL(url);
|
||||
Utils.setBackgroundImage(url);
|
||||
Popup.back();
|
||||
event.preventDefault();
|
||||
},
|
||||
'click .js-remove-background-image'() {
|
||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
currentBoard.setBackgroundImageURL("");
|
||||
Utils.setBackgroundImage();
|
||||
Utils.setBackgroundImage("");
|
||||
Popup.back();
|
||||
Utils.reload();
|
||||
event.preventDefault();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue