forked from ScoDoc/ScoDoc
bugfix : placement modaux + affichage conflit
This commit is contained in:
parent
96b1512e24
commit
19328cbe70
@ -1277,9 +1277,19 @@ function renderTimeline(assiduites, specialAssiduite) {
|
|||||||
specialAssiduiteEl.style.top = "0";
|
specialAssiduiteEl.style.top = "0";
|
||||||
specialAssiduiteEl.style.zIndex = "0"; // Place l'assiduité spéciale en arrière-plan
|
specialAssiduiteEl.style.zIndex = "0"; // Place l'assiduité spéciale en arrière-plan
|
||||||
assiduitesContainer.appendChild(specialAssiduiteEl);
|
assiduitesContainer.appendChild(specialAssiduiteEl);
|
||||||
|
const interval = {
|
||||||
|
deb: new moment.tz(getDate(), TIMEZONE),
|
||||||
|
fin: new moment.tz(getNextDate(), TIMEZONE),
|
||||||
|
};
|
||||||
//Placement des assiduités sur la timeline
|
//Placement des assiduités sur la timeline
|
||||||
assiduites.forEach((assiduite) => {
|
assiduites.forEach((assiduite) => {
|
||||||
|
const period = {
|
||||||
|
deb: new moment.tz(assiduite.date_debut, TIMEZONE),
|
||||||
|
fin: new moment.tz(assiduite.date_fin, TIMEZONE),
|
||||||
|
};
|
||||||
|
if (!hasTimeConflict(period, interval)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const el = document.createElement("div");
|
const el = document.createElement("div");
|
||||||
el.className = "assiduite";
|
el.className = "assiduite";
|
||||||
el.style.backgroundColor = getColor(assiduite.etat);
|
el.style.backgroundColor = getColor(assiduite.etat);
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
/* Hidden by default */
|
/* Hidden by default */
|
||||||
position: fixed;
|
position: fixed;
|
||||||
/* Stay in place */
|
/* Stay in place */
|
||||||
z-index: 50;
|
z-index: 750;
|
||||||
/* Sit on top */
|
/* Sit on top */
|
||||||
padding-top: 100px;
|
padding-top: 100px;
|
||||||
/* Location of the box */
|
/* Location of the box */
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
/* Hidden by default */
|
/* Hidden by default */
|
||||||
position: fixed;
|
position: fixed;
|
||||||
/* Stay in place */
|
/* Stay in place */
|
||||||
z-index: 50;
|
z-index: 750;
|
||||||
/* Sit on top */
|
/* Sit on top */
|
||||||
padding-top: 100px;
|
padding-top: 100px;
|
||||||
/* Location of the box */
|
/* Location of the box */
|
||||||
|
Loading…
Reference in New Issue
Block a user