mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-24 11:38:39 +02:00
wip
This commit is contained in:
commit
f5b6289e18
2 changed files with 12 additions and 6 deletions
|
@ -925,9 +925,9 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
initializeTooltips();
|
||||
|
||||
updatePagination(data.page, data.num_pages, data.has_previous, data.has_next);
|
||||
currentPage = page;
|
||||
currentSortBy = sortBy;
|
||||
currentOrder = order;
|
||||
currentPage = page;
|
||||
currentSortBy = sortBy;
|
||||
currentOrder = order;
|
||||
})
|
||||
.catch(error => console.error('Error fetching domains:', error));
|
||||
}
|
||||
|
@ -988,7 +988,10 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
document.querySelectorAll('.dotgov-table th[data-sortable]').forEach(header => {
|
||||
header.addEventListener('click', function() {
|
||||
const sortBy = this.getAttribute('data-sortable');
|
||||
const order = currentOrder === 'asc' ? 'desc' : 'asc';
|
||||
let order = 'asc';
|
||||
if (sortBy === currentSortBy) {
|
||||
order = currentOrder === 'asc' ? 'desc' : 'asc';
|
||||
}
|
||||
loadPage(1, sortBy, order);
|
||||
});
|
||||
});
|
||||
|
@ -1132,7 +1135,10 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
document.querySelectorAll('.dotgov-table__domain-requests th[data-sortable]').forEach(header => {
|
||||
header.addEventListener('click', function() {
|
||||
const sortBy = this.getAttribute('data-sortable');
|
||||
const order = currentOrder === 'asc' ? 'desc' : 'asc';
|
||||
let order = 'asc';
|
||||
if (sortBy === currentSortBy) {
|
||||
order = currentOrder === 'asc' ? 'desc' : 'asc';
|
||||
}
|
||||
loadDomainRequestsPage(1, sortBy, order);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
<caption class="sr-only">Your domain requests</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-sortable="requested_domain" scope="col" role="columnheader">Domain name</th>
|
||||
<th data-sortable="name" scope="col" role="columnheader">Domain name</th>
|
||||
<th data-sortable="submission_date" scope="col" role="columnheader">Date submitted</th>
|
||||
<th data-sortable="status" scope="col" role="columnheader">Status</th>
|
||||
<th scope="col" role="columnheader"><span class="usa-sr-only">Action</span></th>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue