mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add a new endpoint param IsFavorite and use it for reports
This commit is contained in:
parent
93f483f0ae
commit
4040c6d8d0
2 changed files with 38 additions and 6 deletions
|
@ -103,17 +103,21 @@
|
||||||
<input class="chkStandardFilter" type="checkbox" name="chkResumable" id="chkResumable" data-filter="IsResumable">
|
<input class="chkStandardFilter" type="checkbox" name="chkResumable" id="chkResumable" data-filter="IsResumable">
|
||||||
<label for="chkResumable">${OptionResumable}</label>
|
<label for="chkResumable">${OptionResumable}</label>
|
||||||
|
|
||||||
<input class="chkStandardFilter" type="checkbox" name="chkIsFavorite" id="chkIsFavorite" data-filter="IsFavorite">
|
|
||||||
<label for="chkIsFavorite">${OptionFavorite}</label>
|
|
||||||
|
|
||||||
<input class="chkStandardFilter" type="checkbox" name="chkIsNotFavorite" id="chkIsNotFavorite" data-filter="IsNotFavorite">
|
|
||||||
<label for="chkIsNotFavorite">Not ${OptionFavorite}</label>
|
|
||||||
|
|
||||||
<input class="chkStandardFilter" type="checkbox" name="chkLikes" id="chkLikes" data-filter="Likes">
|
<input class="chkStandardFilter" type="checkbox" name="chkLikes" id="chkLikes" data-filter="Likes">
|
||||||
<label for="chkLikes">${OptionLikes}</label>
|
<label for="chkLikes">${OptionLikes}</label>
|
||||||
|
|
||||||
<input class="chkStandardFilter" type="checkbox" name="chkDislikes" id="chkDislikes" data-filter="Dislikes">
|
<input class="chkStandardFilter" type="checkbox" name="chkDislikes" id="chkDislikes" data-filter="Dislikes">
|
||||||
<label for="chkDislikes">${OptionDislikes}</label>
|
<label for="chkDislikes">${OptionDislikes}</label>
|
||||||
|
|
||||||
|
<div id="isFavoriteDiv">
|
||||||
|
<label for="isFavorite"></label>
|
||||||
|
<select id="isFavorite" class="isFavorite">
|
||||||
|
<option value="-">${OptionFavorite}: All</option>
|
||||||
|
<option value="true">${OptionFavorite}: True</option>
|
||||||
|
<option value="false">${OptionFavorite}: False</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|
|
@ -513,6 +513,19 @@
|
||||||
$('#chkFutureEpisode', page).checked(query.IsUnaired == true).checkboxradio('refresh');
|
$('#chkFutureEpisode', page).checked(query.IsUnaired == true).checkboxradio('refresh');
|
||||||
|
|
||||||
$('#selectIncludeItemTypes').val(query.IncludeItemTypes);
|
$('#selectIncludeItemTypes').val(query.IncludeItemTypes);
|
||||||
|
|
||||||
|
// isfavorite
|
||||||
|
if (query.IsFavorite == true) {
|
||||||
|
$('#isFavorite').val("true");
|
||||||
|
}
|
||||||
|
else if (query.IsFavorite == false) {
|
||||||
|
$('#isFavorite').val("false");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('#isFavorite').val("-");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var filtersLoaded;
|
var filtersLoaded;
|
||||||
|
@ -601,6 +614,21 @@
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#isFavorite', page).on('change', function () {
|
||||||
|
|
||||||
|
if (this.value == "true") {
|
||||||
|
query.IsFavorite = true;
|
||||||
|
}
|
||||||
|
else if (this.value == "false") {
|
||||||
|
query.IsFavorite = false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
query.IsFavorite = null;
|
||||||
|
}
|
||||||
|
query.StartIndex = 0;
|
||||||
|
reloadItems(page);
|
||||||
|
});
|
||||||
|
|
||||||
$('.chkStandardFilter', this).on('change', function () {
|
$('.chkStandardFilter', this).on('change', function () {
|
||||||
|
|
||||||
var filterName = this.getAttribute('data-filter');
|
var filterName = this.getAttribute('data-filter');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue