Fix: improve search card pagination

This commit is contained in:
jcorporation 2018-11-28 16:39:55 +00:00
parent b63fe14ccc
commit 05a3525f39
2 changed files with 7 additions and 0 deletions

View File

@ -324,4 +324,8 @@ div.key {
ol#searchCrumb {
padding: .5rem;
}
.nodropdown::after {
content: none;
}

View File

@ -2100,13 +2100,16 @@ function setPagination(total, returned) {
( j + 1) + '</button>';
}
document.getElementById(cat + p[i] + 'Pages').innerHTML = pl;
document.getElementById(cat + p[i] + 'Page').classList.remove('nodropdown');
}
else if (total == -1) {
document.getElementById(cat + p[i] + 'Page').setAttribute('disabled', 'disabled');
document.getElementById(cat + p[i] + 'Page').innerText = (app.current.page / settings.maxElementsPerPage + 1);
document.getElementById(cat + p[i] + 'Page').classList.add('nodropdown');
}
else {
document.getElementById(cat + p[i] + 'Page').setAttribute('disabled', 'disabled');
document.getElementById(cat + p[i] + 'Page').classList.add('nodropdown');
}
if (total > app.current.page + settings.maxElementsPerPage || total == -1 && returned >= settings.maxElementsPerPage) {