mirror of
https://github.com/wekan/wekan.git
synced 2026-02-04 15:41:52 +01:00
Set card attachment as background image. Part 3.
Thanks to xet7 ! Related #486
This commit is contained in:
parent
0afac8bbff
commit
01a1eb177e
4 changed files with 26 additions and 25 deletions
|
|
@ -176,8 +176,9 @@ BlazeComponent.extendComponent({
|
|||
return ret;
|
||||
},
|
||||
isBackgroundImage() {
|
||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
return currentBoard.backgroundImageURL === $(".attachment-thumbnail-img").attr("src");
|
||||
//const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
//return currentBoard.backgroundImageURL === $(".attachment-thumbnail-img").attr("src");
|
||||
return false;
|
||||
},
|
||||
events() {
|
||||
return [
|
||||
|
|
@ -196,9 +197,7 @@ BlazeComponent.extendComponent({
|
|||
Popup.back();
|
||||
},
|
||||
'click .js-add-background-image'() {
|
||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
currentBoard.setBackgroundImageURL($(".attachment-thumbnail-img").attr("src"));
|
||||
Utils.setBackgroundImage();
|
||||
Utils.setBackgroundImage($(".attachment-thumbnail-img").attr("src"));
|
||||
Popup.back();
|
||||
event.preventDefault();
|
||||
},
|
||||
|
|
@ -208,6 +207,7 @@ BlazeComponent.extendComponent({
|
|||
Utils.setBackgroundImage();
|
||||
Popup.back();
|
||||
Utils.reload();
|
||||
event.preventDefault();
|
||||
},
|
||||
'click .js-move-storage-fs'() {
|
||||
Meteor.call('moveAttachmentToStorage', this.data()._id, "fs");
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ template(name="boardChangeBackgroundImagePopup")
|
|||
br
|
||||
hr
|
||||
div
|
||||
button.js-remove-background.negate.wide.card-details-red.right {{_ 'unset-color'}}
|
||||
button.js-remove-background-image.negate.wide.card-details-red.right {{_ 'unset-color'}}
|
||||
|
||||
template(name="boardInfoOnMyBoardsPopup")
|
||||
form.board-info-on-my-boards
|
||||
|
|
|
|||
|
|
@ -691,6 +691,14 @@ BlazeComponent.extendComponent({
|
|||
Popup.back();
|
||||
event.preventDefault();
|
||||
},
|
||||
'click .js-remove-background-image'() {
|
||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
currentBoard.setBackgroundImageURL("");
|
||||
Utils.setBackgroundImage("");
|
||||
Popup.back();
|
||||
//Utils.reload();
|
||||
event.preventDefault();
|
||||
},
|
||||
},
|
||||
];
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue