Skip to content
Extraits de code Groupes Projets
Valider 06185743 rédigé par Tanguy CHARLES's avatar Tanguy CHARLES
Parcourir les fichiers

ajout bouton croix pour supprimer note dans bibliotheque

parent e6f66f6e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -115,6 +115,12 @@
color: yellow;
}
.etoile_remove {
width: 1vw;
height: 1vw;
margin-bottom: 0.75vw;
margin-right: 0.5vw;
}
@keyframes appearcontent {
......
......@@ -390,6 +390,7 @@ function isInReviewlist(id) {
function updateEtoile(user, encoded_id, nbEtoile, option) {
icon_etoile = '<img class="etoile_remove" style="cursor: pointer;" onclick="remove_etoile(\'' + user + '\',\'' + encoded_id + '\')" src="./ressources/icons/croix_blanche.png" onmouseout="this.src=\'./ressources/icons/croix_blanche.png\'" onmouseover="this.src=\'./ressources/icons/croix_rouge.png\'">';
if (nbEtoile >= 5) {
console.log(nbEtoile);
......@@ -398,7 +399,8 @@ function updateEtoile(user, encoded_id, nbEtoile, option) {
'<span class="etoile" title="4 étoiles" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 4, \'update\')">★</span>' +
'<span class="etoile" title="3 étoiles" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 3, \'update\')">★</span>' +
'<span class="etoile" title="2 étoiles" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 2, \'update\')">★</span>' +
'<span class="etoile" title="1 étoile" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 1, \'update\')">★</span>';
'<span class="etoile" title="1 étoile" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 1, \'update\')">★</span>' +
icon_etoile;
if (option == 'update') {
ajaxRemoveReview(user, encoded_id);
......@@ -411,7 +413,8 @@ function updateEtoile(user, encoded_id, nbEtoile, option) {
'<span class="etoile" title="4 étoiles" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 4, \'update\')">★</span>' +
'<span class="etoile" title="3 étoiles" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 3, \'update\')">★</span>' +
'<span class="etoile" title="2 étoiles" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 2, \'update\')">★</span>' +
'<span class="etoile" title="1 étoile" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 1, \'update\')">★</span>';
'<span class="etoile" title="1 étoile" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 1, \'update\')">★</span>' +
icon_etoile;
if (option == 'update') {
ajaxRemoveReview(user, encoded_id);
......@@ -424,7 +427,8 @@ function updateEtoile(user, encoded_id, nbEtoile, option) {
'<span title="4 étoiles" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 4, \'update\')">★</span>' +
'<span class="etoile" title="3 étoiles" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 3, \'update\')">★</span>' +
'<span class="etoile" title="2 étoiles" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 2, \'update\')">★</span>' +
'<span class="etoile" title="1 étoile" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 1, \'update\')">★</span>';
'<span class="etoile" title="1 étoile" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 1, \'update\')">★</span>' +
icon_etoile;
if (option == 'update') {
ajaxRemoveReview(user, encoded_id);
......@@ -437,7 +441,8 @@ function updateEtoile(user, encoded_id, nbEtoile, option) {
'<span title="4 étoiles" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 4, \'update\')">★</span>' +
'<span title="3 étoiles" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 3, \'update\')">★</span>' +
'<span class="etoile" title="2 étoiles" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 2, \'update\')">★</span>' +
'<span class="etoile" title="1 étoile" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 1, \'update\')">★</span>';
'<span class="etoile" title="1 étoile" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 1, \'update\')">★</span>' +
icon_etoile;
if (option == 'update') {
ajaxRemoveReview(user, encoded_id);
......@@ -450,7 +455,8 @@ function updateEtoile(user, encoded_id, nbEtoile, option) {
'<span title="4 étoiles" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 4, \'update\')">★</span>' +
'<span title="3 étoiles" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 3, \'update\')">★</span>' +
'<span title="2 étoiles" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 2, \'update\')">★</span>' +
'<span class="etoile" title="1 étoile" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 1, \'update\')">★</span>';
'<span class="etoile" title="1 étoile" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 1, \'update\')">★</span>' +
icon_etoile
if (option == 'update') {
ajaxRemoveReview(user, encoded_id);
......@@ -472,3 +478,13 @@ function updateEtoile(user, encoded_id, nbEtoile, option) {
}
}
function remove_etoile(user, encoded_id) {
document.getElementById('emplacementEtoile_' + encoded_id).innerHTML =
'<span title="5 étoiles" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 5, \'update\')">★</span>' +
'<span title="4 étoiles" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 4, \'update\')">★</span>' +
'<span title="3 étoiles" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 3, \'update\')">★</span>' +
'<span title="2 étoiles" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 2, \'update\')">★</span>' +
'<span title="1 étoile" onclick="updateEtoile(\'' + user + '\',\'' + encoded_id + '\', 1, \'update\')">★</span>';
ajaxRemoveReview(user, encoded_id);
}
public/ressources/icons/croix_blanche.png

4,28 ko | W: | H:

public/ressources/icons/croix_blanche.png

3,29 ko | W: | H:

public/ressources/icons/croix_blanche.png
public/ressources/icons/croix_blanche.png
public/ressources/icons/croix_blanche.png
public/ressources/icons/croix_blanche.png
  • 2-up
  • Swipe
  • Onion skin
public/ressources/icons/croix_rouge.png

4,29 ko | W: | H:

public/ressources/icons/croix_rouge.png

3,29 ko | W: | H:

public/ressources/icons/croix_rouge.png
public/ressources/icons/croix_rouge.png
public/ressources/icons/croix_rouge.png
public/ressources/icons/croix_rouge.png
  • 2-up
  • Swipe
  • Onion skin
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter