mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added series status filter
This commit is contained in:
parent
72a4598a2e
commit
282f3a31c9
3 changed files with 135 additions and 100 deletions
|
@ -52,7 +52,7 @@
|
|||
|
||||
html += "<img style='background:" + LibraryBrowser.getMetroColor(item.Id) + ";' src='css/images/items/list/audio.png' />";
|
||||
}
|
||||
else if (item.MediaType == "Video") {
|
||||
else if (item.MediaType == "Video" || item.Type == "Season" || item.Type == "Series") {
|
||||
|
||||
html += "<img style='background:" + LibraryBrowser.getMetroColor(item.Id) + ";' src='css/images/items/list/video.png' />";
|
||||
}
|
||||
|
|
|
@ -127,6 +127,22 @@
|
|||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.chkStatus', this).on('change', function () {
|
||||
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
var filters = query.SeriesStatus || "";
|
||||
|
||||
filters = (',' + filters).replace(',' + filterName, '').substring(1);
|
||||
|
||||
if (this.checked) {
|
||||
filters = filters ? (filters + ',' + filterName) : filterName;
|
||||
}
|
||||
|
||||
query.SeriesStatus = filters;
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
}).on('pagebeforeshow', "#tvShowsPage", function () {
|
||||
|
||||
reloadItems(this);
|
||||
|
@ -140,6 +156,15 @@
|
|||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.chkStatus', this).each(function () {
|
||||
|
||||
var filters = "," + (query.SeriesStatus || "");
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
||||
this.checked = filters.indexOf(',' + filterName) != -1;
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.radioSortOrder', this).each(function () {
|
||||
|
||||
this.checked = query.SortOrder == this.getAttribute('data-sortorder');
|
||||
|
|
|
@ -74,6 +74,16 @@
|
|||
<input class="chkStandardFilter" type="checkbox" name="chkDislikes" id="chkDislikes" data-theme="c" data-filter="Dislikes">
|
||||
<label for="chkDislikes">Dislikes</label>
|
||||
</fieldset>
|
||||
|
||||
<fieldset data-role="controlgroup">
|
||||
<legend>
|
||||
<h3>Status:</h3>
|
||||
</legend>
|
||||
<input class="chkStatus" type="checkbox" name="chkStatusContinuing" id="chkStatusContinuing" data-theme="c" data-filter="Continuing">
|
||||
<label for="chkStatusContinuing">Continuing</label>
|
||||
<input class="chkStatus" type="checkbox" name="chkStatusEnded" id="chkStatusEnded" data-theme="c" data-filter="Ended">
|
||||
<label for="chkStatusEnded">Ended</label>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue