mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Added episodes page
This commit is contained in:
parent
2c3202b32c
commit
20f38ac5f9
12 changed files with 384 additions and 201 deletions
137
dashboard-ui/episodes.html
Normal file
137
dashboard-ui/episodes.html
Normal file
|
@ -0,0 +1,137 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Media Browser</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="episodesPage" data-role="page" class="page libraryPage" data-theme="a" data-view="tv">
|
||||
|
||||
<div class="libraryViewNav">
|
||||
<a href="tvrecommended.html">Suggested</a>
|
||||
<a href="tvnextup.html">Next up</a>
|
||||
<a href="tvshows.html">Shows</a>
|
||||
<a href="episodes.html" class="ui-btn-active">Episodes</a>
|
||||
<a href="tvgenres.html">Genres</a>
|
||||
<a href="tvpeople.html">Actors</a>
|
||||
<a href="tvstudios.html">Networks</a>
|
||||
</div>
|
||||
|
||||
<div class="alphabetPicker">
|
||||
</div>
|
||||
<div data-role="content">
|
||||
<div class="viewSettings">
|
||||
<div class="viewControls">
|
||||
<button data-mini="true" data-icon="sort" data-inline="true" onclick="$('#sortPanel', $.mobile.activePage).panel( 'toggle' );">Sort</button>
|
||||
<button data-mini="true" data-icon="filter" data-inline="true" onclick="$('#filterPanel', $.mobile.activePage).panel( 'toggle' );">Filter</button>
|
||||
</div>
|
||||
<div class="listTopPaging">
|
||||
</div>
|
||||
</div>
|
||||
<div id="items" class="itemsContainer"></div>
|
||||
</div>
|
||||
<div data-role="panel" id="sortPanel" data-position="right" data-display="overlay" data-theme="b" data-position-fixed="true">
|
||||
|
||||
<form>
|
||||
<fieldset data-role="controlgroup">
|
||||
<legend>
|
||||
<strong>Sort By:</strong>
|
||||
</legend>
|
||||
|
||||
<input class="radioSortBy" type="radio" name="radioSortBy" data-theme="c" id="radioSeriesSortName" value="on" checked="checked" data-sortby="SeriesSortName,SortName" data-mini="true">
|
||||
<label for="radioSeriesSortName">Series name</label>
|
||||
|
||||
<input class="radioSortBy" type="radio" name="radioSortBy" data-theme="c" id="radioSortName" value="on" checked="checked" data-sortby="SortName" data-mini="true">
|
||||
<label for="radioSortName">Episode sort name</label>
|
||||
|
||||
<input class="radioSortBy" type="radio" name="radioSortBy" data-theme="c" id="radioCommunityRating" value="off" data-sortby="CommunityRating" data-mini="true">
|
||||
<label for="radioCommunityRating">Community rating</label>
|
||||
|
||||
<input class="radioSortBy" type="radio" name="radioSortBy" data-theme="c" id="radioContentRating" value="off" data-sortby="OfficialRating" data-mini="true">
|
||||
<label for="radioContentRating">Content rating</label>
|
||||
|
||||
<input class="radioSortBy" type="radio" name="radioSortBy" data-theme="c" id="radioDateCreated" value="off" data-sortby="DateCreated" data-mini="true">
|
||||
<label for="radioDateCreated">Date added</label>
|
||||
|
||||
<input class="radioSortBy" type="radio" name="radioSortBy" data-theme="c" id="radioDatePlayed" value="off" data-sortby="DatePlayed" data-mini="true">
|
||||
<label for="radioDatePlayed">Date played</label>
|
||||
|
||||
<input class="radioSortBy" type="radio" name="radioSortBy" data-theme="c" id="radioPremiereDate" value="off" data-sortby="PremiereDate" data-mini="true">
|
||||
<label for="radioPremiereDate">Date released</label>
|
||||
|
||||
<input class="radioSortBy" type="radio" name="radioSortBy" data-theme="c" id="radioPlayCount" value="off" data-sortby="PlayCount" data-mini="true">
|
||||
<label for="radioPlayCount">Play count</label>
|
||||
|
||||
<input class="radioSortBy" type="radio" name="radioSortBy" data-theme="c" id="radioRuntime" value="off" data-sortby="Runtime" data-mini="true">
|
||||
<label for="radioRuntime">Runtime</label>
|
||||
</fieldset>
|
||||
|
||||
<fieldset data-role="controlgroup">
|
||||
<legend>
|
||||
<strong>Sort Order:</strong>
|
||||
</legend>
|
||||
|
||||
<input class="radioSortOrder" type="radio" name="radioSortOrder" data-theme="c" id="radioAscending" value="on" checked="checked" data-sortorder="Ascending" data-mini="true">
|
||||
<label for="radioAscending">Ascending</label>
|
||||
|
||||
<input class="radioSortOrder" type="radio" name="radioSortOrder" data-theme="c" id="radioDescending" value="off" data-sortorder="Descending" data-mini="true">
|
||||
<label for="radioDescending">Descending</label>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<div data-role="panel" id="filterPanel" data-position="right" data-display="overlay" data-theme="b" data-position-fixed="true">
|
||||
<form>
|
||||
<fieldset data-role="controlgroup">
|
||||
<legend>
|
||||
<strong>Filters:</strong>
|
||||
</legend>
|
||||
<input class="chkStandardFilter" type="checkbox" data-theme="c" name="chkPlayed" id="chkPlayed" data-filter="IsPlayed" data-mini="true">
|
||||
<label for="chkPlayed">Watched</label>
|
||||
|
||||
<input class="chkStandardFilter" type="checkbox" data-theme="c" name="chkUnplayed" id="chkUnplayed" data-filter="IsUnPlayed" data-mini="true">
|
||||
<label for="chkUnplayed">Unwatched</label>
|
||||
|
||||
<input class="chkStandardFilter" type="checkbox" data-theme="c" name="chkResumable" id="chkResumable" data-filter="IsResumable" data-mini="true">
|
||||
<label for="chkResumable">Resumable</label>
|
||||
|
||||
<input class="chkStandardFilter" type="checkbox" data-theme="c" name="chkIsFavorite" id="chkIsFavorite" data-filter="IsFavorite" data-mini="true">
|
||||
<label for="chkIsFavorite">Favorite</label>
|
||||
|
||||
<input class="chkStandardFilter" type="checkbox" data-theme="c" name="chkLikes" id="chkLikes" data-filter="Likes" data-mini="true">
|
||||
<label for="chkLikes">Likes</label>
|
||||
|
||||
<input class="chkStandardFilter" type="checkbox" data-theme="c" name="chkDislikes" id="chkDislikes" data-filter="Dislikes" data-mini="true">
|
||||
<label for="chkDislikes">Dislikes</label>
|
||||
|
||||
<input type="checkbox" data-theme="c" name="chkSpecialFeature" id="chkSpecialFeature" data-mini="true">
|
||||
<label for="chkSpecialFeature">Season 0</label>
|
||||
|
||||
</fieldset>
|
||||
<fieldset data-role="controlgroup">
|
||||
<legend>
|
||||
<strong>Type:</strong>
|
||||
</legend>
|
||||
|
||||
<input class="chkVideoTypeFilter" type="checkbox" data-theme="c" name="chkBluray" id="chkBluray" data-filter="Bluray" data-mini="true">
|
||||
<label for="chkBluray">Bluray</label>
|
||||
|
||||
<input class="chkVideoTypeFilter" type="checkbox" data-theme="c" name="chkDvd" id="chkDvd" data-filter="Dvd" data-mini="true">
|
||||
<label for="chkDvd">Dvd</label>
|
||||
|
||||
<input class="chkVideoTypeFilter" type="checkbox" data-theme="c" name="chkIso" id="chkIso" data-filter="Iso" data-mini="true">
|
||||
<label for="chkIso">Iso</label>
|
||||
</fieldset>
|
||||
|
||||
<fieldset data-role="controlgroup">
|
||||
<legend>
|
||||
<strong>Features:</strong>
|
||||
</legend>
|
||||
|
||||
<input class="chkFeatureFilter" type="checkbox" data-theme="c" name="chkSubtitle" id="chkSubtitle" data-mini="true">
|
||||
<label for="chkSubtitle">Subtitles</label>
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,51 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Media Browser</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="favoriteTvPage" data-role="page" class="page libraryPage" data-theme="a" data-view="tvshows">
|
||||
<div class="libraryViewNav">
|
||||
<a href="tvrecommended.html">Suggested</a>
|
||||
<a href="tvnextup.html">Next up</a>
|
||||
<a href="tvshows.html">Shows</a>
|
||||
<a href="tvgenres.html">Genres</a>
|
||||
<a href="tvpeople.html">Actors</a>
|
||||
<a href="tvstudios.html">Networks</a>
|
||||
<a href="favoritetv.html" class="ui-btn-active">Favorites</a>
|
||||
</div>
|
||||
<div class="alphabetPicker">
|
||||
</div>
|
||||
<div data-role="content">
|
||||
<div style="text-align: center;">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="favoriteTypes" data-mini="true">
|
||||
<a href="#" data-role="button" class="btnFavoriteType btnFavoriteSeries ui-btn-active">Series</a>
|
||||
<a href="#" data-role="button" class="btnFavoriteType btnFavoriteSeasons">Seasons</a>
|
||||
<a href="#" data-role="button" class="btnFavoriteType btnFavoriteEpisodes">Episodes</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="viewSettings">
|
||||
<div class="viewControls">
|
||||
<button data-mini="true" data-icon="filter" data-inline="true" onclick="$('#filterPanel', $.mobile.activePage).panel( 'toggle' );">Filter</button>
|
||||
</div>
|
||||
<div class="listTopPaging">
|
||||
</div>
|
||||
</div>
|
||||
<div id="items" class="itemsContainer"></div>
|
||||
</div>
|
||||
<div data-role="panel" id="filterPanel" data-position="right" data-display="overlay" data-theme="b" data-position-fixed="true">
|
||||
<form>
|
||||
<fieldset data-role="controlgroup">
|
||||
<legend>
|
||||
<strong>Filters:</strong>
|
||||
</legend>
|
||||
<input type="checkbox" name="chkIncludeLikes" id="chkIncludeLikes" data-theme="c" data-mini="true">
|
||||
<label for="chkIncludeLikes">Includes likes</label>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -43,10 +43,10 @@
|
|||
<a href="tvrecommended.html">Suggested</a>
|
||||
<a href="tvnextup.html">Next up</a>
|
||||
<a href="tvshows.html">Shows</a>
|
||||
<a href="episodes.html">Episodes</a>
|
||||
<a href="tvgenres.html" class="ui-btn-active">Genres</a>
|
||||
<a href="tvpeople.html">Actors</a>
|
||||
<a href="tvstudios.html">Networks</a>
|
||||
<a href="favoritetv.html">Favorites</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tvPeopleTabs" class="itemTabs" style="display: none;">
|
||||
|
@ -54,10 +54,10 @@
|
|||
<a href="tvrecommended.html">Suggested</a>
|
||||
<a href="tvnextup.html">Next up</a>
|
||||
<a href="tvshows.html">Shows</a>
|
||||
<a href="episodes.html">Episodes</a>
|
||||
<a href="tvgenres.html">Genres</a>
|
||||
<a href="tvpeople.html" class="ui-btn-active">Actors</a>
|
||||
<a href="tvstudios.html">Networks</a>
|
||||
<a href="favoritetv.html">Favorites</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tvStudioTabs" class="itemTabs" style="display: none;">
|
||||
|
@ -65,10 +65,10 @@
|
|||
<a href="tvrecommended.html">Suggested</a>
|
||||
<a href="tvnextup.html">Next up</a>
|
||||
<a href="tvshows.html">Shows</a>
|
||||
<a href="episodes.html">Episodes</a>
|
||||
<a href="tvgenres.html">Genres</a>
|
||||
<a href="tvpeople.html">Actors</a>
|
||||
<a href="tvstudios.html" class="ui-btn-active">Networks</a>
|
||||
<a href="favoritetv.html">Favorites</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="musicGenreTabs" class="itemTabs" style="display: none;">
|
||||
|
|
|
@ -43,10 +43,10 @@
|
|||
<a href="tvrecommended.html">Suggested</a>
|
||||
<a href="tvnextup.html">Next up</a>
|
||||
<a href="tvshows.html" class="ui-btn-active">Shows</a>
|
||||
<a href="episodes.html">Episodes</a>
|
||||
<a href="tvgenres.html">Genres</a>
|
||||
<a href="tvpeople.html">Actors</a>
|
||||
<a href="tvstudios.html">Networks</a>
|
||||
<a href="favoritetv.html">Favorites</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="songTabs" class="itemTabs" style="display: none;">
|
||||
|
|
237
dashboard-ui/scripts/episodes.js
Normal file
237
dashboard-ui/scripts/episodes.js
Normal file
|
@ -0,0 +1,237 @@
|
|||
(function ($, document) {
|
||||
|
||||
var view = "Poster";
|
||||
|
||||
// The base query options
|
||||
var query = {
|
||||
|
||||
SortBy: "SeriesSortName,SortName",
|
||||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "Episode",
|
||||
Recursive: true,
|
||||
Fields: "DateCreated,SeriesInfo",
|
||||
StartIndex: 0
|
||||
};
|
||||
|
||||
function reloadItems(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), query).done(function (result) {
|
||||
|
||||
// Scroll back up so they can see the results from the beginning
|
||||
$(document).scrollTop(0);
|
||||
|
||||
var html = '';
|
||||
|
||||
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
|
||||
|
||||
if (view == "Poster") {
|
||||
html += LibraryBrowser.getPosterDetailViewHtml({
|
||||
items: result.Items,
|
||||
context: "tv",
|
||||
shape: "backdrop"
|
||||
});
|
||||
$('.itemsContainer', page).removeClass('timelineItemsContainer');
|
||||
}
|
||||
|
||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||
|
||||
$('#items', page).html(html).trigger('create');
|
||||
|
||||
$('.selectPage', page).on('change', function () {
|
||||
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.btnNextPage', page).on('click', function () {
|
||||
query.StartIndex += query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.btnPreviousPage', page).on('click', function () {
|
||||
query.StartIndex -= query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.selectPageSize', page).on('change', function () {
|
||||
query.Limit = parseInt(this.value);
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#episodesPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.StartIndex = 0;
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.radioSortOrder', this).on('click', function () {
|
||||
query.StartIndex = 0;
|
||||
query.SortOrder = this.getAttribute('data-sortorder');
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
var filters = query.Filters || "";
|
||||
|
||||
filters = (',' + filters).replace(',' + filterName, '').substring(1);
|
||||
|
||||
if (this.checked) {
|
||||
filters = filters ? (filters + ',' + filterName) : filterName;
|
||||
}
|
||||
|
||||
query.StartIndex = 0;
|
||||
query.Filters = filters;
|
||||
|
||||
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.StartIndex = 0;
|
||||
query.VideoTypes = filters;
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('#chk3D', this).on('change', function () {
|
||||
|
||||
query.StartIndex = 0;
|
||||
query.Is3D = this.checked ? true : null;
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('#chkSubtitle', this).on('change', function () {
|
||||
|
||||
query.StartIndex = 0;
|
||||
query.HasSubtitles = this.checked ? true : null;
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('#chkTrailer', this).on('change', function () {
|
||||
|
||||
query.StartIndex = 0;
|
||||
query.HasTrailer = this.checked ? true : null;
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('#chkThemeSong', this).on('change', function () {
|
||||
|
||||
query.StartIndex = 0;
|
||||
query.HasThemeSong = this.checked ? true : null;
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('#chkThemeVideo', this).on('change', function () {
|
||||
|
||||
query.StartIndex = 0;
|
||||
query.HasThemeVideo = this.checked ? true : null;
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('#chkSpecialFeature', this).on('change', function () {
|
||||
|
||||
query.ParentIndexNumber = this.checked ? 0 : null;
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.alphabetPicker', this).on('alphaselect', function (e, character) {
|
||||
|
||||
query.NameStartsWithOrGreater = character;
|
||||
query.StartIndex = 0;
|
||||
|
||||
reloadItems(page);
|
||||
|
||||
}).on('alphaclear', function (e) {
|
||||
|
||||
query.NameStartsWithOrGreater = '';
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
}).on('pagebeforeshow', "#episodesPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#episodesPage", function () {
|
||||
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', this).each(function () {
|
||||
|
||||
this.checked = query.SortBy == this.getAttribute('data-sortby');
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.radioSortOrder', this).each(function () {
|
||||
|
||||
this.checked = query.SortOrder == this.getAttribute('data-sortorder');
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.chkStandardFilter', this).each(function () {
|
||||
|
||||
var filters = "," + (query.Filters || "");
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
||||
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');
|
||||
|
||||
$('#chk3D', this).checked(query.Is3D == true).checkboxradio('refresh');
|
||||
|
||||
$('#chkSubtitle', this).checked(query.HasSubtitles == true).checkboxradio('refresh');
|
||||
$('#chkTrailer', this).checked(query.HasTrailer == true).checkboxradio('refresh');
|
||||
$('#chkSpecialFeature', this).checked(query.HasSpecialFeature == true).checkboxradio('refresh');
|
||||
$('#chkThemeSong', this).checked(query.HasThemeSong == true).checkboxradio('refresh');
|
||||
$('#chkThemeVideo', this).checked(query.HasThemeVideo == true).checkboxradio('refresh');
|
||||
$('#chkSpecialFeature', this).checked(query.ParentIndexNumber == 0).checkboxradio('refresh');
|
||||
|
||||
$('.alphabetPicker', this).alphaValue(query.NameStartsWithOrGreater);
|
||||
|
||||
});
|
||||
|
||||
})(jQuery, document);
|
|
@ -1,140 +0,0 @@
|
|||
(function ($, document) {
|
||||
|
||||
var shape = "poster";
|
||||
|
||||
// The base query options
|
||||
var query = {
|
||||
|
||||
SortBy: "SortName",
|
||||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "Series",
|
||||
Recursive: true,
|
||||
Fields: "DisplayMediaType,SeriesInfo,ItemCounts,DateCreated,UserData",
|
||||
StartIndex: 0,
|
||||
Filters: "IsFavorite"
|
||||
};
|
||||
|
||||
function reloadItems(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), query).done(function (result) {
|
||||
|
||||
// Scroll back up so they can see the results from the beginning
|
||||
$(document).scrollTop(0);
|
||||
|
||||
var html = '';
|
||||
|
||||
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
|
||||
|
||||
html += LibraryBrowser.getPosterDetailViewHtml({
|
||||
items: result.Items,
|
||||
context: "tv",
|
||||
shape: shape
|
||||
});
|
||||
|
||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||
|
||||
$('#items', page).html(html).trigger('create');
|
||||
|
||||
$('.selectPage', page).on('change', function () {
|
||||
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.btnNextPage', page).on('click', function () {
|
||||
query.StartIndex += query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.btnPreviousPage', page).on('click', function () {
|
||||
query.StartIndex -= query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.selectPageSize', page).on('change', function () {
|
||||
query.Limit = parseInt(this.value);
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#favoriteTvPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('.btnFavoriteType', page).on('click', function () {
|
||||
|
||||
$('.favoriteTypes .ui-btn-active', page).removeClass('ui-btn-active');
|
||||
$(this).addClass('ui-btn-active');
|
||||
|
||||
});
|
||||
|
||||
$('.btnFavoriteSeries', page).on('click', function () {
|
||||
|
||||
shape = "poster";
|
||||
query.IncludeItemTypes = "Series";
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.btnFavoriteSeasons', page).on('click', function () {
|
||||
|
||||
shape = "poster";
|
||||
query.IncludeItemTypes = "Season";
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.btnFavoriteEpisodes', page).on('click', function () {
|
||||
|
||||
shape = "backdrop";
|
||||
query.IncludeItemTypes = "Episode";
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.btnFavoriteSeries', page).on('click', function () {
|
||||
|
||||
query.IncludeItemTypes = "Series";
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('#chkIncludeLikes', page).on('change', function () {
|
||||
|
||||
query.Filters = this.checked ? "IsFavoriteOrLikes" : "IsFavorite";
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.alphabetPicker', page).on('alphaselect', function (e, character) {
|
||||
|
||||
query.NameStartsWithOrGreater = character;
|
||||
query.StartIndex = 0;
|
||||
|
||||
reloadItems(page);
|
||||
|
||||
}).on('alphaclear', function (e) {
|
||||
|
||||
query.NameStartsWithOrGreater = '';
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
}).on('pagebeforeshow', "#favoriteTvPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#favoriteTvPage", function () {
|
||||
|
||||
$('.alphabetPicker', this).alphaValue(query.NameStartsWith);
|
||||
});
|
||||
|
||||
})(jQuery, document);
|
|
@ -9,10 +9,10 @@
|
|||
<a href="tvrecommended.html">Suggested</a>
|
||||
<a href="tvnextup.html">Next up</a>
|
||||
<a href="tvshows.html">Shows</a>
|
||||
<a href="episodes.html">Episodes</a>
|
||||
<a href="tvgenres.html" class="ui-btn-active">Genres</a>
|
||||
<a href="tvpeople.html">Actors</a>
|
||||
<a href="tvstudios.html">Networks</a>
|
||||
<a href="favoritetv.html">Favorites</a>
|
||||
</div>
|
||||
<div data-role="content">
|
||||
<div class="viewSettings">
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
<a href="tvrecommended.html">Suggested</a>
|
||||
<a href="tvnextup.html" class="ui-btn-active">Next up</a>
|
||||
<a href="tvshows.html">Shows</a>
|
||||
<a href="episodes.html">Episodes</a>
|
||||
<a href="tvgenres.html">Genres</a>
|
||||
<a href="tvpeople.html">Actors</a>
|
||||
<a href="tvstudios.html">Networks</a>
|
||||
<a href="favoritetv.html">Favorites</a>
|
||||
</div>
|
||||
<div data-role="content">
|
||||
<div class="ehsContent">
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
<a href="tvrecommended.html">Suggested</a>
|
||||
<a href="tvnextup.html">Next up</a>
|
||||
<a href="tvshows.html">Shows</a>
|
||||
<a href="episodes.html">Episodes</a>
|
||||
<a href="tvgenres.html">Genres</a>
|
||||
<a href="tvpeople.html" class="ui-btn-active">Actors</a>
|
||||
<a href="tvstudios.html">Networks</a>
|
||||
<a href="favoritetv.html">Favorites</a>
|
||||
</div>
|
||||
|
||||
<div class="alphabetPicker">
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
<a href="tvrecommended.html" class="ui-btn-active">Suggested</a>
|
||||
<a href="tvnextup.html">Next up</a>
|
||||
<a href="tvshows.html">Shows</a>
|
||||
<a href="episodes.html">Episodes</a>
|
||||
<a href="tvgenres.html">Genres</a>
|
||||
<a href="tvpeople.html">Actors</a>
|
||||
<a href="tvstudios.html">Networks</a>
|
||||
<a href="favoritetv.html">Favorites</a>
|
||||
</div>
|
||||
<div data-role="content">
|
||||
<table class="ehsContent">
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
<a href="tvrecommended.html">Suggested</a>
|
||||
<a href="tvnextup.html">Next up</a>
|
||||
<a href="tvshows.html" class="ui-btn-active">Shows</a>
|
||||
<a href="episodes.html">Episodes</a>
|
||||
<a href="tvgenres.html">Genres</a>
|
||||
<a href="tvpeople.html">Actors</a>
|
||||
<a href="tvstudios.html">Networks</a>
|
||||
<a href="favoritetv.html">Favorites</a>
|
||||
</div>
|
||||
<div class="alphabetPicker">
|
||||
</div>
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
<a href="tvrecommended.html">Suggested</a>
|
||||
<a href="tvnextup.html">Next up</a>
|
||||
<a href="tvshows.html">Shows</a>
|
||||
<a href="episodes.html">Episodes</a>
|
||||
<a href="tvgenres.html">Genres</a>
|
||||
<a href="tvpeople.html">Actors</a>
|
||||
<a href="tvstudios.html" class="ui-btn-active">Networks</a>
|
||||
<a href="favoritetv.html">Favorites</a>
|
||||
</div>
|
||||
<div data-role="content">
|
||||
<div class="viewSettings">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue