refacto js, up graph
This commit is contained in:
parent
d66bc5e40c
commit
68680e0569
11 changed files with 840 additions and 48 deletions
|
@ -15,10 +15,14 @@ import './utils.js';
|
|||
import './opening_hours.js';
|
||||
import './josm.js';
|
||||
import './edit.js';
|
||||
import './table-map-toggles.js';
|
||||
import './stats-charts.js';
|
||||
import './dashboard-charts.js';
|
||||
|
||||
import Chart from 'chart.js/auto';
|
||||
import ChartDataLabels from 'chartjs-plugin-datalabels';
|
||||
import { genererCouleurPastel, setupCitySearch, handleAddCityFormSubmit, enableLabourageForm, getLabourerUrl, adjustListGroupFontSize } from './utils.js';
|
||||
import maplibregl from 'maplibre-gl';
|
||||
import { genererCouleurPastel, setupCitySearch, handleAddCityFormSubmit, enableLabourageForm, getLabourerUrl, adjustListGroupFontSize, toggleCompletionInfo } from './utils.js';
|
||||
import Tablesort from 'tablesort';
|
||||
|
||||
window.Chart = Chart;
|
||||
|
@ -26,6 +30,9 @@ window.genererCouleurPastel = genererCouleurPastel;
|
|||
window.setupCitySearch = setupCitySearch;
|
||||
window.handleAddCityFormSubmit = handleAddCityFormSubmit;
|
||||
window.getLabourerUrl = getLabourerUrl;
|
||||
window.ChartDataLabels = ChartDataLabels;
|
||||
window.maplibregl = maplibregl;
|
||||
window.toggleCompletionInfo = toggleCompletionInfo;
|
||||
|
||||
Chart.register(ChartDataLabels);
|
||||
|
||||
|
@ -95,13 +102,13 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
});
|
||||
|
||||
// Focus sur le premier champ texte au chargement
|
||||
const firstTextInput = document.querySelector('input.form-control');
|
||||
if (firstTextInput) {
|
||||
firstTextInput.focus();
|
||||
console.log('focus sur le premier champ texte', firstTextInput);
|
||||
} else {
|
||||
console.log('pas de champ texte trouvé');
|
||||
}
|
||||
// const firstTextInput = document.querySelector('input.form-control');
|
||||
// if (firstTextInput) {
|
||||
// firstTextInput.focus();
|
||||
// console.log('focus sur le premier champ texte', firstTextInput);
|
||||
// } else {
|
||||
// console.log('pas de champ texte trouvé');
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
@ -179,4 +186,4 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
enableLabourageForm();
|
||||
adjustListGroupFontSize('.list-group-item');
|
||||
});
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue