From a46e126967995e8483b4da81a1f3b586266ee86d Mon Sep 17 00:00:00 2001 From: Denise sur Lya Date: Tue, 16 Jun 2020 23:04:11 +0200 Subject: =?UTF-8?q?ajout=20du=20"changelog",=20dossiers=20pour=20les=20don?= =?UTF-8?q?n=C3=A9es,=20et=20diverses=20choses?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/courbe_oms_gf_1an.png | Bin 0 -> 107909 bytes static/courbe_oms_gf_5ans.png | Bin 0 -> 107527 bytes static/requetes.js | 31 ++++++++++++++++++++++++------- static/style.css | 4 ++++ 4 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 static/courbe_oms_gf_1an.png create mode 100644 static/courbe_oms_gf_5ans.png (limited to 'static') diff --git a/static/courbe_oms_gf_1an.png b/static/courbe_oms_gf_1an.png new file mode 100644 index 0000000..49a5d3e Binary files /dev/null and b/static/courbe_oms_gf_1an.png differ diff --git a/static/courbe_oms_gf_5ans.png b/static/courbe_oms_gf_5ans.png new file mode 100644 index 0000000..61c2d28 Binary files /dev/null and b/static/courbe_oms_gf_5ans.png differ diff --git a/static/requetes.js b/static/requetes.js index 9da579c..072e880 100644 --- a/static/requetes.js +++ b/static/requetes.js @@ -10,22 +10,39 @@ function appelle_image() { if (this.readyState == 4 && this.status == 200) { // on récupère les différents champs de la réponse + var result = this.response.result ; var image = this.response.image ; var liste_warnings = this.response.messages var texte = this.response.export_txt; - // On affiche l'image - document.getElementById('courbe').src = 'data:image/png;base64,'+(image); - document.getElementById('sectioncourbe').style.display = "block"; - // on affiche l'export des données document.getElementById('export').innerHTML = texte; document.getElementById('sectionexport').style.display = "block"; - // Si y'a eu des warnings, faut les afficher - if(liste_warnings.length != 0) + if(result == "success") { + // On affiche l'image + document.getElementById('courbe').src = 'data:image/png;base64,'+(image); + document.getElementById('sectioncourbe').style.display = "block"; + + + // Si y'a eu des warnings, faut les afficher + if(liste_warnings.length != 0) + { + // afficher la liste des warnings + var elem_div = document.getElementById('courbe_warnings') ; + elem_div.style.display = "block" ; + var ul = elem_div.children[1] ; + for(i=0; i