From 3c8d3719af0f77f8a01881b022e548d3a7d4604e Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Sat, 30 Jun 2018 11:23:45 +0200 Subject: Deuxième maquette 2007-02-06+19:18:54 - 2007-02-08+16:46:19 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- maquette/script.js | 88 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 65 insertions(+), 23 deletions(-) (limited to 'maquette/script.js') diff --git a/maquette/script.js b/maquette/script.js index 39c27d1..2dd33e9 100644 --- a/maquette/script.js +++ b/maquette/script.js @@ -31,8 +31,12 @@ function removePers(form) } } -function loadpop(url,id) { - document.getElementById(id).innerHTML = "Chargement en cours ...
Fermer"; +function loadid(url,id,isPop) { + if (isPop) + document.getElementById(id).innerHTML = "Chargement en cours ...
Fermer
"; + else + document.getElementById(id).innerHTML = "Chargement en cours ..."; + var http_request = false; @@ -62,7 +66,10 @@ function loadpop(url,id) { if (http_request.status == 200) { document.getElementById(id).innerHTML = http_request.responseText; } else { - document.getElementById(id).innerHTML = "Un problème est survenu ...
Réessayer - Fermer"; + if (isPop) + document.getElementById(id).innerHTML = "Un problème est survenu ...
Réessayer - Fermer
"; + else + document.getElementById(id).innerHTML = "Un problème est survenu ...
Réessayer
"; } } }; @@ -91,22 +98,25 @@ function addcreneau(form) { if(form.day.options.selectedIndex>=0 && form.month.options.selectedIndex>=0 && form.year.options.selectedIndex>=0 && form.hourStart.options.selectedIndex>=0 && form.minuteStart.options.selectedIndex>=0 && form.hourEnd.options.selectedIndex>=0 && form.minuteEnd.options.selectedIndex>=0) { - //Création de la valeur - var oValue = form.hourStart.options[form.hourStart.options.selectedIndex].value + form.minuteStart.options[form.minuteStart.options.selectedIndex].value + form.hourEnd.options[form.hourEnd.options.selectedIndex].value + form.minuteEnd.options[form.minuteEnd.options.selectedIndex].value; - oValue = oValue + form.day.options[form.day.options.selectedIndex].value + form.month.options[form.month.options.selectedIndex].value + form.year.options[form.year.options.selectedIndex].value; - - //Test si la valeur est déja dans la liste - var exist = false; - var i = 0; - while (i " + form.hourEnd.options[form.hourEnd.options.selectedIndex].value + ":" + form.minuteEnd.options[form.minuteEnd.options.selectedIndex].value; - oText = oText + " " + form.day.options[form.day.options.selectedIndex].value + "/" + form.month.options[form.month.options.selectedIndex].value + "/" + form.year.options[form.year.options.selectedIndex].value; - var o = new Option(oText,oValue); - form.creneaux.options[form.creneaux.options.length]=o; + //Création de la valeur + var oValue = form.hourStart.options[form.hourStart.options.selectedIndex].value + form.minuteStart.options[form.minuteStart.options.selectedIndex].value + "." + form.hourEnd.options[form.hourEnd.options.selectedIndex].value + form.minuteEnd.options[form.minuteEnd.options.selectedIndex].value; + oValue = oValue + "." + form.day.options[form.day.options.selectedIndex].value + "." + form.month.options[form.month.options.selectedIndex].value + "." + form.year.options[form.year.options.selectedIndex].value; + + //Test si la valeur est déja dans la liste + var exist = false; + var i = 0; + while (i " + form.hourEnd.options[form.hourEnd.options.selectedIndex].value + ":" + form.minuteEnd.options[form.minuteEnd.options.selectedIndex].value; + oText = oText + " " + form.day.options[form.day.options.selectedIndex].value + "/" + form.month.options[form.month.options.selectedIndex].value + "/" + form.year.options[form.year.options.selectedIndex].value; + var o = new Option(oText,oValue); + form.creneaux.options[form.creneaux.options.length]=o; + } } } } @@ -128,19 +138,51 @@ function removecreneau(form) function dataListe(idSelect,idInput) { var liste = document.getElementById(idSelect); - var champs = document.getElementById(idInput); - var data = ""; - if (liste && champs) + if (liste) { for (var i=0;i