Move every Boards.findOne(Session.get('currentBoard')) to the ReactiveCache

This commit is contained in:
Martin Filser 2022-12-15 22:26:08 +01:00
parent cecf69af02
commit 9022e9949f
18 changed files with 69 additions and 69 deletions

View file

@ -326,7 +326,7 @@ BlazeComponent.extendComponent({
return ret;
},
isBackgroundImage() {
//const currentBoard = Boards.findOne(Session.get('currentBoard'));
//const currentBoard = Utils.getCurrentBoard();
//return currentBoard.backgroundImageURL === $(".attachment-thumbnail-img").attr("src");
return false;
},
@ -342,14 +342,14 @@ BlazeComponent.extendComponent({
Popup.back();
},
'click .js-add-background-image'() {
const currentBoard = Boards.findOne(Session.get('currentBoard'));
const currentBoard = Utils.getCurrentBoard();
currentBoard.setBackgroundImageURL(attachmentActionsLink);
Utils.setBackgroundImage(attachmentActionsLink);
Popup.back();
event.preventDefault();
},
'click .js-remove-background-image'() {
const currentBoard = Boards.findOne(Session.get('currentBoard'));
const currentBoard = Utils.getCurrentBoard();
currentBoard.setBackgroundImageURL("");
Utils.setBackgroundImage("");
Popup.back();