up score complétion normalisé dans le podium
This commit is contained in:
parent
c3a9bc52b2
commit
59398d14ba
8 changed files with 116 additions and 36 deletions
|
@ -37,7 +37,8 @@ import {
|
|||
updateMapHeightForLargeScreens
|
||||
} from './utils.js';
|
||||
// import Tablesort from 'tablesort';
|
||||
// import TableSort from 'table-sort-js/table-sort.js';
|
||||
import TableSort from 'table-sort-js/table-sort.js';
|
||||
console.log('TableSort', TableSort)
|
||||
|
||||
// Charger table-sortable (version non minifiée locale)
|
||||
// import '../assets/js/table-sortable.js';
|
||||
|
@ -61,7 +62,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
|
||||
if(updateMapHeightForLargeScreens){
|
||||
|
||||
updateMapHeightForLargeScreens();
|
||||
|
||||
window.addEventListener('resize', updateMapHeightForLargeScreens);
|
||||
}
|
||||
|
||||
|
@ -195,13 +196,19 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
});
|
||||
}
|
||||
|
||||
enableLabourageForm();
|
||||
if(enableLabourageForm){
|
||||
|
||||
enableLabourageForm();
|
||||
}
|
||||
adjustListGroupFontSize('.list-group-item');
|
||||
|
||||
// Activer le tri naturel sur tous les tableaux avec la classe table-sort
|
||||
// document.querySelectorAll('table.table-sort').forEach(table => {
|
||||
// new TableSort(table);
|
||||
// });
|
||||
if(TableSort){
|
||||
|
||||
document.querySelectorAll('table.table-sort')?.forEach(table => {
|
||||
new TableSort(table);
|
||||
});
|
||||
}
|
||||
|
||||
// Initialisation du tri et filtrage sur les tableaux du dashboard et de la page stats
|
||||
// if (document.querySelector('#dashboard-table')) {
|
||||
|
@ -244,4 +251,25 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Ajouter un écouteur pour l'événement 'load' de MapLibre afin d'ajuster la hauteur de la carte
|
||||
if (window.maplibregl && document.getElementById('map')) {
|
||||
// On suppose que la carte est initialisée ailleurs et accessible via window.mapInstance
|
||||
// Sinon, on peut essayer de détecter l'instance automatiquement
|
||||
let mapInstance = window.mapInstance;
|
||||
if (!mapInstance && window.maplibreMap) {
|
||||
mapInstance = window.maplibreMap;
|
||||
}
|
||||
// Si l'instance n'est pas trouvée, essayer de la récupérer via une variable globale courante
|
||||
if (!mapInstance && window.map) {
|
||||
mapInstance = window.map;
|
||||
}
|
||||
if (mapInstance && typeof mapInstance.on === 'function') {
|
||||
mapInstance.on('load', function() {
|
||||
updateMapHeightForLargeScreens();
|
||||
});
|
||||
}
|
||||
}
|
||||
//updateMapHeightForLargeScreens();
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue