Advertisement
Guest User

Untitled

a guest
May 27th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.48 KB | None | 0 0
  1. var ENG_EAU_CHAUDE = Cookies.get('ENG_EAU_CHAUDE');
  2.  
  3. if (ENG_EAU_CHAUDE) {
  4.  
  5. if (ENG_EAU_CHAUDE == 'Electricité') {
  6. $("#consommationsituationenergieseauelec").click();
  7. } else if (ENG_EAU_CHAUDE == 'Gaz') {
  8. $("#consommationsituationenergieseaugaz").click();
  9. } else if (ENG_EAU_CHAUDE == "Collectif" || "Géothermie" || "Poêle à bois ou granulé" || "Cheminée" || "Pompe à chaleur" || "Fioul" || "Autres") {
  10. $("#consommationsituationenergieseauautres").click();
  11. $("#consommationsituationenergieseauautrestxt").val(ENG_EAU_CHAUDE);
  12. }
  13.  
  14. }
  15.  
  16. var ENG_CHAUFFAGE = Cookies.get('ENG_CHAUFFAGE');
  17.  
  18. if (ENG_CHAUFFAGE) {
  19.  
  20. if (ENG_CHAUFFAGE == 'Electricité') {
  21. $("#consommationsituationenergieschauffageelec").click();
  22. } else if (ENG_CHAUFFAGE == 'Gaz') {
  23. $("#consommationsituationenergieschauffagegaz").click();
  24. } else if (ENG_CHAUFFAGE == "Collectif" || "Géothermie" || "Poêle à bois ou granulé" || "Cheminée" || "Pompe à chaleur" || "Fioul" || "Autres") {
  25. $("#consommationsituationenergieschauffageautres").click();
  26. $("#consommationsituationenergieschauffageautrestxt").val(ENG_CHAUFFAGE);
  27. }
  28.  
  29. }
  30.  
  31. var ENG_CUISSON = Cookies.get('ENG_CUISSON');
  32. var ENG_CUISSON_TXT = Cookies.get('ENG_CUISSON_TXT');
  33.  
  34. if (ENG_CUISSON) {
  35.  
  36. console.log(ENG_CUISSON)
  37.  
  38. if (ENG_CUISSON == 'Electricité') {
  39. $("#consommationsituationenergiescuissonelec").click();
  40. } else if (ENG_CUISSON == 'Gaz') {
  41. $("#consommationsituationenergiescuissongaz").click();
  42. } else if (ENG_CUISSON == "Autres" || ENG_CUISSON == "Collectif" || ENG_CUISSON == "Géothermie" || ENG_CUISSON == "Poêle à bois ou granulé" || ENG_CUISSON == "Cheminée" || ENG_CUISSON == "Pompe à chaleur" || ENG_CUISSON == "Fioul" || ENG_CUISSON == "Autres") {
  43. $("#consommationsituationenergiescuissonautres").click();
  44. $("#consommationsituationenergiescuissonautrestxt").val(ENG_CUISSON_TXT);
  45. } else if (ENG_CUISSON.indexOf('Gaz') != -1 && ENG_CUISSON.indexOf('Electricité') != -1 &&
  46. (ENG_CUISSON.indexOf("Collectif") != -1 || ENG_CUISSON.indexOf("Géothermie") != -1 || ENG_CUISSON.indexOf("Poêle à bois ou granulé") != -1 || ENG_CUISSON.indexOf("Cheminée") != -1 || ENG_CUISSON.indexOf("Pompe à chaleur") != -1 || ENG_CUISSON.indexOf("Fioul") != -1 || ENG_CUISSON.indexOf("Autres") != -1)
  47. ) {
  48. $("#consommationsituationenergiescuissonelec").click();
  49. $("#consommationsituationenergiescuissongaz").click();
  50. $("#consommationsituationenergiescuissonautres").click();
  51. $("#consommationsituationenergiescuissonautrestxt").val(ENG_CUISSON_TXT);
  52. } else if (ENG_CUISSON == 'Gaz, Electricité') {
  53. $("#consommationsituationenergiescuissonelec").click();
  54. $("#consommationsituationenergiescuissongaz").click();
  55. } else if (ENG_CUISSON.indexOf('Gaz') != -1 &&
  56. (ENG_CUISSON.indexOf("Collectif") != -1 || ENG_CUISSON.indexOf("Géothermie") != -1 || ENG_CUISSON.indexOf("Poêle à bois ou granulé") != -1 || ENG_CUISSON.indexOf("Cheminée") != -1 || ENG_CUISSON.indexOf("Pompe à chaleur") != -1 || ENG_CUISSON.indexOf("Fioul") != -1 || ENG_CUISSON.indexOf("Autres") != -1)
  57. ) {
  58. $("#consommationsituationenergiescuissongaz").click();
  59. $("#consommationsituationenergiescuissonautres").click();
  60. $("#consommationsituationenergiescuissonautrestxt").val(ENG_CUISSON_TXT);
  61. } else if (ENG_CUISSON.indexOf('Electricité') != -1 &&
  62. (ENG_CUISSON.indexOf("Collectif") != -1 || ENG_CUISSON.indexOf("Géothermie") != -1 || ENG_CUISSON.indexOf("Poêle à bois ou granulé") != -1 || ENG_CUISSON.indexOf("Cheminée") != -1 || ENG_CUISSON.indexOf("Pompe à chaleur") != -1 || ENG_CUISSON.indexOf("Fioul") != -1 || ENG_CUISSON.indexOf("Autres") != -1)
  63. ) {
  64. $("#consommationsituationenergiescuissonelec").click();
  65. $("#consommationsituationenergiescuissonautres").click();
  66. $("#consommationsituationenergiescuissonautrestxt").val(ENG_CUISSON_TXT);
  67. }
  68.  
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement