Commit a90e5c23 authored by Philippe Dpt35's avatar Philippe Dpt35

Optimisation de fonctions

parent 072a533f
......@@ -206,42 +206,11 @@ function getIdAccueil(objet) {
}
function getIndiceAnimal(animal) {
var indice = 0;
switch(animal) {
case "animal1":
indice = 0;
break;
case "animal2":
indice = 1;
break;
case "animal3":
indice = 2;
break;
case "animal4":
indice = 3;
break;
}
return indice;
return parseInt(animal.charAt(6) - 1);
}
function getIndiceEnclos(enclos) {
var indice = 0;
switch(enclos) {
case "enclos1":
indice = 0;
break;
case "enclos2":
indice = 1;
break;
case "enclos3":
indice = 2;
break;
case "enclos4":
indice = 3;
break;
}
return indice;
return parseInt(enclos.charAt(6) - 1);
}
function getImgAnimalparEnclos() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment