sortable w tabelach

This commit is contained in:
Mateusz Gruszczyński
2025-07-27 20:07:26 +02:00
parent 5519f7eef5
commit 359b5fb61b
2 changed files with 7 additions and 4 deletions

View File

@@ -80,7 +80,7 @@
<h3 class="mt-4">📄 Wszystkie listy zakupowe</h3>
<form method="post" action="{{ url_for('delete_selected_lists') }}">
<div class="table-responsive">
<table class="table table-dark table-striped align-middle">
<table class="table table-dark table-striped align-middle sortable">
<thead>
<tr>
<th><input type="checkbox" id="select-all"></th>
@@ -187,6 +187,7 @@
</div>
{% block scripts %}
<script src="{{ url_for('static_bp.serve_js_lib', filename='Sortable.min.js') }}"></script>
<script src="{{ url_for('static_bp.serve_js_lib', filename='chart.js') }}"></script>
<script>
document.getElementById('select-all').addEventListener('click', function () {
@@ -195,6 +196,7 @@
});
</script>
<script src="{{ url_for('static_bp.serve_js', filename='expenses.js') }}"></script>
{% endblock %}
<div class="info-bar-fixed">

View File

@@ -32,7 +32,7 @@
<div class="tab-content" id="expenseTabsContent">
<!-- 📚 LISTY -->
<!-- LISTY -->
<div class="tab-pane fade show active" id="listsTab" role="tabpanel">
<div class="card bg-dark text-white mb-4">
<div class="card-body">
@@ -66,7 +66,7 @@
</button>
</div>
<div class="table-responsive">
<table class="table table-dark table-striped align-middle">
<table class="table table-dark table-striped align-middle sortable">
<thead>
<tr>
<th></th>
@@ -104,7 +104,7 @@
</div>
<!-- 📊 WYKRES -->
<!-- WYKRES -->
<div class="tab-pane fade" id="chartTab" role="tabpanel">
<div class="card bg-dark text-white mb-4">
<div class="card-body">
@@ -140,6 +140,7 @@
{% block scripts %}
<script src="{{ url_for('static_bp.serve_js_lib', filename='chart.js') }}"></script>
<script src="{{ url_for('static_bp.serve_js_lib', filename='Sortable.min.js') }}"></script>
<script src="{{ url_for('static_bp.serve_js', filename='user_expenses.js') }}"></script>
<script src="{{ url_for('static_bp.serve_js', filename='user_expense_lists.js') }}"></script>
{% endblock %}