1
0
Fork 0
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:
Luke Pulverenti 2013-05-15 15:40:47 -04:00
parent d12a273620
commit 8ee91b74ab
19 changed files with 370 additions and 268 deletions

View file

@ -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 () {

View file

@ -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 () {

View file

@ -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 () {

View file

@ -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 () {

View file

@ -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 () {

View file

@ -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";

View file

@ -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">';

View file

@ -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 () {

View file

@ -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 () {

View file

@ -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 () {

View file

@ -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 () {

View file

@ -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 () {

View file

@ -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 () {

View file

@ -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 () {

View file

@ -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 () {

View file

@ -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 () {

View file

@ -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 () {

View file

@ -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 () {

View file

@ -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 () {