mirror of
https://github.com/magicbug/Cloudlog
synced 2026-08-13 17:49:35 -04:00
Introduce an HTMX-driven continents results component and refactor the continents page/JS to load/filter results dynamically. Added Continents::component_continent_results() and a new view (continents/component_results.php) which renders the chart/table container and exposes filter params via data attributes. Updated application/views/continents/index.php to use a filter card with an HTMX-enabled form that posts to the new component endpoint and injects results into #continentResults. Reworked assets/js/sections/continents.js to centralize AJAX logic into continentsRender(), add setContinentsLoading(), handle HTMX afterSwap to initialize results, improve error/info messaging, and implement a JS reset button that triggers an HTMX submit. Overall this enables incremental loading of continent stats and simplifies the previous full-form AJAX flow.
27 lines
1.2 KiB
PHP
27 lines
1.2 KiB
PHP
<div class="card shadow-sm">
|
|
<div class="card-header d-flex align-items-center justify-content-between">
|
|
<h2 class="h5 mb-0">Continents</h2>
|
|
<span class="badge text-bg-secondary rounded-pill">Updated</span>
|
|
</div>
|
|
<div class="card-body">
|
|
<div id="continentParams"
|
|
data-band="<?php echo htmlspecialchars($band, ENT_QUOTES, 'UTF-8'); ?>"
|
|
data-mode="<?php echo htmlspecialchars($mode, ENT_QUOTES, 'UTF-8'); ?>"></div>
|
|
|
|
<div style="display: flex;" id="continentContainer">
|
|
<div style="flex: 1;"><canvas id="continentChart" width="500" height="500"></canvas></div>
|
|
<div style="flex: 1;" id="continentTable">
|
|
<table style="width:100%" class="continentstable table table-sm table-bordered table-hover table-striped align-middle text-center">
|
|
<thead class="table-light">
|
|
<tr>
|
|
<th scope="col">#</th>
|
|
<th scope="col">Continent</th>
|
|
<th scope="col"># of QSOs worked</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|