bubble fraicheur des completions ajouté
This commit is contained in:
parent
cd8369d08c
commit
93086eba60
18 changed files with 179 additions and 66 deletions
|
@ -34,6 +34,12 @@ import {
|
|||
updateMapHeightForLargeScreens
|
||||
} from './utils.js';
|
||||
import Tablesort from 'tablesort';
|
||||
import TableSort from 'table-sort-js/table-sort.js';
|
||||
import $ from 'jquery';
|
||||
window.$ = $;
|
||||
window.jQuery = $;
|
||||
// Charger table-sortable (version non minifiée locale)
|
||||
import '../assets/js/table-sortable.js';
|
||||
|
||||
window.Chart = Chart;
|
||||
window.genererCouleurPastel = genererCouleurPastel;
|
||||
|
@ -44,6 +50,7 @@ window.ChartDataLabels = ChartDataLabels;
|
|||
window.maplibregl = maplibregl;
|
||||
window.toggleCompletionInfo = toggleCompletionInfo;
|
||||
window.updateMapHeightForLargeScreens = updateMapHeightForLargeScreens;
|
||||
window.Tablesort = Tablesort;
|
||||
|
||||
Chart.register(ChartDataLabels);
|
||||
|
||||
|
@ -112,11 +119,6 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
}
|
||||
updateCompletionProgress();
|
||||
|
||||
// Activer le tri sur tous les tableaux désignés
|
||||
document.querySelectorAll('.js-sort-table').forEach(table => {
|
||||
new Tablesort(table);
|
||||
});
|
||||
|
||||
// Focus sur le premier champ texte au chargement
|
||||
// const firstTextInput = document.querySelector('input.form-control');
|
||||
// if (firstTextInput) {
|
||||
|
@ -131,13 +133,6 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
|
||||
parseCuisine();
|
||||
|
||||
// Tri automatique des tableaux
|
||||
// const tables = document.querySelectorAll('table');
|
||||
// tables.forEach(table => {
|
||||
// table.classList.add('js-sort-table');
|
||||
// });
|
||||
|
||||
|
||||
// Modifier la fonction de recherche existante
|
||||
const searchInput = document.getElementById('app_admin_labourer');
|
||||
const suggestionList = document.getElementById('suggestionList');
|
||||
|
@ -201,4 +196,27 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
|
||||
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);
|
||||
});
|
||||
|
||||
// Initialisation du tri et filtrage sur les tableaux du dashboard et de la page stats
|
||||
if (document.querySelector('#dashboard-table')) {
|
||||
$('#dashboard-table').tableSortable({
|
||||
pagination: false,
|
||||
showPaginationLabel: true,
|
||||
searchField: '#dashboard-table-search',
|
||||
responsive: false
|
||||
});
|
||||
}
|
||||
if (document.querySelector('#stats-table')) {
|
||||
$('#stats-table').tableSortable({
|
||||
pagination: false,
|
||||
showPaginationLabel: true,
|
||||
searchField: '#stats-table-search',
|
||||
responsive: false
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue