added air days filters to the tv shows page
This commit is contained in:
@@ -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);
|
||||
Reference in New Issue
Block a user