-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
37 lines (32 loc) · 1.38 KB
/
script.js
File metadata and controls
37 lines (32 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
function apriModalAggiungi() {
document.getElementById("album").value = ""; // Quando apro il modale i campi sono vuoti
document.getElementById("interprete").value = "";
document.getElementById("anno").value = "";
document.getElementById("paese").value = "";
document.getElementById("rating").value = "";
document.getElementById("idCD").value = "";
document.getElementById("modalAggiungi").classList.remove("hidden"); // Per renderlo invisibile
}
function apriModalModifica(cd) {
document.getElementById("idCDm").value = cd.ID;
document.getElementById("albumm").value = cd.Album;
document.getElementById("interpretem").value = cd.Interprete;
document.getElementById("annom").value = cd.Anno;
document.getElementById("paesem").value = cd.Paese;
document.getElementById("ratingm").value = cd.Rating;
document.getElementById("modalModifica").classList.remove("hidden");
}
function chiudiModalAggiungi() {
document.getElementById("modalAggiungi").classList.add("hidden");
}
function chiudiModalModifica() {
document.getElementById("modalModifica").classList.add("hidden");
}
function apriModalElimina(id, album) {
document.getElementById("idElimina").value = id;
document.getElementById("nomeAlbum").textContent = album;
document.getElementById("modalElimina").classList.remove("hidden");
}
function chiudiModalElimina() {
document.getElementById("modalElimina").classList.add("hidden");
}