From 549b15000b538d6e5013cc978c0f49e753fd903a Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Thu, 29 Jun 2023 00:31:44 +0300 Subject: [PATCH] Set background color only if it exists. Part 3. Thanks to xet7 ! --- client/lib/utils.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/client/lib/utils.js b/client/lib/utils.js index 3fa4ef515..a8ab0fcba 100644 --- a/client/lib/utils.js +++ b/client/lib/utils.js @@ -1,20 +1,11 @@ Utils = { setBackgroundImage(url) { const currentBoard = Boards.findOne(Session.get('currentBoard')); -/* - if(url) { - if (url !== currentBoard.backgroundImageURL) { - currentBoard.setBackgroundImageURL(url); - } else { - currentBoard.setBackgroundImageURL(""); - } - } -*/ if (currentBoard.backgroundImageURL !== undefined) { $(".board-wrapper,.board-wrapper .board-canvas").css({"background":"url(" + currentBoard.backgroundImageURL + ")","background-size":"cover"}); $(".swimlane,.swimlane .list,.swimlane .list .list-body,.swimlane .list:first-child .list-body").css({"background-color":"transparent"}); - } else if (currentBoard.background-color !== undefined) { - $(".board-wrapper,.board-wrapper .board-canvas").css({"background": currentBoard.background-color}); + } else if (currentBoard.color !== undefined) { + currentBoard.setColor(currentBoard.color); } }, /** returns the current board id