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;
|
var page = this;
|
||||||
|
|
||||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
|
||||||
|
|
||||||
$('.radioSortBy', this).on('click', function () {
|
$('.radioSortBy', this).on('click', function () {
|
||||||
query.SortBy = this.getAttribute('data-sortby');
|
query.SortBy = this.getAttribute('data-sortby');
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
|
@ -115,6 +113,14 @@
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#boxsetsPage", function () {
|
}).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);
|
reloadItems(this);
|
||||||
|
|
||||||
}).on('pageshow', "#boxsetsPage", function () {
|
}).on('pageshow', "#boxsetsPage", function () {
|
||||||
|
|
|
@ -1,115 +1,121 @@
|
||||||
(function ($, document) {
|
(function ($, document) {
|
||||||
|
|
||||||
// The base query options
|
// The base query options
|
||||||
var query = {
|
var query = {
|
||||||
|
|
||||||
SortBy: "SortName",
|
SortBy: "SortName",
|
||||||
SortOrder: "Ascending",
|
SortOrder: "Ascending",
|
||||||
MediaTypes: "Game",
|
MediaTypes: "Game",
|
||||||
Recursive: true,
|
Recursive: true,
|
||||||
Fields: "ItemCounts,DateCreated,UserData",
|
Fields: "ItemCounts,DateCreated,UserData",
|
||||||
StartIndex: 0
|
StartIndex: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
function reloadItems(page) {
|
function reloadItems(page) {
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
ApiClient.getGenres(Dashboard.getCurrentUserId(), query).done(function (result) {
|
ApiClient.getGenres(Dashboard.getCurrentUserId(), query).done(function (result) {
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
|
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
|
||||||
|
|
||||||
html += LibraryBrowser.getPosterDetailViewHtml({
|
html += LibraryBrowser.getPosterDetailViewHtml({
|
||||||
items: result.Items,
|
items: result.Items,
|
||||||
countNameSingular: "Game",
|
countNameSingular: "Game",
|
||||||
countNamePlural: "Games",
|
countNamePlural: "Games",
|
||||||
context: "games"
|
context: "games"
|
||||||
});
|
});
|
||||||
|
|
||||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||||
|
|
||||||
$('#items', page).html(html).trigger('create');
|
$('#items', page).html(html).trigger('create');
|
||||||
|
|
||||||
$('.selectPage', page).on('change', function () {
|
$('.selectPage', page).on('change', function () {
|
||||||
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.btnNextPage', page).on('click', function () {
|
$('.btnNextPage', page).on('click', function () {
|
||||||
query.StartIndex += query.Limit;
|
query.StartIndex += query.Limit;
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.btnPreviousPage', page).on('click', function () {
|
$('.btnPreviousPage', page).on('click', function () {
|
||||||
query.StartIndex -= query.Limit;
|
query.StartIndex -= query.Limit;
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.selectPageSize', page).on('change', function () {
|
$('.selectPageSize', page).on('change', function () {
|
||||||
query.Limit = parseInt(this.value);
|
query.Limit = parseInt(this.value);
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('pageinit', "#gameGenresPage", function () {
|
$(document).on('pageinit', "#gameGenresPage", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
$('.radioSortBy', this).on('click', function () {
|
||||||
|
query.SortBy = this.getAttribute('data-sortby');
|
||||||
|
query.StartIndex = 0;
|
||||||
|
reloadItems(page);
|
||||||
|
});
|
||||||
|
|
||||||
$('.radioSortBy', this).on('click', function () {
|
$('.radioSortOrder', this).on('click', function () {
|
||||||
query.SortBy = this.getAttribute('data-sortby');
|
query.SortOrder = this.getAttribute('data-sortorder');
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.radioSortOrder', this).on('click', function () {
|
$('.chkStandardFilter', this).on('change', function () {
|
||||||
query.SortOrder = this.getAttribute('data-sortorder');
|
|
||||||
query.StartIndex = 0;
|
|
||||||
reloadItems(page);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.chkStandardFilter', this).on('change', function () {
|
var filterName = this.getAttribute('data-filter');
|
||||||
|
var filters = query.Filters || "";
|
||||||
|
|
||||||
var filterName = this.getAttribute('data-filter');
|
filters = (',' + filters).replace(',' + filterName, '').substring(1);
|
||||||
var filters = query.Filters || "";
|
|
||||||
|
|
||||||
filters = (',' + filters).replace(',' + filterName, '').substring(1);
|
if (this.checked) {
|
||||||
|
filters = filters ? (filters + ',' + filterName) : filterName;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.checked) {
|
query.StartIndex = 0;
|
||||||
filters = filters ? (filters + ',' + filterName) : filterName;
|
query.Filters = filters;
|
||||||
}
|
|
||||||
|
|
||||||
query.StartIndex = 0;
|
reloadItems(page);
|
||||||
query.Filters = filters;
|
});
|
||||||
|
|
||||||
reloadItems(page);
|
}).on('pagebeforeshow', "#gameGenresPage", function () {
|
||||||
});
|
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#gameGenresPage", function () {
|
var limit = LibraryBrowser.getDefaultPageSize();
|
||||||
|
|
||||||
reloadItems(this);
|
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
}).on('pageshow', "#gameGenresPage", function () {
|
reloadItems(this);
|
||||||
|
|
||||||
// Reset form values using the last used query
|
}).on('pageshow', "#gameGenresPage", function () {
|
||||||
$('.radioSortBy', this).each(function () {
|
|
||||||
|
|
||||||
this.checked = query.SortBy == this.getAttribute('data-sortby');
|
// Reset form values using the last used query
|
||||||
|
$('.radioSortBy', this).each(function () {
|
||||||
|
|
||||||
}).checkboxradio('refresh');
|
this.checked = query.SortBy == this.getAttribute('data-sortby');
|
||||||
|
|
||||||
$('.radioSortOrder', this).each(function () {
|
}).checkboxradio('refresh');
|
||||||
|
|
||||||
this.checked = query.SortOrder == this.getAttribute('data-sortorder');
|
$('.radioSortOrder', this).each(function () {
|
||||||
|
|
||||||
}).checkboxradio('refresh');
|
this.checked = query.SortOrder == this.getAttribute('data-sortorder');
|
||||||
});
|
|
||||||
|
}).checkboxradio('refresh');
|
||||||
|
});
|
||||||
|
|
||||||
})(jQuery, document);
|
})(jQuery, document);
|
|
@ -84,8 +84,6 @@
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
|
||||||
|
|
||||||
$('.radioSortBy', this).on('click', function () {
|
$('.radioSortBy', this).on('click', function () {
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
query.SortBy = this.getAttribute('data-sortby');
|
query.SortBy = this.getAttribute('data-sortby');
|
||||||
|
@ -156,6 +154,14 @@
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#gamesPage", function () {
|
}).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);
|
reloadItems(this);
|
||||||
|
|
||||||
}).on('pageshow', "#gamesPage", function () {
|
}).on('pageshow', "#gamesPage", function () {
|
||||||
|
|
|
@ -1,116 +1,122 @@
|
||||||
(function ($, document) {
|
(function ($, document) {
|
||||||
|
|
||||||
// The base query options
|
// The base query options
|
||||||
var query = {
|
var query = {
|
||||||
|
|
||||||
SortBy: "SortName",
|
SortBy: "SortName",
|
||||||
SortOrder: "Ascending",
|
SortOrder: "Ascending",
|
||||||
MediaTypes: "Game",
|
MediaTypes: "Game",
|
||||||
Recursive: true,
|
Recursive: true,
|
||||||
Fields: "ItemCounts,DateCreated,UserData",
|
Fields: "ItemCounts,DateCreated,UserData",
|
||||||
StartIndex: 0
|
StartIndex: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
function reloadItems(page) {
|
function reloadItems(page) {
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
ApiClient.getStudios(Dashboard.getCurrentUserId(), query).done(function (result) {
|
ApiClient.getStudios(Dashboard.getCurrentUserId(), query).done(function (result) {
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
|
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
|
||||||
|
|
||||||
html += LibraryBrowser.getPosterDetailViewHtml({
|
html += LibraryBrowser.getPosterDetailViewHtml({
|
||||||
items: result.Items,
|
items: result.Items,
|
||||||
countNameSingular: "Game",
|
countNameSingular: "Game",
|
||||||
countNamePlural: "Games",
|
countNamePlural: "Games",
|
||||||
context: "games"
|
context: "games"
|
||||||
});
|
});
|
||||||
|
|
||||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||||
|
|
||||||
$('#items', page).html(html).trigger('create');
|
$('#items', page).html(html).trigger('create');
|
||||||
|
|
||||||
$('.selectPage', page).on('change', function () {
|
$('.selectPage', page).on('change', function () {
|
||||||
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.btnNextPage', page).on('click', function () {
|
$('.btnNextPage', page).on('click', function () {
|
||||||
query.StartIndex += query.Limit;
|
query.StartIndex += query.Limit;
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.btnPreviousPage', page).on('click', function () {
|
$('.btnPreviousPage', page).on('click', function () {
|
||||||
query.StartIndex -= query.Limit;
|
query.StartIndex -= query.Limit;
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.selectPageSize', page).on('change', function () {
|
$('.selectPageSize', page).on('change', function () {
|
||||||
query.Limit = parseInt(this.value);
|
query.Limit = parseInt(this.value);
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('pageinit', "#gameStudiosPage", function () {
|
$(document).on('pageinit', "#gameStudiosPage", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
$('.radioSortBy', this).on('click', function () {
|
||||||
|
query.SortBy = this.getAttribute('data-sortby');
|
||||||
|
query.StartIndex = 0;
|
||||||
|
reloadItems(page);
|
||||||
|
});
|
||||||
|
|
||||||
$('.radioSortBy', this).on('click', function () {
|
$('.radioSortOrder', this).on('click', function () {
|
||||||
query.SortBy = this.getAttribute('data-sortby');
|
query.SortOrder = this.getAttribute('data-sortorder');
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.radioSortOrder', this).on('click', function () {
|
$('.chkStandardFilter', this).on('change', function () {
|
||||||
query.SortOrder = this.getAttribute('data-sortorder');
|
|
||||||
query.StartIndex = 0;
|
|
||||||
reloadItems(page);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.chkStandardFilter', this).on('change', function () {
|
var filterName = this.getAttribute('data-filter');
|
||||||
|
var filters = query.Filters || "";
|
||||||
|
|
||||||
var filterName = this.getAttribute('data-filter');
|
filters = (',' + filters).replace(',' + filterName, '').substring(1);
|
||||||
var filters = query.Filters || "";
|
|
||||||
|
|
||||||
filters = (',' + filters).replace(',' + filterName, '').substring(1);
|
if (this.checked) {
|
||||||
|
filters = filters ? (filters + ',' + filterName) : filterName;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.checked) {
|
query.StartIndex = 0;
|
||||||
filters = filters ? (filters + ',' + filterName) : filterName;
|
query.Filters = filters;
|
||||||
}
|
|
||||||
|
|
||||||
query.StartIndex = 0;
|
reloadItems(page);
|
||||||
query.Filters = filters;
|
});
|
||||||
|
|
||||||
reloadItems(page);
|
}).on('pagebeforeshow', "#gameStudiosPage", function () {
|
||||||
});
|
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#gameStudiosPage", function () {
|
var limit = LibraryBrowser.getDefaultPageSize();
|
||||||
|
|
||||||
reloadItems(this);
|
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
}).on('pageshow', "#gameStudiosPage", function () {
|
reloadItems(this);
|
||||||
|
|
||||||
// Reset form values using the last used query
|
}).on('pageshow', "#gameStudiosPage", function () {
|
||||||
$('.radioSortBy', this).each(function () {
|
|
||||||
|
|
||||||
this.checked = query.SortBy == this.getAttribute('data-sortby');
|
// Reset form values using the last used query
|
||||||
|
$('.radioSortBy', this).each(function () {
|
||||||
|
|
||||||
}).checkboxradio('refresh');
|
this.checked = query.SortBy == this.getAttribute('data-sortby');
|
||||||
|
|
||||||
$('.radioSortOrder', this).each(function () {
|
}).checkboxradio('refresh');
|
||||||
|
|
||||||
this.checked = query.SortOrder == this.getAttribute('data-sortorder');
|
$('.radioSortOrder', this).each(function () {
|
||||||
|
|
||||||
}).checkboxradio('refresh');
|
this.checked = query.SortOrder == this.getAttribute('data-sortorder');
|
||||||
|
|
||||||
});
|
}).checkboxradio('refresh');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
})(jQuery, document);
|
})(jQuery, document);
|
|
@ -1,122 +1,128 @@
|
||||||
|
|
||||||
(function ($, document) {
|
(function ($, document) {
|
||||||
|
|
||||||
// The base query options
|
// The base query options
|
||||||
var query = {
|
var query = {
|
||||||
|
|
||||||
SortBy: "SortName",
|
SortBy: "SortName",
|
||||||
SortOrder: "Ascending",
|
SortOrder: "Ascending",
|
||||||
IncludeItemTypes: "GamePlatform",
|
IncludeItemTypes: "GamePlatform",
|
||||||
Recursive: true,
|
Recursive: true,
|
||||||
Fields: "ItemCounts,ItemCounts,DateCreated,UserData",
|
Fields: "ItemCounts,ItemCounts,DateCreated,UserData",
|
||||||
StartIndex: 0
|
StartIndex: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
function reloadItems(page) {
|
function reloadItems(page) {
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
ApiClient.getItems(Dashboard.getCurrentUserId(), query).done(function (result) {
|
ApiClient.getItems(Dashboard.getCurrentUserId(), query).done(function (result) {
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
|
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
|
||||||
|
|
||||||
html += LibraryBrowser.getPosterDetailViewHtml({
|
html += LibraryBrowser.getPosterDetailViewHtml({
|
||||||
items: result.Items,
|
items: result.Items,
|
||||||
context: "games"
|
context: "games"
|
||||||
});
|
});
|
||||||
|
|
||||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||||
|
|
||||||
$('#items', page).html(html).trigger('create');
|
$('#items', page).html(html).trigger('create');
|
||||||
|
|
||||||
$('.selectPage', page).on('change', function () {
|
$('.selectPage', page).on('change', function () {
|
||||||
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.btnNextPage', page).on('click', function () {
|
$('.btnNextPage', page).on('click', function () {
|
||||||
query.StartIndex += query.Limit;
|
query.StartIndex += query.Limit;
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.btnPreviousPage', page).on('click', function () {
|
$('.btnPreviousPage', page).on('click', function () {
|
||||||
query.StartIndex -= query.Limit;
|
query.StartIndex -= query.Limit;
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.selectPageSize', page).on('change', function () {
|
$('.selectPageSize', page).on('change', function () {
|
||||||
query.Limit = parseInt(this.value);
|
query.Limit = parseInt(this.value);
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('pageinit', "#gamesystemsPage", function () {
|
$(document).on('pageinit', "#gamesystemsPage", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
$('.radioSortBy', this).on('click', function () {
|
||||||
|
query.SortBy = this.getAttribute('data-sortby');
|
||||||
|
reloadItems(page);
|
||||||
|
});
|
||||||
|
|
||||||
$('.radioSortBy', this).on('click', function () {
|
$('.radioSortOrder', this).on('click', function () {
|
||||||
query.SortBy = this.getAttribute('data-sortby');
|
query.SortOrder = this.getAttribute('data-sortorder');
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.radioSortOrder', this).on('click', function () {
|
$('.chkStandardFilter', this).on('change', function () {
|
||||||
query.SortOrder = this.getAttribute('data-sortorder');
|
|
||||||
reloadItems(page);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.chkStandardFilter', this).on('change', function () {
|
var filterName = this.getAttribute('data-filter');
|
||||||
|
var filters = query.Filters || "";
|
||||||
|
|
||||||
var filterName = this.getAttribute('data-filter');
|
filters = (',' + filters).replace(',' + filterName, '').substring(1);
|
||||||
var filters = query.Filters || "";
|
|
||||||
|
|
||||||
filters = (',' + filters).replace(',' + filterName, '').substring(1);
|
if (this.checked) {
|
||||||
|
filters = filters ? (filters + ',' + filterName) : filterName;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.checked) {
|
query.StartIndex = 0;
|
||||||
filters = filters ? (filters + ',' + filterName) : filterName;
|
query.Filters = filters;
|
||||||
}
|
|
||||||
|
|
||||||
query.StartIndex = 0;
|
reloadItems(page);
|
||||||
query.Filters = filters;
|
});
|
||||||
|
|
||||||
reloadItems(page);
|
}).on('pagebeforeshow', "#gamesystemsPage", function () {
|
||||||
});
|
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#gamesystemsPage", function () {
|
var limit = LibraryBrowser.getDefaultPageSize();
|
||||||
|
|
||||||
reloadItems(this);
|
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
}).on('pageshow', "#gamesystemsPage", function () {
|
reloadItems(this);
|
||||||
|
|
||||||
// Reset form values using the last used query
|
}).on('pageshow', "#gamesystemsPage", function () {
|
||||||
$('.radioSortBy', this).each(function () {
|
|
||||||
|
|
||||||
this.checked = query.SortBy == this.getAttribute('data-sortby');
|
// Reset form values using the last used query
|
||||||
|
$('.radioSortBy', this).each(function () {
|
||||||
|
|
||||||
}).checkboxradio('refresh');
|
this.checked = query.SortBy == this.getAttribute('data-sortby');
|
||||||
|
|
||||||
$('.radioSortOrder', this).each(function () {
|
}).checkboxradio('refresh');
|
||||||
|
|
||||||
this.checked = query.SortOrder == this.getAttribute('data-sortorder');
|
$('.radioSortOrder', this).each(function () {
|
||||||
|
|
||||||
}).checkboxradio('refresh');
|
this.checked = query.SortOrder == this.getAttribute('data-sortorder');
|
||||||
|
|
||||||
$('.chkStandardFilter', this).each(function () {
|
}).checkboxradio('refresh');
|
||||||
|
|
||||||
var filters = "," + (query.Filters || "");
|
$('.chkStandardFilter', this).each(function () {
|
||||||
var filterName = this.getAttribute('data-filter');
|
|
||||||
|
|
||||||
this.checked = filters.indexOf(',' + filterName) != -1;
|
var filters = "," + (query.Filters || "");
|
||||||
|
var filterName = this.getAttribute('data-filter');
|
||||||
|
|
||||||
}).checkboxradio('refresh');
|
this.checked = filters.indexOf(',' + filterName) != -1;
|
||||||
});
|
|
||||||
|
}).checkboxradio('refresh');
|
||||||
|
});
|
||||||
|
|
||||||
})(jQuery, document);
|
})(jQuery, document);
|
||||||
|
|
|
@ -99,8 +99,6 @@
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
|
||||||
|
|
||||||
$('.radioSortBy', this).on('click', function () {
|
$('.radioSortBy', this).on('click', function () {
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
query.SortBy = this.getAttribute('data-sortby');
|
query.SortBy = this.getAttribute('data-sortby');
|
||||||
|
@ -144,6 +142,7 @@
|
||||||
|
|
||||||
}).on('pageshow', "#itemListPage", function () {
|
}).on('pageshow', "#itemListPage", function () {
|
||||||
|
|
||||||
|
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||||
query.ParentId = getParameterByName('parentId');
|
query.ParentId = getParameterByName('parentId');
|
||||||
query.Filters = "";
|
query.Filters = "";
|
||||||
query.SortBy = "SortName";
|
query.SortBy = "SortName";
|
||||||
|
|
|
@ -796,7 +796,8 @@
|
||||||
|
|
||||||
var recordsEnd = Math.min(query.StartIndex + query.Limit, totalRecordCount);
|
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">';
|
html += '<div class="listPaging">';
|
||||||
|
|
||||||
|
|
|
@ -61,8 +61,6 @@
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
|
||||||
|
|
||||||
$('.radioSortBy', this).on('click', function () {
|
$('.radioSortBy', this).on('click', function () {
|
||||||
query.SortBy = this.getAttribute('data-sortby');
|
query.SortBy = this.getAttribute('data-sortby');
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
|
@ -94,6 +92,14 @@
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#movieGenresPage", function () {
|
}).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);
|
reloadItems(this);
|
||||||
|
|
||||||
}).on('pageshow', "#movieGenresPage", function () {
|
}).on('pageshow', "#movieGenresPage", function () {
|
||||||
|
|
|
@ -62,8 +62,6 @@
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
|
||||||
|
|
||||||
$('.radioSortBy', this).on('click', function () {
|
$('.radioSortBy', this).on('click', function () {
|
||||||
query.SortBy = this.getAttribute('data-sortby');
|
query.SortBy = this.getAttribute('data-sortby');
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
|
@ -112,6 +110,14 @@
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#moviePeoplePage", function () {
|
}).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);
|
reloadItems(this);
|
||||||
|
|
||||||
}).on('pageshow', "#moviePeoplePage", function () {
|
}).on('pageshow', "#moviePeoplePage", function () {
|
||||||
|
|
|
@ -83,8 +83,6 @@
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
|
||||||
|
|
||||||
$('.radioSortBy', this).on('click', function () {
|
$('.radioSortBy', this).on('click', function () {
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
query.SortBy = this.getAttribute('data-sortby');
|
query.SortBy = this.getAttribute('data-sortby');
|
||||||
|
@ -199,6 +197,14 @@
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#moviesPage", function () {
|
}).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);
|
reloadItems(this);
|
||||||
|
|
||||||
}).on('pageshow', "#moviesPage", function () {
|
}).on('pageshow', "#moviesPage", function () {
|
||||||
|
|
|
@ -61,8 +61,6 @@
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
|
||||||
|
|
||||||
$('.radioSortBy', this).on('click', function () {
|
$('.radioSortBy', this).on('click', function () {
|
||||||
query.SortBy = this.getAttribute('data-sortby');
|
query.SortBy = this.getAttribute('data-sortby');
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
|
@ -94,6 +92,14 @@
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#movieStudiosPage", function () {
|
}).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);
|
reloadItems(this);
|
||||||
|
|
||||||
}).on('pageshow', "#movieStudiosPage", function () {
|
}).on('pageshow', "#movieStudiosPage", function () {
|
||||||
|
|
|
@ -70,8 +70,6 @@
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
|
||||||
|
|
||||||
$('.radioSortBy', this).on('click', function () {
|
$('.radioSortBy', this).on('click', function () {
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
query.SortBy = this.getAttribute('data-sortby');
|
query.SortBy = this.getAttribute('data-sortby');
|
||||||
|
@ -110,6 +108,14 @@
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#movieTrailersPage", function () {
|
}).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);
|
reloadItems(this);
|
||||||
|
|
||||||
}).on('pageshow', "#movieTrailersPage", function () {
|
}).on('pageshow', "#movieTrailersPage", function () {
|
||||||
|
|
|
@ -74,8 +74,6 @@
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
|
||||||
|
|
||||||
$('.radioSortBy', this).on('click', function () {
|
$('.radioSortBy', this).on('click', function () {
|
||||||
query.SortBy = this.getAttribute('data-sortby');
|
query.SortBy = this.getAttribute('data-sortby');
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
|
@ -122,6 +120,14 @@
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#musicAlbumsPage", function () {
|
}).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);
|
reloadItems(this);
|
||||||
|
|
||||||
}).on('pageshow', "#musicAlbumsPage", function () {
|
}).on('pageshow', "#musicAlbumsPage", function () {
|
||||||
|
|
|
@ -62,8 +62,6 @@
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
|
||||||
|
|
||||||
$('.radioSortBy', this).on('click', function () {
|
$('.radioSortBy', this).on('click', function () {
|
||||||
query.SortBy = this.getAttribute('data-sortby');
|
query.SortBy = this.getAttribute('data-sortby');
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
|
@ -102,6 +100,14 @@
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#musicArtistsPage", function () {
|
}).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);
|
reloadItems(this);
|
||||||
|
|
||||||
}).on('pageshow', "#musicArtistsPage", function () {
|
}).on('pageshow', "#musicArtistsPage", function () {
|
||||||
|
|
|
@ -61,8 +61,6 @@
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
|
||||||
|
|
||||||
$('.radioSortBy', this).on('click', function () {
|
$('.radioSortBy', this).on('click', function () {
|
||||||
query.SortBy = this.getAttribute('data-sortby');
|
query.SortBy = this.getAttribute('data-sortby');
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
|
@ -94,6 +92,14 @@
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#musicGenresPage", function () {
|
}).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);
|
reloadItems(this);
|
||||||
|
|
||||||
}).on('pageshow', "#musicGenresPage", function () {
|
}).on('pageshow', "#musicGenresPage", function () {
|
||||||
|
|
|
@ -61,8 +61,6 @@
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
|
||||||
|
|
||||||
$('.radioSortBy', this).on('click', function () {
|
$('.radioSortBy', this).on('click', function () {
|
||||||
query.SortBy = this.getAttribute('data-sortby');
|
query.SortBy = this.getAttribute('data-sortby');
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
|
@ -94,6 +92,14 @@
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#tvGenresPage", function () {
|
}).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);
|
reloadItems(this);
|
||||||
|
|
||||||
}).on('pageshow', "#tvGenresPage", function () {
|
}).on('pageshow', "#tvGenresPage", function () {
|
||||||
|
|
|
@ -62,8 +62,6 @@
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
|
||||||
|
|
||||||
$('.radioSortBy', this).on('click', function () {
|
$('.radioSortBy', this).on('click', function () {
|
||||||
query.SortBy = this.getAttribute('data-sortby');
|
query.SortBy = this.getAttribute('data-sortby');
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
|
@ -112,6 +110,14 @@
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#tvPeoplePage", function () {
|
}).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);
|
reloadItems(this);
|
||||||
|
|
||||||
}).on('pageshow', "#tvPeoplePage", function () {
|
}).on('pageshow', "#tvPeoplePage", function () {
|
||||||
|
|
|
@ -80,8 +80,6 @@
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
|
||||||
|
|
||||||
$('.radioSortBy', this).on('click', function () {
|
$('.radioSortBy', this).on('click', function () {
|
||||||
query.SortBy = this.getAttribute('data-sortby');
|
query.SortBy = this.getAttribute('data-sortby');
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
|
@ -183,6 +181,14 @@
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#tvShowsPage", function () {
|
}).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);
|
reloadItems(this);
|
||||||
|
|
||||||
}).on('pageshow', "#tvShowsPage", function () {
|
}).on('pageshow', "#tvShowsPage", function () {
|
||||||
|
|
|
@ -61,8 +61,6 @@
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
|
||||||
|
|
||||||
$('.radioSortBy', this).on('click', function () {
|
$('.radioSortBy', this).on('click', function () {
|
||||||
query.SortBy = this.getAttribute('data-sortby');
|
query.SortBy = this.getAttribute('data-sortby');
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
|
@ -94,6 +92,14 @@
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#tvStudiosPage", function () {
|
}).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);
|
reloadItems(this);
|
||||||
|
|
||||||
}).on('pageshow', "#tvStudiosPage", function () {
|
}).on('pageshow', "#tvStudiosPage", function () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue