mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added players filter to games view
This commit is contained in:
parent
a67cfcd763
commit
77d5abf6d8
2 changed files with 42 additions and 1 deletions
|
@ -99,6 +99,24 @@
|
||||||
<label for="chkDislikes">Dislikes</label>
|
<label for="chkDislikes">Dislikes</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset data-role="controlgroup">
|
||||||
|
<legend>
|
||||||
|
<strong>Players:</strong>
|
||||||
|
</legend>
|
||||||
|
|
||||||
|
<input class="radioPlayers" data-theme="c" type="radio" name="radioPlayers" id="radioAll" value="on" checked="checked" data-value="all" data-mini="true">
|
||||||
|
<label for="radioAll">Any</label>
|
||||||
|
|
||||||
|
<input class="radioPlayers" data-theme="c" type="radio" name="radioPlayers" id="radioTwo" value="off" data-value="2" data-mini="true">
|
||||||
|
<label for="radioTwo">2+</label>
|
||||||
|
|
||||||
|
<input class="radioPlayers" data-theme="c" type="radio" name="radioPlayers" id="radioThree" value="off" data-value="3" data-mini="true">
|
||||||
|
<label for="radioThree">3+</label>
|
||||||
|
|
||||||
|
<input class="radioPlayers" data-theme="c" type="radio" name="radioPlayers" id="radioFour" value="off" data-value="4" data-mini="true">
|
||||||
|
<label for="radioFour">4+</label>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
<fieldset data-role="controlgroup">
|
<fieldset data-role="controlgroup">
|
||||||
<legend>
|
<legend>
|
||||||
<strong>Features:</strong>
|
<strong>Features:</strong>
|
||||||
|
|
|
@ -99,6 +99,17 @@
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.radioPlayers', this).on('click', function () {
|
||||||
|
|
||||||
|
query.StartIndex = 0;
|
||||||
|
|
||||||
|
var val = this.getAttribute('data-value');
|
||||||
|
|
||||||
|
query.MinPlayers = val == "all" ? null : val;
|
||||||
|
|
||||||
|
reloadItems(page);
|
||||||
|
});
|
||||||
|
|
||||||
$('.chkStandardFilter', this).on('change', function () {
|
$('.chkStandardFilter', this).on('change', function () {
|
||||||
|
|
||||||
var filterName = this.getAttribute('data-filter');
|
var filterName = this.getAttribute('data-filter');
|
||||||
|
@ -197,6 +208,19 @@
|
||||||
|
|
||||||
}).checkboxradio('refresh');
|
}).checkboxradio('refresh');
|
||||||
|
|
||||||
|
$('.radioPlayers', this).each(function () {
|
||||||
|
|
||||||
|
var val = this.getAttribute('data-value');
|
||||||
|
|
||||||
|
if (val == "all") {
|
||||||
|
|
||||||
|
this.checked = query.MinPlayers == null;
|
||||||
|
} else {
|
||||||
|
this.checked = query.MinPlayers == val;
|
||||||
|
}
|
||||||
|
|
||||||
|
}).checkboxradio('refresh');
|
||||||
|
|
||||||
$('.chkStandardFilter', this).each(function () {
|
$('.chkStandardFilter', this).each(function () {
|
||||||
|
|
||||||
var filters = "," + (query.Filters || "");
|
var filters = "," + (query.Filters || "");
|
||||||
|
@ -206,7 +230,6 @@
|
||||||
|
|
||||||
}).checkboxradio('refresh');
|
}).checkboxradio('refresh');
|
||||||
|
|
||||||
|
|
||||||
$('#selectView', this).val(view).selectmenu('refresh');
|
$('#selectView', this).val(view).selectmenu('refresh');
|
||||||
|
|
||||||
$('#chkTrailer', this).checked(query.HasTrailer == true).checkboxradio('refresh');
|
$('#chkTrailer', this).checked(query.HasTrailer == true).checkboxradio('refresh');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue