Implement row selection controls in templates and refactor related JavaScript functionality

This commit is contained in:
Ross
2025-11-01 21:20:10 +00:00
parent 62c26d199e
commit 09d9befceb
5 changed files with 150 additions and 113 deletions
+1 -12
View File
@@ -29,19 +29,8 @@
</div>
<div id="action-result" class="mt-2 mt-md-0"></div>
</div>
<div class="d-flex justify-content-between align-items-center mb-2">
<div>
<button class="btn btn-outline-secondary btn-sm" id="toggle-row-selection" type="button">Enable row selection</button>
<div id="selection-controls" class="btn-group ms-2" role="group" style="display:none;">
<button class="btn btn-sm btn-outline-primary" id="select-all">Select all</button>
<button class="btn btn-sm btn-outline-secondary" id="clear-selection">Clear</button>
</div>
</div>
<div>
<small class="text-muted">Selected: <span id="selected-count">0</span></small>
</div>
</div>
{{ table.row_selection_controls|safe }}
<div class="table-responsive">
{% render_table table %}
</div>