forked from ScoDoc/ScoDoc
Partition editor : amélioration ordonnanceur
This commit is contained in:
parent
4cb7479b6f
commit
967c8a91c5
@ -212,16 +212,21 @@ body.editionActivated .filtres>div>div>div>div {
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grabbing>div[data-idpartition]:not([data-idgroupe]):hover:before {
|
.grabbing>.hidenDropZone {
|
||||||
|
pointer-events: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grabbing>div[data-idpartition]:not([data-idgroupe]):hover:before,
|
||||||
|
.grabbing>.hidenDropZone:hover:before {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: -4px;
|
left: -4px !important;
|
||||||
right: -4px;
|
right: -4px !important;
|
||||||
bottom: calc(100% + 1px);
|
bottom: calc(100% + 1px) !important;
|
||||||
height: 2px;
|
height: 2px !important;
|
||||||
width: auto;
|
width: auto !important;
|
||||||
background: #c44;
|
background: #c44;
|
||||||
animation: insertPartion 0.2s infinite alternate ease-in-out;
|
animation: insertPartion 0.2s infinite alternate ease-in-out !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes insertPartion {
|
@keyframes insertPartion {
|
||||||
@ -283,6 +288,7 @@ body.editionActivated .filtres>div>div>div>div {
|
|||||||
|
|
||||||
#zonePartitions .filtres {
|
#zonePartitions .filtres {
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
#zonePartitions .filtres>div {
|
#zonePartitions .filtres>div {
|
||||||
@ -332,6 +338,23 @@ body.editionActivated .filtres>div>div>div>div {
|
|||||||
margin: 4px 0 0 0;
|
margin: 4px 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#zonePartitions .filtres .groupes>button {
|
||||||
|
transition: none;
|
||||||
|
position: relative;
|
||||||
|
overflow: visible;
|
||||||
|
outline: none;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#zonePartitions .filtres .hidenDropZone {
|
||||||
|
height: 100px;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
#zonePartitions .filtres .groupes>div {
|
#zonePartitions .filtres .groupes>div {
|
||||||
position: relative;
|
position: relative;
|
||||||
background: #09c;
|
background: #09c;
|
||||||
@ -356,7 +379,7 @@ body:not(.editionActivated) .filtres .groupes>div:active {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body.editionActivated .filtres [data-idgroupe=aucun] {
|
body.editionActivated .filtres [data-idgroupe=aucun] {
|
||||||
display: none;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.editionActivated .filtres .nonEditable .move {
|
body.editionActivated .filtres .nonEditable .move {
|
||||||
|
@ -114,7 +114,7 @@
|
|||||||
arrayPartitions.forEach((partition) => {
|
arrayPartitions.forEach((partition) => {
|
||||||
|
|
||||||
let divPartition = templateFiltres_partition(partition);
|
let divPartition = templateFiltres_partition(partition);
|
||||||
divFiltres.appendChild(divPartition);
|
divFiltres.append(divPartition);
|
||||||
|
|
||||||
let arrayGroups = Object.values(partition.groups).sort((a, b) => {
|
let arrayGroups = Object.values(partition.groups).sort((a, b) => {
|
||||||
return a.numero - b.numero;
|
return a.numero - b.numero;
|
||||||
@ -146,6 +146,9 @@
|
|||||||
</div>`;
|
</div>`;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let hiden = document.createElement("div");
|
||||||
|
hiden.className = "hidenDropZone";
|
||||||
|
divFiltres.append(hiden);
|
||||||
document.querySelector("#zoneGroupes>.groupes").innerHTML = outputGroupes;
|
document.querySelector("#zoneGroupes>.groupes").innerHTML = outputGroupes;
|
||||||
|
|
||||||
/* Etudiants */
|
/* Etudiants */
|
||||||
@ -275,7 +278,7 @@
|
|||||||
function listeGroupesAutoaffectation() {
|
function listeGroupesAutoaffectation() {
|
||||||
let output = '<option value disabled selected hidden>Choisir</option>';
|
let output = '<option value disabled selected hidden>Choisir</option>';
|
||||||
|
|
||||||
document.querySelectorAll('#zonePartitions .filtres>div').forEach(partition => {
|
document.querySelectorAll('#zonePartitions .filtres>[data-idpartition]').forEach(partition => {
|
||||||
|
|
||||||
output += `
|
output += `
|
||||||
<optgroup label="${partition.children[0].children[1].innerText}">
|
<optgroup label="${partition.children[0].children[1].innerText}">
|
||||||
@ -868,7 +871,7 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Save positions
|
// Save positions
|
||||||
if (this.dataset.idpartition) {
|
if (this.dataset.idpartition || this.classList.contains("hidenDropZone")) {
|
||||||
let params = (new URL(document.location)).searchParams;
|
let params = (new URL(document.location)).searchParams;
|
||||||
let formsemestre_id = params.get('formsemestre_id');
|
let formsemestre_id = params.get('formsemestre_id');
|
||||||
var url = `/ScoDoc/{{formsemestre.departement.acronym}}/api/formsemestre/${formsemestre_id}/partitions/order`;
|
var url = `/ScoDoc/{{formsemestre.departement.acronym}}/api/formsemestre/${formsemestre_id}/partitions/order`;
|
||||||
|
Loading…
Reference in New Issue
Block a user