2021-12-28 16:17:07 +01:00
|
|
|
{# -*- mode: jinja-html -*- #}
|
2021-12-06 21:19:40 +01:00
|
|
|
{% extends "sco_page.html" %}
|
2021-12-06 20:58:39 +01:00
|
|
|
|
2021-12-06 21:19:40 +01:00
|
|
|
{% block styles %}
|
|
|
|
{{super()}}
|
|
|
|
{% endblock %}
|
2021-12-06 20:58:39 +01:00
|
|
|
|
2021-12-06 21:19:40 +01:00
|
|
|
{% block app_content %}
|
2022-03-06 22:40:20 +01:00
|
|
|
|
2022-03-07 21:49:11 +01:00
|
|
|
{% include 'bul_head.html' %}
|
2021-12-06 20:58:39 +01:00
|
|
|
|
2021-12-18 02:30:47 +01:00
|
|
|
<releve-but></releve-but>
|
2022-07-05 16:09:26 +02:00
|
|
|
<script src="{{sco.scu.STATIC_DIR}}/js/releve-but.js"></script>
|
2022-03-07 23:43:48 +01:00
|
|
|
|
|
|
|
{% include 'bul_foot.html' %}
|
|
|
|
|
2021-12-06 21:19:40 +01:00
|
|
|
<script>
|
2021-12-21 15:10:49 +01:00
|
|
|
let dataSrc = "{{bul_url|safe}}";
|
2021-12-18 02:30:47 +01:00
|
|
|
fetch(dataSrc)
|
|
|
|
.then(r => { return r.json() })
|
|
|
|
.then(json => {
|
2021-12-18 03:32:18 +01:00
|
|
|
let releve = document.querySelector("releve-but");
|
|
|
|
releve.showData = json;
|
2021-12-20 15:39:43 +01:00
|
|
|
// Syle custom à ajouter
|
|
|
|
let style = document.createElement("style");
|
|
|
|
style.textContent = `
|
|
|
|
.module>div,
|
|
|
|
.dateInscription,
|
|
|
|
.numerosEtudiant,
|
|
|
|
.dateNaissance{
|
2021-12-21 22:22:55 +01:00
|
|
|
display: none;
|
2021-12-20 15:39:43 +01:00
|
|
|
}`;
|
|
|
|
releve.shadowRoot.appendChild(style);
|
2022-04-24 17:20:30 +02:00
|
|
|
})
|
|
|
|
.catch(error => {
|
|
|
|
let div = document.createElement("div");
|
2022-04-26 06:03:53 +02:00
|
|
|
div.innerText = "Une erreur s'est produite lors du transfert des données.";
|
2022-04-24 17:20:30 +02:00
|
|
|
div.style.fontSize = "24px";
|
|
|
|
div.style.color = "#d93030";
|
|
|
|
|
|
|
|
let releve = document.querySelector("releve-but");
|
|
|
|
releve.after(div);
|
|
|
|
releve.remove();
|
2022-04-26 06:03:53 +02:00
|
|
|
|
2022-04-24 17:20:30 +02:00
|
|
|
throw 'Fin du script - données invalides';
|
2021-12-21 22:22:55 +01:00
|
|
|
});
|
|
|
|
document.querySelector("html").style.scrollBehavior = "smooth";
|
2021-12-06 21:19:40 +01:00
|
|
|
</script>
|
2021-12-21 15:10:49 +01:00
|
|
|
{% endblock %}
|