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

added air days filters to the tv shows page

This commit is contained in:
Luke Pulverenti 2013-04-09 14:56:40 -04:00
parent a61f2f4840
commit 2d3d5c2d9b
2 changed files with 45 additions and 0 deletions

View file

@ -143,6 +143,22 @@
reloadItems(page);
});
$('.chkAirDays', this).on('change', function () {
var filterName = this.getAttribute('data-filter');
var filters = query.AirDays || "";
filters = (',' + filters).replace(',' + filterName, '').substring(1);
if (this.checked) {
filters = filters ? (filters + ',' + filterName) : filterName;
}
query.AirDays = filters;
reloadItems(page);
});
}).on('pagebeforeshow', "#tvShowsPage", function () {
reloadItems(this);
@ -179,6 +195,15 @@
this.checked = filters.indexOf(',' + filterName) != -1;
}).checkboxradio('refresh');
$('.chkAirDays', this).each(function () {
var filters = "," + (query.AirDays || "");
var filterName = this.getAttribute('data-filter');
this.checked = filters.indexOf(',' + filterName) != -1;
}).checkboxradio('refresh');
});
})(jQuery, document);