mirror of
https://github.com/wekan/wekan.git
synced 2025-12-20 09:20:12 +01:00
Set background color only if it exists. Part 3.
Thanks to xet7 !
This commit is contained in:
parent
d05b84dff9
commit
549b15000b
1 changed files with 2 additions and 11 deletions
|
|
@ -1,20 +1,11 @@
|
||||||
Utils = {
|
Utils = {
|
||||||
setBackgroundImage(url) {
|
setBackgroundImage(url) {
|
||||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||||
/*
|
|
||||||
if(url) {
|
|
||||||
if (url !== currentBoard.backgroundImageURL) {
|
|
||||||
currentBoard.setBackgroundImageURL(url);
|
|
||||||
} else {
|
|
||||||
currentBoard.setBackgroundImageURL("");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if (currentBoard.backgroundImageURL !== undefined) {
|
if (currentBoard.backgroundImageURL !== undefined) {
|
||||||
$(".board-wrapper,.board-wrapper .board-canvas").css({"background":"url(" + currentBoard.backgroundImageURL + ")","background-size":"cover"});
|
$(".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"});
|
$(".swimlane,.swimlane .list,.swimlane .list .list-body,.swimlane .list:first-child .list-body").css({"background-color":"transparent"});
|
||||||
} else if (currentBoard.background-color !== undefined) {
|
} else if (currentBoard.color !== undefined) {
|
||||||
$(".board-wrapper,.board-wrapper .board-canvas").css({"background": currentBoard.background-color});
|
currentBoard.setColor(currentBoard.color);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** returns the current board id
|
/** returns the current board id
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue