1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

added sorting for series recordings

This commit is contained in:
Luke Pulverenti 2014-01-11 18:07:56 -05:00
parent eb07d62734
commit c1a71bf416
6 changed files with 116 additions and 9 deletions

View file

@ -1,5 +1,11 @@
(function ($, document, apiClient) {
var query = {
SortBy: "SortName",
SortOrder: "Ascending"
};
function deleteSeriesTimer(page, id) {
Dashboard.confirm("Are you sure you wish to cancel this series?", "Confirm Series Cancellation", function (result) {
@ -87,18 +93,54 @@
Dashboard.showLoadingMsg();
apiClient.getLiveTvSeriesTimers().done(function (result) {
apiClient.getLiveTvSeriesTimers(query).done(function (result) {
renderTimers(page, result.Items);
});
}
function updateFilterControls(page) {
// Reset form values using the last used query
$('.radioSortBy', page).each(function () {
this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase();
}).checkboxradio('refresh');
$('.radioSortOrder', page).each(function () {
this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase();
}).checkboxradio('refresh');
}
$(document).on('pagebeforeshow', "#liveTvSeriesTimersPage", function () {
var page = this;
reload(page);
}).on('pageinit', "#liveTvSeriesTimersPage", function () {
var page = this;
$('.radioSortBy', this).on('click', function () {
query.StartIndex = 0;
query.SortBy = this.getAttribute('data-sortby');
reload(page);
});
$('.radioSortOrder', this).on('click', function () {
query.StartIndex = 0;
query.SortOrder = this.getAttribute('data-sortorder');
reload(page);
});
}).on('pageshow', "#liveTvSeriesTimersPage", function () {
updateFilterControls(this);
});
})(jQuery, document, ApiClient);