mirror of
https://github.com/Starlio-app/Starlio-web.git
synced 2024-11-24 01:26:22 +03:00
if the picture is equal to the placeholder then the button is not available
This commit is contained in:
parent
4404dbf2da
commit
2842beff33
1 changed files with 7 additions and 1 deletions
|
@ -96,7 +96,13 @@ function wallpaper(data) {
|
|||
let title = document.querySelector(".w-modal-title");
|
||||
|
||||
let button = document.querySelector(".modal-footer");
|
||||
button.innerHTML = `<button type="button" class="btn btn-primary" id="setWallpaper">Set Wallpaper</button>`;
|
||||
|
||||
if($(`img#${id}.card-img-top`).attr("src") !== "http://localhost:4662/static/image/placeholder.png") {
|
||||
button.innerHTML = `<button type="button" class="btn btn-primary" id="setWallpaper">Set Wallpaper</button>`;
|
||||
} else {
|
||||
button.innerHTML = `<button type="button" class="btn btn-primary" id="setWallpaper" disabled>Set Wallpaper</button>`;
|
||||
}
|
||||
|
||||
let setWallpaper = document.querySelector("#setWallpaper");
|
||||
|
||||
ids[id]['copyright'] = ids[id]['copyright'] === undefined ? "NASA" : ids[id]['copyright'];
|
||||
|
|
Loading…
Add table
Reference in a new issue