feat: add UI template for importing and comparing traffic light cross plans from Excel files
This commit is contained in:
parent
ac75712828
commit
af949b8b3d
1 changed files with 31 additions and 1 deletions
|
|
@ -178,7 +178,15 @@
|
|||
| {% translate "Carrefour :" %} <strong>{{ intersection.code }}</strong>
|
||||
</p>
|
||||
</div>
|
||||
<div class="d-flex gap-2">
|
||||
<div class="d-flex align-items-center gap-2 flex-wrap">
|
||||
<div class="btn-group btn-group-sm rounded-3 shadow-sm me-1" role="group">
|
||||
<button type="button" class="btn btn-outline-secondary" id="btn-check-all-global" title="{% translate 'Cocher tous les éléments dans tous les onglets' %}">
|
||||
<i class="bi bi-check-all me-1"></i> {% translate "Tout cocher" %}
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-secondary" id="btn-uncheck-all-global" title="{% translate 'Décocher tous les éléments dans tous les onglets' %}">
|
||||
<i class="bi bi-dash-square me-1"></i> {% translate "Tout décocher" %}
|
||||
</button>
|
||||
</div>
|
||||
<button type="button" class="btn btn-outline-danger btn-sm rounded-3 shadow-sm px-3" onclick="triggerGlobalAction('replace_all')">
|
||||
<i class="bi bi-trash3-fill"></i> {% translate "Tout remplacer (Archiver l'existant + Recréer)" %}
|
||||
</button>
|
||||
|
|
@ -1001,6 +1009,28 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
bindSelectAll('select-all-cables', 'cable-checkbox');
|
||||
bindSelectAll('select-all-other', 'other-checkbox');
|
||||
|
||||
// Global Check All / Uncheck All across all tabs
|
||||
const setAllCheckboxesState = (state) => {
|
||||
const allItemCheckboxes = document.querySelectorAll('.pole-checkbox, .lantern-checkbox, .detector-checkbox, .cable-checkbox, .other-checkbox');
|
||||
allItemCheckboxes.forEach(cb => {
|
||||
cb.checked = state;
|
||||
});
|
||||
const allHeaderCheckboxes = document.querySelectorAll('#select-all-poles, #select-all-lanterns, #select-all-detectors, #select-all-cables, #select-all-other');
|
||||
allHeaderCheckboxes.forEach(cb => {
|
||||
cb.checked = state;
|
||||
});
|
||||
};
|
||||
|
||||
const btnCheckAllGlobal = document.getElementById('btn-check-all-global');
|
||||
if (btnCheckAllGlobal) {
|
||||
btnCheckAllGlobal.addEventListener('click', () => setAllCheckboxesState(true));
|
||||
}
|
||||
|
||||
const btnUncheckAllGlobal = document.getElementById('btn-uncheck-all-global');
|
||||
if (btnUncheckAllGlobal) {
|
||||
btnUncheckAllGlobal.addEventListener('click', () => setAllCheckboxesState(false));
|
||||
}
|
||||
|
||||
// 2. Interactive Switch Logic between Table View and Map View
|
||||
const tableView = document.getElementById('table-view');
|
||||
const mapView = document.getElementById('map-view');
|
||||
|
|
|
|||
Loading…
Reference in a new issue