Pagination tweaks

This commit is contained in:
Cohee1207 2023-08-19 16:11:09 +03:00
parent 991ff98eaa
commit 2d61c9954b
3 changed files with 16 additions and 1 deletions

View File

@ -1041,7 +1041,7 @@ async function printCharacters(fullRefresh = false) {
$("#rm_print_characters_pagination").pagination({
dataSource: getEntitiesList({ doFilter: true }),
pageSize: Number(localStorage.getItem(storageKey)) || 50,
sizeChangerOptions: [25, 50, 100, 250, 500, 1000],
sizeChangerOptions: [10, 25, 50, 100, 250, 500, 1000],
pageRange: 1,
position: 'top',
showPageNumbers: false,

View File

@ -954,6 +954,7 @@ function getGroupCharacters({ doFilter, onlyMembers } = {}) {
}
function printGroupCandidates() {
const storageKey = 'GroupCandidates_PerPage';
$("#rm_group_add_members_pagination").pagination({
dataSource: getGroupCharacters({ doFilter: true, onlyMembers: false }),
pageSize: 5,
@ -964,6 +965,12 @@ function printGroupCandidates() {
prevText: '<',
nextText: '>',
showNavigator: true,
showSizeChanger: true,
pageSize: Number(localStorage.getItem(storageKey)) || 5,
sizeChangerOptions: [5, 10, 25, 50, 100, 200],
afterSizeSelectorChange: function (e) {
localStorage.setItem(storageKey, e.target.value);
},
callback: function (data) {
$("#rm_group_add_members").empty();
for (const i of data) {
@ -974,6 +981,7 @@ function printGroupCandidates() {
}
function printGroupMembers() {
const storageKey = 'GroupMembers_PerPage';
$("#rm_group_members_pagination").pagination({
dataSource: getGroupCharacters({ doFilter: false, onlyMembers: true }),
pageSize: 5,
@ -984,6 +992,12 @@ function printGroupMembers() {
prevText: '<',
nextText: '>',
showNavigator: true,
showSizeChanger: true,
pageSize: Number(localStorage.getItem(storageKey)) || 5,
sizeChangerOptions: [5, 10, 25, 50, 100, 200],
afterSizeSelectorChange: function (e) {
localStorage.setItem(storageKey, e.target.value);
},
callback: function (data) {
$("#rm_group_members").empty();
for (const i of data) {

View File

@ -5618,6 +5618,7 @@ body.waifuMode .zoomed_avatar {
justify-content: center;
align-items: center;
gap: 5px;
user-select: none;
}
.paginationjs-size-changer select {