Skip to content

Commit

Permalink
Updated Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SharkyBytes committed Dec 29, 2024
1 parent 1943319 commit 1ccea97
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
14 changes: 14 additions & 0 deletions openlibrary/plugins/openlibrary/js/editions-table/index.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,21 @@ import '../../../../../static/css/legacy-datatables.less';
const DEFAULT_LENGTH = 3;
const LS_RESULTS_LENGTH_KEY = 'editions-table.resultsLength';

// Function to add the custom CSS for hiding pagination
function addCustomPaginationCSS() {
const style = document.createElement('style');
style.innerHTML = `
.dataTables_paginate.paging_full_numbers:has(.paginate_button.previous.disabled):has(.paginate_button.next.disabled):has(.paginate_button.first.disabled):has(.paginate_button.last.disabled) {
display: none;
}
`;
document.head.appendChild(style);
}

export function initEditionsTable() {
// Add the custom CSS for pagination
addCustomPaginationCSS();

var rowCount;
let currentLength;

Expand Down
5 changes: 0 additions & 5 deletions static/css/legacy-datatables.less
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,3 @@ tr.even.gradeU td.sorting_3 {
margin: 10px;
}
}


.dataTables_paginate.paging_full_numbers:has(.paginate_button.previous.disabled):has(.paginate_button.next.disabled):has(.paginate_button.first.disabled):has(.paginate_button.last.disabled) {
display: none;
}

0 comments on commit 1ccea97

Please sign in to comment.