Commit f580bfde authored by Mat's avatar Mat

wip.. gestion js/ajax de la pagination

parent 6c516fed
......@@ -24,8 +24,19 @@
<i class="fas fa-sync-alt"></i>
Rafraichir la liste
</a>
<form id="pagination">
<select class="custom-select custom-select-sm">
<option selected>Pagination</option>
<option value="3">3</option>
<option value="5">5</option>
<option value="10">10</option>
<option value="20">20</option>
</select>
</form>
</div>
<div class="col-5">
<div class="col-6">
<a id="form-membre"></a>
<div class="hidden" style="margin: -3em 0;">
{{ form_start(formMembre) }}
......@@ -43,22 +54,22 @@
<thead>
<tr>
<th scope="col">
<a href="javascript: void(0);" class="btn-sort">#</a>
<a href="javascript: void(0);" id="id" class="btn-sort">#</a>
</th>
<th scope="col">
<a href="javascript: void(0);" class="btn-sort">Prénom</a>
<a href="javascript: void(0);" id="firstname" class="btn-sort">Prénom</a>
</th>
<th scope="col">
<a href="javascript: void(0);" class="btn-sort">Nom</a>
<a href="javascript: void(0);" id="lastname" class="btn-sort">Nom</a>
</th>
<th scope="col">
<a href="javascript: void(0);" class="btn-sort">Email</a>
<a href="javascript: void(0);" id="email" class="btn-sort">Email</a>
</th>
<th scope="col">
<a href="javascript: void(0);" class="btn-sort">Association</a>
<a href="javascript: void(0);" id="association" class="btn-sort">Association</a>
</th>
<th scope="col">
<a href="javascript: void(0);" class="btn-sort">Action</a>
<a href="javascript: void(0);" id="action" class="btn-sort">Action</a>
</th>
</tr>
</thead>
......@@ -77,8 +88,14 @@
let table = document.querySelector('table#maintab.membres');
let tbody = table.querySelector('tbody');
let membreURL = Routing.generate('api_membre_read_paginate');
function reloadTableMembre() {
function reloadTableMembre()
{
let membreURL = Routing.generate('api_membre_read_paginate', {
'step' : step,
'start' : page,
'column' : col,
'order' : order
});
tbody.innerHTML = null;
AJAX('GET', membreURL, function(request)
......@@ -194,5 +211,11 @@
});
let columns = ['id', 'firstname', 'lastname', 'email'];
columns.forEach(function(column) {
column.addEventListener
});
</script>
{% endblock %}
......@@ -294,3 +294,11 @@ form label.required:after {
.hidden {
display: none;
}
form#pagination {
border: 0px;
box-sizing: border-box;
padding: 0em;
margin-top: 1em;
width: 160px;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment