You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
667 B
22 lines
667 B
const listedesentree = [];
|
|
|
|
function activationBoutonFlotant(lui) {
|
|
if (listedesentree.find(function(valeur) {return valeur == lui.name;})) {
|
|
for( var i = 0; i < listedesentree.length; i++){
|
|
if ( listedesentree[i] === lui.name) {
|
|
listedesentree.splice(i, 1);
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
listedesentree.push(lui.name);
|
|
};
|
|
|
|
if (listedesentree.length > 0){
|
|
document.getElementById("enregistrer-interrupteur").classList.remove("desactiver");
|
|
document.getElementById("enregistrer-interrupteur").style.display = "block";
|
|
}else{
|
|
document.getElementById("enregistrer-interrupteur").classList.add("desactiver");
|
|
}
|
|
}
|