forked from ScoDoc/ScoDoc
Merge branch 'master' of https://scodoc.org/git/lehmann/ScoDoc-Front into lehmann-master
This commit is contained in:
commit
271d7fba05
@ -68,6 +68,15 @@ section>div:nth-child(1){
|
||||
display: none;
|
||||
}
|
||||
|
||||
.moduleOnOff>.syntheseModule,
|
||||
.moduleOnOff>.eval{
|
||||
display: none;
|
||||
}
|
||||
.listeOff .moduleOnOff>.syntheseModule,
|
||||
.listeOff .moduleOnOff>.eval{
|
||||
display: flex !important;
|
||||
}
|
||||
|
||||
/***********************/
|
||||
/* Options d'affichage */
|
||||
/***********************/
|
||||
@ -80,6 +89,12 @@ section>div:nth-child(1){
|
||||
display: none;
|
||||
}
|
||||
|
||||
.module>.absences,
|
||||
.module .moyenne,
|
||||
.module .info{
|
||||
display: none;
|
||||
}
|
||||
|
||||
/************/
|
||||
/* Etudiant */
|
||||
/************/
|
||||
@ -133,16 +148,14 @@ section>div:nth-child(1){
|
||||
/***************/
|
||||
/* Synthèse */
|
||||
/***************/
|
||||
.synthese>.ue{
|
||||
background: var(--couleurFondTitresUE);
|
||||
}
|
||||
.synthese .ue,
|
||||
.synthese h3{
|
||||
background: var(--couleurFondTitresUE);
|
||||
}
|
||||
.synthese em,
|
||||
.eval em{
|
||||
opacity: 0.6;
|
||||
width: 70px;
|
||||
min-width: 80px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
@ -158,6 +171,7 @@ section>div:nth-child(1){
|
||||
gap: 16px;
|
||||
margin: 4px 0 2px 0;
|
||||
overflow: auto;
|
||||
cursor: pointer;
|
||||
}
|
||||
h3{
|
||||
display: flex;
|
||||
@ -184,10 +198,15 @@ h3{
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 0 28px;
|
||||
margin: 0 0 0 28px;
|
||||
padding: 0px 4px;
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
.eval>div, .syntheseModule>div{
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.eval:hover, .syntheseModule:hover{
|
||||
background: var(--couleurSurlignage);
|
||||
/* color: #FFF; */
|
||||
@ -203,9 +222,10 @@ h3{
|
||||
color: #000;
|
||||
border: 1px solid var(--couleurIntense);
|
||||
opacity: 0;
|
||||
display: grid;
|
||||
display: grid !important;
|
||||
grid-template-columns: auto auto;
|
||||
column-gap: 4px;
|
||||
gap: 0 !important;
|
||||
column-gap: 4px !important;
|
||||
}
|
||||
.eval:hover .complement{
|
||||
opacity: 1;
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* Module par Seb. L. */
|
||||
class releveBUT extends HTMLElement {
|
||||
constructor(){
|
||||
super();
|
||||
@ -16,15 +17,15 @@ class releveBUT extends HTMLElement {
|
||||
styles.setAttribute('rel', 'stylesheet');
|
||||
styles.setAttribute('href', '/ScoDoc/static/css/releve-but.css');
|
||||
this.shadow.appendChild(styles);
|
||||
|
||||
this.shadow.querySelectorAll(".CTA_Liste").forEach(e => {
|
||||
e.addEventListener("click", this.listeOnOff)
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
listeOnOff() {
|
||||
this.parentElement.parentElement.classList.toggle("listeOff")
|
||||
this.parentElement.parentElement.classList.toggle("listeOff");
|
||||
this.parentElement.parentElement.querySelectorAll(".moduleOnOff").forEach(e=>{
|
||||
e.classList.remove("moduleOnOff")
|
||||
})
|
||||
}
|
||||
moduleOnOff(){
|
||||
this.parentElement.classList.toggle("moduleOnOff");
|
||||
}
|
||||
|
||||
set setConfig(config){
|
||||
@ -39,10 +40,16 @@ class releveBUT extends HTMLElement {
|
||||
|
||||
this.setOptions(data.options);
|
||||
|
||||
this.shadow.querySelectorAll(".CTA_Liste").forEach(e => {
|
||||
e.addEventListener("click", this.listeOnOff)
|
||||
})
|
||||
this.shadow.querySelectorAll(".ue, .module").forEach(e => {
|
||||
e.addEventListener("click", this.moduleOnOff)
|
||||
})
|
||||
|
||||
this.shadow.children[0].classList.add("ready");
|
||||
}
|
||||
|
||||
|
||||
template(){
|
||||
return `
|
||||
<div>
|
||||
@ -133,7 +140,7 @@ class releveBUT extends HTMLElement {
|
||||
${data.etudiant.prenom}`;
|
||||
|
||||
if (data.etudiant.date_naissance) {
|
||||
output += ` né${(data.etudiant.civilite == "F") ? "e" : ""} le ${this.ISOToDate(data.etudiant.date_naissance)}`;
|
||||
output += ` <div class=dateNaissance>né${(data.etudiant.civilite == "F") ? "e" : ""} le ${this.ISOToDate(data.etudiant.date_naissance)}</div>`;
|
||||
}
|
||||
|
||||
output += `
|
||||
@ -186,6 +193,7 @@ class releveBUT extends HTMLElement {
|
||||
let output = ``;
|
||||
Object.entries(data.ues).forEach(([ue, dataUE]) => {
|
||||
output += `
|
||||
<div>
|
||||
<div class=ue>
|
||||
<h3>
|
||||
${(dataUE.competence) ? dataUE.competence + " - " : ""}${ue}
|
||||
@ -207,6 +215,7 @@ class releveBUT extends HTMLElement {
|
||||
</div>
|
||||
${this.synthese(data, dataUE.ressources)}
|
||||
${this.synthese(data, dataUE.saes)}
|
||||
</div>
|
||||
`;
|
||||
});
|
||||
this.shadow.querySelector(".synthese").innerHTML = output;
|
||||
@ -221,7 +230,7 @@ class releveBUT extends HTMLElement {
|
||||
<div>${this.URL(url, `${module} - ${titre}`)}</div>
|
||||
<div>
|
||||
${dataModule.moyenne}
|
||||
<em>Coef. ${dataModule.coef}</em>
|
||||
<em>Coef. ${dataModule.coef}</em>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
@ -271,7 +280,7 @@ class releveBUT extends HTMLElement {
|
||||
<div>${this.URL(evaluation.url, evaluation.description)}</div>
|
||||
<div>
|
||||
${evaluation.note.value}
|
||||
<em>Coef. ${evaluation.coef}</em>
|
||||
<em>Coef. ${evaluation.coef}</em>
|
||||
</div>
|
||||
<div class=complement>
|
||||
<div>Coef</div><div>${evaluation.coef}</div>
|
||||
|
@ -7,12 +7,6 @@
|
||||
{% block app_content %}
|
||||
|
||||
<releve-but></releve-but>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
|
||||
<script src="/ScoDoc/static/js/releve-but.js"></script>
|
||||
<script>
|
||||
let dataSrc = "{{bul_url|safe}}";
|
||||
@ -21,13 +15,17 @@
|
||||
.then(json => {
|
||||
let releve = document.querySelector("releve-but");
|
||||
releve.showData = json;
|
||||
// Syle custome à ajouter
|
||||
releve.shadowRoot.innerHTML += `
|
||||
<style>
|
||||
.module>div, .dateInscription{
|
||||
display: none;
|
||||
}
|
||||
</style>`;
|
||||
// Syle custom à ajouter
|
||||
let style = document.createElement("style");
|
||||
style.textContent = `
|
||||
.module>div,
|
||||
.dateInscription,
|
||||
.numerosEtudiant,
|
||||
.dateNaissance{
|
||||
/*display: none;*/
|
||||
}`;
|
||||
releve.shadowRoot.appendChild(style);
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user