mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fixes around saving page size
This commit is contained in:
parent
d12a273620
commit
8ee91b74ab
19 changed files with 370 additions and 268 deletions
|
@ -60,8 +60,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
reloadItems(page);
|
||||
|
@ -115,6 +113,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#boxsetsPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#boxsetsPage", function () {
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -94,6 +92,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#gameGenresPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#gameGenresPage", function () {
|
||||
|
|
|
@ -84,8 +84,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.StartIndex = 0;
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
|
@ -156,6 +154,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#gamesPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#gamesPage", function () {
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -94,6 +92,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#gameStudiosPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#gameStudiosPage", function () {
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
reloadItems(page);
|
||||
|
@ -92,6 +90,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#gamesystemsPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#gamesystemsPage", function () {
|
||||
|
|
|
@ -99,8 +99,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.StartIndex = 0;
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
|
@ -144,6 +142,7 @@
|
|||
|
||||
}).on('pageshow', "#itemListPage", function () {
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
query.ParentId = getParameterByName('parentId');
|
||||
query.Filters = "";
|
||||
query.SortBy = "SortName";
|
||||
|
|
|
@ -796,7 +796,8 @@
|
|||
|
||||
var recordsEnd = Math.min(query.StartIndex + query.Limit, totalRecordCount);
|
||||
|
||||
var showControls = totalRecordCount > query.Limit;
|
||||
// 20 is the minimum page size
|
||||
var showControls = totalRecordCount > 20;
|
||||
|
||||
html += '<div class="listPaging">';
|
||||
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -94,6 +92,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#movieGenresPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#movieGenresPage", function () {
|
||||
|
|
|
@ -62,8 +62,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -112,6 +110,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#moviePeoplePage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#moviePeoplePage", function () {
|
||||
|
|
|
@ -83,8 +83,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.StartIndex = 0;
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
|
@ -199,6 +197,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#moviesPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#moviesPage", function () {
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -94,6 +92,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#movieStudiosPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#movieStudiosPage", function () {
|
||||
|
|
|
@ -70,8 +70,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.StartIndex = 0;
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
|
@ -110,6 +108,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#movieTrailersPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#movieTrailersPage", function () {
|
||||
|
|
|
@ -74,8 +74,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -122,6 +120,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#musicAlbumsPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#musicAlbumsPage", function () {
|
||||
|
|
|
@ -62,8 +62,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -102,6 +100,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#musicArtistsPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#musicArtistsPage", function () {
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -94,6 +92,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#musicGenresPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#musicGenresPage", function () {
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -94,6 +92,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#tvGenresPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#tvGenresPage", function () {
|
||||
|
|
|
@ -62,8 +62,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -112,6 +110,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#tvPeoplePage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#tvPeoplePage", function () {
|
||||
|
|
|
@ -80,8 +80,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -183,6 +181,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#tvShowsPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#tvShowsPage", function () {
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -94,6 +92,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#tvStudiosPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#tvStudiosPage", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue