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

added video type filters to movie page

This commit is contained in:
Luke Pulverenti 2013-04-04 11:38:41 -04:00
parent dc6f23d058
commit 720756b501
2 changed files with 40 additions and 0 deletions

View file

@ -127,6 +127,23 @@
reloadItems(page);
});
$('.chkVideoTypeFilter', this).on('change', function () {
var filterName = this.getAttribute('data-filter');
var filters = query.VideoTypes || "";
filters = (',' + filters).replace(',' + filterName, '').substring(1);
if (this.checked) {
filters = filters ? (filters + ',' + filterName) : filterName;
}
query.VideoTypes = filters;
reloadItems(page);
});
}).on('pageshow', "#moviesPage", function () {
reloadItems(this);
@ -152,6 +169,15 @@
this.checked = filters.indexOf(',' + filterName) != -1;
}).checkboxradio('refresh');
$('.chkVideoTypeFilter', this).each(function () {
var filters = "," + (query.VideoTypes || "");
var filterName = this.getAttribute('data-filter');
this.checked = filters.indexOf(',' + filterName) != -1;
}).checkboxradio('refresh');
});
})(jQuery, document);