forked from ScoDoc/ScoDoc
Progress fin message
This commit is contained in:
parent
7d3811113b
commit
2cad6560c4
@ -51,9 +51,9 @@
|
|||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div></div>
|
<div></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<div class="etudiants"></div>
|
<div class="etudiants"></div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@ -435,6 +435,7 @@
|
|||||||
/* Affectation à un groupe */
|
/* Affectation à un groupe */
|
||||||
/****************************/
|
/****************************/
|
||||||
var progressNb = 0;
|
var progressNb = 0;
|
||||||
|
var progressRef = 0;
|
||||||
function affectationGo() {
|
function affectationGo() {
|
||||||
let from = document.querySelector("#affectationFrom").value;
|
let from = document.querySelector("#affectationFrom").value;
|
||||||
let to = document.querySelector("#affectationTo").value;
|
let to = document.querySelector("#affectationTo").value;
|
||||||
@ -456,9 +457,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let progress = document.querySelector("#zoneChoix .autoAffectation .progress");
|
let progress = document.querySelector("#zoneChoix .autoAffectation .progress");
|
||||||
if(elements.length > 1){
|
if (elements.length > 1) {
|
||||||
progress.style.setProperty('--reference', elements.length);
|
progress.style.setProperty('--reference', elements.length);
|
||||||
progress.style.setProperty('--nombre', 0);
|
progress.style.setProperty('--nombre', 0);
|
||||||
|
progressRef = elements.length;
|
||||||
progressNb = 0;
|
progressNb = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -512,8 +514,13 @@
|
|||||||
this.classList.remove("saving");
|
this.classList.remove("saving");
|
||||||
this.classList.add("saved");
|
this.classList.add("saved");
|
||||||
setTimeout(() => { this.classList.remove("saved") }, 800);
|
setTimeout(() => { this.classList.remove("saved") }, 800);
|
||||||
|
|
||||||
let progress = document.querySelector("#zoneChoix .autoAffectation .progress");
|
let progress = document.querySelector("#zoneChoix .autoAffectation .progress");
|
||||||
progress.style.setProperty('--nombre', ++progressNb);
|
progress.style.setProperty('--nombre', ++progressNb);
|
||||||
|
|
||||||
|
if (progressNb == progressRef) {
|
||||||
|
sco_message("Tous les étudiants sont affectés");
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
throw 'Les données retournées ne sont pas valides';
|
throw 'Les données retournées ne sont pas valides';
|
||||||
|
Loading…
Reference in New Issue
Block a user