|
820 | 820 |
|
821 | 821 | <div class="section-gap"></div> |
822 | 822 |
|
823 | | - <div |
824 | | - style=" |
825 | | - display: flex; |
826 | | - align-items: center; |
827 | | - justify-content: space-between; |
828 | | - margin-bottom: 10px; |
829 | | - " |
830 | | - > |
831 | | - <div class="section-label" style="margin: 0">Historique</div> |
832 | | - <button class="btn btn-ghost" id="resetBtn" style="font-size: 0.72rem"> |
833 | | - Réinitialiser |
834 | | - </button> |
| 823 | + <div class="section-label">Historique</div> |
| 824 | + <div class="toggle-header" id="historyToggle" role="button" tabindex="0"> |
| 825 | + <span class="card-label" style="margin: 0">Historique des apports</span> |
| 826 | + <div style="display: flex; align-items: center; gap: 8px"> |
| 827 | + <button class="btn btn-ghost" id="resetBtn" style="font-size: 0.72rem"> |
| 828 | + Réinitialiser |
| 829 | + </button> |
| 830 | + <span class="chevron">▼</span> |
| 831 | + </div> |
835 | 832 | </div> |
836 | | - <div class="card" style="padding: 8px 16px"> |
| 833 | + <div class="toggle-body" id="historyBody" style="padding: 8px 16px"> |
837 | 834 | <div id="historyList"></div> |
838 | 835 | </div> |
839 | 836 | </div> |
|
1269 | 1266 |
|
1270 | 1267 | setupToggle("settingsToggle", "settingsBody"); |
1271 | 1268 | setupToggle("totalsToggle", "totalsBody"); |
| 1269 | + setupToggle("historyToggle", "historyBody"); |
1272 | 1270 |
|
1273 | 1271 | const bindCible = (id, fund) => { |
1274 | 1272 | document.getElementById(id).addEventListener("change", function () { |
|
1318 | 1316 | .getElementById("ratioPlaisirInput") |
1319 | 1317 | .addEventListener("change", rh); |
1320 | 1318 |
|
1321 | | - document.getElementById("resetBtn").addEventListener("click", () => { |
| 1319 | + document.getElementById("resetBtn").addEventListener("click", (e) => { |
| 1320 | + e.stopPropagation(); |
1322 | 1321 | showConfirm("Supprimer tout l\u2019historique\u00a0?", () => { |
1323 | 1322 | state.history = []; |
1324 | 1323 | state.totals = { etf: 0, plaisir: 0, urgence: 0, reserve: 0 }; |
|
0 commit comments