From 594bbd84fdc8a2d7dedf85d42dc111ca8ba9c448 Mon Sep 17 00:00:00 2001 From: lehmann Date: Mon, 28 Nov 2022 18:03:48 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20ref=20comp=C3=A9tences?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/static/js/ref_competences.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/static/js/ref_competences.js b/app/static/js/ref_competences.js index f39ac758..36a141d5 100644 --- a/app/static/js/ref_competences.js +++ b/app/static/js/ref_competences.js @@ -61,7 +61,7 @@ class ref_competences extends HTMLElement { let divCompetence = document.createElement("div"); divCompetence.innerText = `${competence} ${niveauCle.niveau}`; divCompetence.style.gridRowStart = annee; - divCompetence.style.gridColumnStart = competence; + divCompetence.style.gridColumnStart = competence.replaceAll(" ", "_"); divCompetence.className = "comp" + numComp; divCompetence.dataset.competence = `${competence} ${niveauCle.niveau}`; divCompetence.addEventListener("click", (event) => { this.AC(event, competence, niveauCle.niveau, annee, numComp) }) @@ -76,9 +76,9 @@ class ref_competences extends HTMLElement { let gridTemplate = ""; Object.keys(this.data.competences).forEach(competence => { if (competencesBucket.indexOf(competence) == -1) { - gridTemplate += `[${competence}] 0`; + gridTemplate += `[${competence.replaceAll(" ", "_")}] 0`; } else { - gridTemplate += `[${competence}] 1fr`; + gridTemplate += `[${competence.replaceAll(" ", "_")}] 1fr`; } }) this.shadow.querySelector(".competences").style.gridTemplateColumns = gridTemplate;