mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
rework people
This commit is contained in:
parent
4bc4e81c51
commit
2f11b55964
@ -29,14 +29,14 @@
|
|||||||
"web-component-tester": "*",
|
"web-component-tester": "*",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/PolymerElements/iron-a11y-keys-behavior",
|
"homepage": "https://github.com/polymerelements/iron-a11y-keys-behavior",
|
||||||
"_release": "1.0.6",
|
"_release": "1.0.6",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.6",
|
"tag": "v1.0.6",
|
||||||
"commit": "af5c98b1cf9b3d180a6326c99ac9c7057eee647f"
|
"commit": "af5c98b1cf9b3d180a6326c99ac9c7057eee647f"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/iron-a11y-keys-behavior.git",
|
"_source": "git://github.com/polymerelements/iron-a11y-keys-behavior.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/iron-a11y-keys-behavior"
|
"_originalSource": "polymerelements/iron-a11y-keys-behavior"
|
||||||
}
|
}
|
@ -30,14 +30,14 @@
|
|||||||
"web-component-tester": "*",
|
"web-component-tester": "*",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/polymerelements/paper-ripple",
|
"homepage": "https://github.com/PolymerElements/paper-ripple",
|
||||||
"_release": "1.0.2",
|
"_release": "1.0.2",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.2",
|
"tag": "v1.0.2",
|
||||||
"commit": "b546dbe6ad0b1f58cac80caec3136cf3232e12fc"
|
"commit": "b546dbe6ad0b1f58cac80caec3136cf3232e12fc"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/paper-ripple.git",
|
"_source": "git://github.com/PolymerElements/paper-ripple.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "polymerelements/paper-ripple"
|
"_originalSource": "PolymerElements/paper-ripple"
|
||||||
}
|
}
|
@ -1023,19 +1023,22 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.playedIndicator {
|
.playedIndicator {
|
||||||
display: block;
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 5px;
|
top: 5px;
|
||||||
right: 5px;
|
right: 5px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
width: 24px;
|
width: 26px;
|
||||||
height: 24px;
|
height: 26px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: rgb(82, 181, 75);
|
background: rgb(82, 181, 75);
|
||||||
background: rgba(82, 181, 75, .9);
|
background: rgba(82, 181, 75, .95);
|
||||||
line-height: 19px;
|
line-height: 21px;
|
||||||
|
line-height: initial;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1044,11 +1047,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.textIndicator {
|
|
||||||
height: 22px;
|
|
||||||
padding-top: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mediaSourceIndicator {
|
.mediaSourceIndicator {
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -1536,10 +1534,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.peopleTabDisabled .tvPeopleTab, .peopleTabDisabled .moviePeopleTab {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tvEpisodesTabDisabled .tvEpisodesTab {
|
.tvEpisodesTabDisabled .tvEpisodesTab {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,7 @@
|
|||||||
<a href="tv.html?tab=3" class="ui-btn-active"><iron-icon icon="live-tv"></iron-icon>${TabShows}</a>
|
<a href="tv.html?tab=3" class="ui-btn-active"><iron-icon icon="live-tv"></iron-icon>${TabShows}</a>
|
||||||
<a href="tv.html?tab=4" class="tvEpisodesTab"><iron-icon icon="slideshow"></iron-icon>${TabEpisodes}</a>
|
<a href="tv.html?tab=4" class="tvEpisodesTab"><iron-icon icon="slideshow"></iron-icon>${TabEpisodes}</a>
|
||||||
<a href="tv.html?tab=5"><iron-icon icon="video-library"></iron-icon>${TabGenres}</a>
|
<a href="tv.html?tab=5"><iron-icon icon="video-library"></iron-icon>${TabGenres}</a>
|
||||||
<a href="tv.html?tab=6" class="tvPeopleTab"><iron-icon icon="people"></iron-icon>${TabPeople}</a>
|
<a href="tv.html?tab=6" class="tvStudiosTab"><iron-icon icon="account-box"></iron-icon>${TabNetworks}</a>
|
||||||
<a href="tv.html?tab=7" class="tvStudiosTab"><iron-icon icon="account-box"></iron-icon>${TabNetworks}</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
<paper-tab class="movieTrailersTab">${TabTrailers}</paper-tab>
|
<paper-tab class="movieTrailersTab">${TabTrailers}</paper-tab>
|
||||||
<paper-tab>${TabCollections}</paper-tab>
|
<paper-tab>${TabCollections}</paper-tab>
|
||||||
<paper-tab>${TabGenres}</paper-tab>
|
<paper-tab>${TabGenres}</paper-tab>
|
||||||
<paper-tab class="moviePeopleTab">${TabPeople}</paper-tab>
|
|
||||||
<paper-tab class="movieStudiosTab">${TabStudios}</paper-tab>
|
<paper-tab class="movieStudiosTab">${TabStudios}</paper-tab>
|
||||||
</paper-tabs>
|
</paper-tabs>
|
||||||
<div class="legacyTabs scopedLibraryViewNav">
|
<div class="legacyTabs scopedLibraryViewNav">
|
||||||
@ -22,8 +21,7 @@
|
|||||||
<a href="movies.html?tab=2" class="movieTrailersTab">${TabTrailers}</a>
|
<a href="movies.html?tab=2" class="movieTrailersTab">${TabTrailers}</a>
|
||||||
<a href="movies.html?tab=3">${TabCollections}</a>
|
<a href="movies.html?tab=3">${TabCollections}</a>
|
||||||
<a href="movies.html?tab=4">${TabGenres}</a>
|
<a href="movies.html?tab=4">${TabGenres}</a>
|
||||||
<a href="movies.html?tab=5" class="moviePeopleTab">${TabPeople}</a>
|
<a href="movies.html?tab=5" class="movieStudiosTab">${TabStudios}</a>
|
||||||
<a href="movies.html?tab=6" class="movieStudiosTab">${TabStudios}</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -109,17 +107,6 @@
|
|||||||
</neon-animatable>
|
</neon-animatable>
|
||||||
<neon-animatable>
|
<neon-animatable>
|
||||||
<div class="pageTabContent" data-index="5">
|
<div class="pageTabContent" data-index="5">
|
||||||
<div class="alphabetPicker">
|
|
||||||
</div>
|
|
||||||
<div class="viewSettings">
|
|
||||||
<div class="listTopPaging">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="itemsContainer"></div>
|
|
||||||
</div>
|
|
||||||
</neon-animatable>
|
|
||||||
<neon-animatable>
|
|
||||||
<div class="pageTabContent" data-index="6">
|
|
||||||
<div class="viewSettings">
|
<div class="viewSettings">
|
||||||
<div class="listTopPaging">
|
<div class="listTopPaging">
|
||||||
</div>
|
</div>
|
||||||
@ -238,57 +225,6 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div data-role="panel" class="viewPanel peopleViewPanel hide" data-theme="b" data-position="right" data-display="overlay" data-position-fixed="true">
|
|
||||||
<div class="ui-panel-inner">
|
|
||||||
<form>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h1>
|
|
||||||
${HeaderFilters}
|
|
||||||
</h1>
|
|
||||||
<div class="checkboxContainer">
|
|
||||||
<input class="chkStandardFilter" type="checkbox" id="chkIsFavoritePerson" data-filter="IsFavorite" data-role="none">
|
|
||||||
<label for="chkIsFavoritePerson">${OptionFavorite}</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="checkboxContainer">
|
|
||||||
<input class="chkStandardFilter" type="checkbox" id="chkLikesPerson" data-filter="Likes" data-role="none">
|
|
||||||
<label for="chkLikesPerson">${OptionLikes}</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="checkboxContainer">
|
|
||||||
<input class="chkStandardFilter" type="checkbox" id="chkDislikesPerson" data-filter="Dislikes" data-role="none">
|
|
||||||
<label for="chkDislikesPerson">${OptionDislikes}</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h1>
|
|
||||||
${HeaderPersonTypes}
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<div class="checkboxContainer">
|
|
||||||
<input class="chkPersonTypeFilter" type="checkbox" id="chkActorPerson" data-filter="Actor" data-role="none">
|
|
||||||
<label for="chkActorPerson">${OptionActors}</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="checkboxContainer">
|
|
||||||
<input class="chkPersonTypeFilter" type="checkbox" id="chkDirectorPerson" data-filter="Director" data-role="none">
|
|
||||||
<label for="chkDirectorPerson">${OptionDirectors}</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="checkboxContainer">
|
|
||||||
<input class="chkPersonTypeFilter" type="checkbox" id="chkProducerPerson" data-filter="Producer" data-role="none">
|
|
||||||
<label for="chkProducerPerson">${OptionProducers}</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="checkboxContainer">
|
|
||||||
<input class="chkPersonTypeFilter" type="checkbox" id="chkWriterPerson" data-filter="Writer" data-role="none">
|
|
||||||
<label for="chkWriterPerson">${OptionWriters}</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -2383,7 +2383,7 @@
|
|||||||
|
|
||||||
if (item.Type == "Series" || item.Type == "Season" || item.Type == "BoxSet" || item.MediaType == "Video" || item.MediaType == "Game" || item.MediaType == "Book") {
|
if (item.Type == "Series" || item.Type == "Season" || item.Type == "BoxSet" || item.MediaType == "Video" || item.MediaType == "Game" || item.MediaType == "Book") {
|
||||||
if (item.UserData.UnplayedItemCount) {
|
if (item.UserData.UnplayedItemCount) {
|
||||||
return '<div class="playedIndicator textIndicator">' + item.UserData.UnplayedItemCount + '</div>';
|
return '<div class="playedIndicator">' + item.UserData.UnplayedItemCount + '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.Type != 'TvChannel') {
|
if (item.Type != 'TvChannel') {
|
||||||
@ -2399,7 +2399,7 @@
|
|||||||
getGroupCountIndicator: function (item) {
|
getGroupCountIndicator: function (item) {
|
||||||
|
|
||||||
if (item.ChildCount) {
|
if (item.ChildCount) {
|
||||||
return '<div class="playedIndicator textIndicator">' + item.ChildCount + '</div>';
|
return '<div class="playedIndicator">' + item.ChildCount + '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
|
@ -1,177 +0,0 @@
|
|||||||
(function ($, document) {
|
|
||||||
|
|
||||||
var pageSizeKey = 'people';
|
|
||||||
var data = {};
|
|
||||||
|
|
||||||
function getQuery() {
|
|
||||||
|
|
||||||
var key = getSavedQueryKey();
|
|
||||||
var pageData = data[key];
|
|
||||||
|
|
||||||
if (!pageData) {
|
|
||||||
pageData = data[key] = {
|
|
||||||
query: {
|
|
||||||
SortBy: "SortName",
|
|
||||||
SortOrder: "Ascending",
|
|
||||||
IncludeItemTypes: "Movie,Trailer",
|
|
||||||
Recursive: true,
|
|
||||||
Fields: "DateCreated,ItemCounts",
|
|
||||||
PersonTypes: "",
|
|
||||||
StartIndex: 0,
|
|
||||||
Limit: 100
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
pageData.query.ParentId = LibraryMenu.getTopParentId();
|
|
||||||
LibraryBrowser.loadSavedQueryValues(key, pageData.query);
|
|
||||||
}
|
|
||||||
return pageData.query;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getSavedQueryKey() {
|
|
||||||
|
|
||||||
return getWindowUrl() + 'people';
|
|
||||||
}
|
|
||||||
|
|
||||||
function reloadItems(page, viewPanel) {
|
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
|
||||||
|
|
||||||
var query = getQuery();
|
|
||||||
ApiClient.getPeople(Dashboard.getCurrentUserId(), query).done(function (result) {
|
|
||||||
|
|
||||||
// Scroll back up so they can see the results from the beginning
|
|
||||||
window.scrollTo(0, 0);
|
|
||||||
|
|
||||||
var html = '';
|
|
||||||
var pagingHtml = LibraryBrowser.getQueryPagingHtml({
|
|
||||||
startIndex: query.StartIndex,
|
|
||||||
limit: query.Limit,
|
|
||||||
totalRecordCount: result.TotalRecordCount,
|
|
||||||
viewButton: true,
|
|
||||||
viewIcon: 'filter-list',
|
|
||||||
showLimit: false,
|
|
||||||
updatePageSizeSetting: false,
|
|
||||||
pageSizeKey: pageSizeKey,
|
|
||||||
viewPanelClass: 'peopleViewPanel'
|
|
||||||
});
|
|
||||||
|
|
||||||
page.querySelector('.listTopPaging').innerHTML = pagingHtml;
|
|
||||||
|
|
||||||
updateFilterControls(page, viewPanel);
|
|
||||||
|
|
||||||
html = LibraryBrowser.getPosterViewHtml({
|
|
||||||
items: result.Items,
|
|
||||||
shape: "portrait",
|
|
||||||
showTitle: true,
|
|
||||||
showItemCounts: true,
|
|
||||||
coverImage: true,
|
|
||||||
lazy: true
|
|
||||||
});
|
|
||||||
|
|
||||||
var elem = page.querySelector('.itemsContainer');
|
|
||||||
elem.innerHTML = html + pagingHtml;
|
|
||||||
ImageLoader.lazyChildren(elem);
|
|
||||||
|
|
||||||
$('.btnNextPage', page).on('click', function () {
|
|
||||||
query.StartIndex += query.Limit;
|
|
||||||
reloadItems(page, viewPanel);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.btnPreviousPage', page).on('click', function () {
|
|
||||||
query.StartIndex -= query.Limit;
|
|
||||||
reloadItems(page, viewPanel);
|
|
||||||
});
|
|
||||||
|
|
||||||
LibraryBrowser.saveQueryValues(getSavedQueryKey(), query);
|
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateFilterControls(tabContent, viewPanel) {
|
|
||||||
|
|
||||||
var query = getQuery();
|
|
||||||
$('.chkPersonTypeFilter', viewPanel).each(function () {
|
|
||||||
|
|
||||||
var filters = "," + (query.PersonTypes || "");
|
|
||||||
var filterName = this.getAttribute('data-filter');
|
|
||||||
|
|
||||||
this.checked = filters.indexOf(',' + filterName) != -1;
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.alphabetPicker', tabContent).alphaValue(query.NameStartsWithOrGreater);
|
|
||||||
}
|
|
||||||
|
|
||||||
function initPage(tabContent, viewPanel) {
|
|
||||||
|
|
||||||
$('.chkStandardFilter', viewPanel).on('change', function () {
|
|
||||||
|
|
||||||
var query = getQuery();
|
|
||||||
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(tabContent, viewPanel);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.chkPersonTypeFilter', viewPanel).on('change', function () {
|
|
||||||
|
|
||||||
var query = getQuery();
|
|
||||||
var filterName = this.getAttribute('data-filter');
|
|
||||||
var filters = query.PersonTypes || "";
|
|
||||||
|
|
||||||
filters = (',' + filters).replace(',' + filterName, '').substring(1);
|
|
||||||
|
|
||||||
if (this.checked) {
|
|
||||||
filters = filters ? (filters + ',' + filterName) : filterName;
|
|
||||||
}
|
|
||||||
|
|
||||||
query.StartIndex = 0;
|
|
||||||
query.PersonTypes = filters;
|
|
||||||
|
|
||||||
reloadItems(tabContent, viewPanel);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.alphabetPicker', tabContent).on('alphaselect', function (e, character) {
|
|
||||||
|
|
||||||
var query = getQuery();
|
|
||||||
query.NameStartsWithOrGreater = character;
|
|
||||||
query.StartIndex = 0;
|
|
||||||
|
|
||||||
reloadItems(tabContent, viewPanel);
|
|
||||||
|
|
||||||
}).on('alphaclear', function (e) {
|
|
||||||
|
|
||||||
var query = getQuery();
|
|
||||||
query.NameStartsWithOrGreater = '';
|
|
||||||
|
|
||||||
reloadItems(tabContent, viewPanel);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
window.MoviesPage.initPeopleTab = function (page, tabContent) {
|
|
||||||
|
|
||||||
var viewPanel = page.querySelector('.peopleViewPanel');
|
|
||||||
initPage(tabContent, viewPanel);
|
|
||||||
};
|
|
||||||
|
|
||||||
window.MoviesPage.renderPeopleTab = function (page, tabContent) {
|
|
||||||
|
|
||||||
if (LibraryBrowser.needsRefresh(tabContent)) {
|
|
||||||
var viewPanel = page.querySelector('.peopleViewPanel');
|
|
||||||
reloadItems(tabContent, viewPanel);
|
|
||||||
updateFilterControls(tabContent, viewPanel);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
})(jQuery, document);
|
|
@ -299,11 +299,6 @@
|
|||||||
renderMethod = 'renderGenresTab';
|
renderMethod = 'renderGenresTab';
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
depends.push('scripts/moviepeople');
|
|
||||||
renderMethod = 'renderPeopleTab';
|
|
||||||
initMethod = 'initPeopleTab';
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
depends.push('scripts/moviestudios');
|
depends.push('scripts/moviestudios');
|
||||||
renderMethod = 'renderStudiosTab';
|
renderMethod = 'renderStudiosTab';
|
||||||
break;
|
break;
|
||||||
|
@ -1777,7 +1777,6 @@ var AppInfo = {};
|
|||||||
|
|
||||||
if (!AppInfo.hasLowImageBandwidth) {
|
if (!AppInfo.hasLowImageBandwidth) {
|
||||||
AppInfo.enableStudioTabs = true;
|
AppInfo.enableStudioTabs = true;
|
||||||
AppInfo.enablePeopleTabs = true;
|
|
||||||
AppInfo.enableTvEpisodesTab = true;
|
AppInfo.enableTvEpisodesTab = true;
|
||||||
AppInfo.enableMovieTrailersTab = true;
|
AppInfo.enableMovieTrailersTab = true;
|
||||||
}
|
}
|
||||||
@ -1915,10 +1914,6 @@ var AppInfo = {};
|
|||||||
elem.classList.add('studioTabDisabled');
|
elem.classList.add('studioTabDisabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!AppInfo.enablePeopleTabs) {
|
|
||||||
elem.classList.add('peopleTabDisabled');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!AppInfo.enableTvEpisodesTab) {
|
if (!AppInfo.enableTvEpisodesTab) {
|
||||||
elem.classList.add('tvEpisodesTabDisabled');
|
elem.classList.add('tvEpisodesTabDisabled');
|
||||||
}
|
}
|
||||||
|
@ -1,178 +0,0 @@
|
|||||||
(function ($, document) {
|
|
||||||
|
|
||||||
var pageSizeKey = 'people';
|
|
||||||
var data = {};
|
|
||||||
|
|
||||||
function getQuery() {
|
|
||||||
|
|
||||||
var key = getSavedQueryKey();
|
|
||||||
var pageData = data[key];
|
|
||||||
|
|
||||||
if (!pageData) {
|
|
||||||
pageData = data[key] = {
|
|
||||||
query: {
|
|
||||||
SortBy: "SortName",
|
|
||||||
SortOrder: "Ascending",
|
|
||||||
IncludeItemTypes: "Series,Episode",
|
|
||||||
Recursive: true,
|
|
||||||
Fields: "DateCreated,ItemCounts",
|
|
||||||
PersonTypes: "",
|
|
||||||
StartIndex: 0,
|
|
||||||
Limit: 100
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
pageData.query.ParentId = LibraryMenu.getTopParentId();
|
|
||||||
LibraryBrowser.loadSavedQueryValues(key, pageData.query);
|
|
||||||
}
|
|
||||||
return pageData.query;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getSavedQueryKey() {
|
|
||||||
|
|
||||||
return getWindowUrl() + 'people';
|
|
||||||
}
|
|
||||||
|
|
||||||
function reloadItems(page, viewPanel) {
|
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
|
||||||
|
|
||||||
var query = getQuery();
|
|
||||||
ApiClient.getPeople(Dashboard.getCurrentUserId(), query).done(function (result) {
|
|
||||||
|
|
||||||
// Scroll back up so they can see the results from the beginning
|
|
||||||
window.scrollTo(0, 0);
|
|
||||||
|
|
||||||
var html = '';
|
|
||||||
var pagingHtml = LibraryBrowser.getQueryPagingHtml({
|
|
||||||
startIndex: query.StartIndex,
|
|
||||||
limit: query.Limit,
|
|
||||||
totalRecordCount: result.TotalRecordCount,
|
|
||||||
viewButton: true,
|
|
||||||
viewIcon: 'filter-list',
|
|
||||||
showLimit: false,
|
|
||||||
updatePageSizeSetting: false,
|
|
||||||
pageSizeKey: pageSizeKey,
|
|
||||||
viewPanelClass: 'peopleViewPanel'
|
|
||||||
});
|
|
||||||
|
|
||||||
page.querySelector('.listTopPaging').innerHTML = pagingHtml;
|
|
||||||
|
|
||||||
updateFilterControls(page, viewPanel);
|
|
||||||
|
|
||||||
html = LibraryBrowser.getPosterViewHtml({
|
|
||||||
items: result.Items,
|
|
||||||
shape: "portrait",
|
|
||||||
context: 'tv',
|
|
||||||
showTitle: true,
|
|
||||||
showItemCounts: true,
|
|
||||||
coverImage: true,
|
|
||||||
lazy: true
|
|
||||||
});
|
|
||||||
|
|
||||||
var elem = page.querySelector('.itemsContainer');
|
|
||||||
elem.innerHTML = html + pagingHtml;
|
|
||||||
ImageLoader.lazyChildren(elem);
|
|
||||||
|
|
||||||
$('.btnNextPage', page).on('click', function () {
|
|
||||||
query.StartIndex += query.Limit;
|
|
||||||
reloadItems(page, viewPanel);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.btnPreviousPage', page).on('click', function () {
|
|
||||||
query.StartIndex -= query.Limit;
|
|
||||||
reloadItems(page, viewPanel);
|
|
||||||
});
|
|
||||||
|
|
||||||
LibraryBrowser.saveQueryValues(getSavedQueryKey(), query);
|
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateFilterControls(tabContent, viewPanel) {
|
|
||||||
|
|
||||||
var query = getQuery();
|
|
||||||
$('.chkPersonTypeFilter', viewPanel).each(function () {
|
|
||||||
|
|
||||||
var filters = "," + (query.PersonTypes || "");
|
|
||||||
var filterName = this.getAttribute('data-filter');
|
|
||||||
|
|
||||||
this.checked = filters.indexOf(',' + filterName) != -1;
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.alphabetPicker', tabContent).alphaValue(query.NameStartsWithOrGreater);
|
|
||||||
}
|
|
||||||
|
|
||||||
function initPage(tabContent, viewPanel) {
|
|
||||||
|
|
||||||
$('.chkStandardFilter', viewPanel).on('change', function () {
|
|
||||||
|
|
||||||
var query = getQuery();
|
|
||||||
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(tabContent, viewPanel);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.chkPersonTypeFilter', viewPanel).on('change', function () {
|
|
||||||
|
|
||||||
var query = getQuery();
|
|
||||||
var filterName = this.getAttribute('data-filter');
|
|
||||||
var filters = query.PersonTypes || "";
|
|
||||||
|
|
||||||
filters = (',' + filters).replace(',' + filterName, '').substring(1);
|
|
||||||
|
|
||||||
if (this.checked) {
|
|
||||||
filters = filters ? (filters + ',' + filterName) : filterName;
|
|
||||||
}
|
|
||||||
|
|
||||||
query.StartIndex = 0;
|
|
||||||
query.PersonTypes = filters;
|
|
||||||
|
|
||||||
reloadItems(tabContent, viewPanel);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.alphabetPicker', tabContent).on('alphaselect', function (e, character) {
|
|
||||||
|
|
||||||
var query = getQuery();
|
|
||||||
query.NameStartsWithOrGreater = character;
|
|
||||||
query.StartIndex = 0;
|
|
||||||
|
|
||||||
reloadItems(tabContent, viewPanel);
|
|
||||||
|
|
||||||
}).on('alphaclear', function (e) {
|
|
||||||
|
|
||||||
var query = getQuery();
|
|
||||||
query.NameStartsWithOrGreater = '';
|
|
||||||
|
|
||||||
reloadItems(tabContent, viewPanel);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
window.TvPage.initPeopleTab = function (page, tabContent) {
|
|
||||||
|
|
||||||
var viewPanel = page.querySelector('.peopleViewPanel');
|
|
||||||
initPage(tabContent, viewPanel);
|
|
||||||
};
|
|
||||||
|
|
||||||
window.TvPage.renderPeopleTab = function (page, tabContent) {
|
|
||||||
|
|
||||||
if (LibraryBrowser.needsRefresh(tabContent)) {
|
|
||||||
var viewPanel = page.querySelector('.peopleViewPanel');
|
|
||||||
reloadItems(tabContent, viewPanel);
|
|
||||||
updateFilterControls(tabContent, viewPanel);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
})(jQuery, document);
|
|
@ -222,11 +222,6 @@
|
|||||||
renderMethod = 'renderGenresTab';
|
renderMethod = 'renderGenresTab';
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
depends.push('scripts/tvpeople');
|
|
||||||
renderMethod = 'renderPeopleTab';
|
|
||||||
initMethod = 'initPeopleTab';
|
|
||||||
break;
|
|
||||||
case 7:
|
|
||||||
depends.push('scripts/tvstudios');
|
depends.push('scripts/tvstudios');
|
||||||
renderMethod = 'renderStudiosTab';
|
renderMethod = 'renderStudiosTab';
|
||||||
break;
|
break;
|
||||||
@ -284,15 +279,6 @@
|
|||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
if (LibraryBrowser.needsRefresh(page)) {
|
|
||||||
reload(page);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
pageIdOn('pageshow', "tvRecommendedPage", function () {
|
|
||||||
|
|
||||||
var page = this;
|
|
||||||
|
|
||||||
if (!page.getAttribute('data-title')) {
|
if (!page.getAttribute('data-title')) {
|
||||||
|
|
||||||
var parentId = LibraryMenu.getTopParentId();
|
var parentId = LibraryMenu.getTopParentId();
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
<paper-tab>${TabShows}</paper-tab>
|
<paper-tab>${TabShows}</paper-tab>
|
||||||
<paper-tab class="tvEpisodesTab">${TabEpisodes}</paper-tab>
|
<paper-tab class="tvEpisodesTab">${TabEpisodes}</paper-tab>
|
||||||
<paper-tab>${TabGenres}</paper-tab>
|
<paper-tab>${TabGenres}</paper-tab>
|
||||||
<paper-tab class="tvPeopleTab">${TabPeople}</paper-tab>
|
|
||||||
<paper-tab class="tvStudiosTab">${TabNetworks}</paper-tab>
|
<paper-tab class="tvStudiosTab">${TabNetworks}</paper-tab>
|
||||||
</paper-tabs>
|
</paper-tabs>
|
||||||
<div class="legacyTabs scopedLibraryViewNav">
|
<div class="legacyTabs scopedLibraryViewNav">
|
||||||
@ -24,8 +23,7 @@
|
|||||||
<a href="tv.html?tab=3">${TabShows}</a>
|
<a href="tv.html?tab=3">${TabShows}</a>
|
||||||
<a href="tv.html?tab=4" class="tvEpisodesTab">${TabEpisodes}</a>
|
<a href="tv.html?tab=4" class="tvEpisodesTab">${TabEpisodes}</a>
|
||||||
<a href="tv.html?tab=5">${TabGenres}</a>
|
<a href="tv.html?tab=5">${TabGenres}</a>
|
||||||
<a href="tv.html?tab=6" class="tvPeopleTab">${TabPeople}</a>
|
<a href="tv.html?tab=6" class="tvStudiosTab">${TabNetworks}</a>
|
||||||
<a href="tv.html?tab=7" class="tvStudiosTab">${TabNetworks}</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -35,7 +33,7 @@
|
|||||||
<div class="pageTabContent" data-index="0">
|
<div class="pageTabContent" data-index="0">
|
||||||
<div id="resumableSection" style="display: none;" class="scopedContent homePageSection">
|
<div id="resumableSection" style="display: none;" class="scopedContent homePageSection">
|
||||||
<div>
|
<div>
|
||||||
<h1 class="listHeader" style="display:inline-block;vertical-align:middle;">${HeaderResume}</h1>
|
<h1 class="listHeader" style="display: inline-block; vertical-align: middle;">${HeaderResume}</h1>
|
||||||
<paper-button raised class="submit mini categorySyncButton" data-category="Resume"><iron-icon icon="sync"></iron-icon><span>${ButtonSync}</span></paper-button>
|
<paper-button raised class="submit mini categorySyncButton" data-category="Resume"><iron-icon icon="sync"></iron-icon><span>${ButtonSync}</span></paper-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -45,7 +43,7 @@
|
|||||||
|
|
||||||
<div class="homePageSection">
|
<div class="homePageSection">
|
||||||
<div>
|
<div>
|
||||||
<h1 class="listHeader nextUpHeader" style="display:inline-block;vertical-align:middle;">${HeaderNextUp}</h1>
|
<h1 class="listHeader nextUpHeader" style="display: inline-block; vertical-align: middle;">${HeaderNextUp}</h1>
|
||||||
<paper-button raised class="submit mini categorySyncButton" data-category="NextUp"><iron-icon icon="sync"></iron-icon><span>${ButtonSync}</span></paper-button>
|
<paper-button raised class="submit mini categorySyncButton" data-category="NextUp"><iron-icon icon="sync"></iron-icon><span>${ButtonSync}</span></paper-button>
|
||||||
</div>
|
</div>
|
||||||
<div id="nextUpItems" class="itemsContainer">
|
<div id="nextUpItems" class="itemsContainer">
|
||||||
@ -58,7 +56,7 @@
|
|||||||
<div class="pageTabContent" data-index="1">
|
<div class="pageTabContent" data-index="1">
|
||||||
<div class="homePageSection">
|
<div class="homePageSection">
|
||||||
<div>
|
<div>
|
||||||
<h1 class="listHeader" style="display:inline-block;vertical-align:middle;">${HeaderLatestEpisodes}</h1>
|
<h1 class="listHeader" style="display: inline-block; vertical-align: middle;">${HeaderLatestEpisodes}</h1>
|
||||||
<paper-button raised class="submit mini categorySyncButton" data-category="Latest"><iron-icon icon="sync"></iron-icon><span>${ButtonSync}</span></paper-button>
|
<paper-button raised class="submit mini categorySyncButton" data-category="Latest"><iron-icon icon="sync"></iron-icon><span>${ButtonSync}</span></paper-button>
|
||||||
</div>
|
</div>
|
||||||
<div id="latestEpisodes" class="itemsContainer">
|
<div id="latestEpisodes" class="itemsContainer">
|
||||||
@ -72,7 +70,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="noItemsMessage" style="display: none;">
|
<div class="noItemsMessage" style="display: none;">
|
||||||
<p>${MessageNothingHere}</p>
|
<p>${MessageNothingHere}</p>
|
||||||
<p><a href="metadata.html">${MessagePleaseEnsureInternetMetadata}</a></p>
|
<p>
|
||||||
|
<a href="metadata.html">${MessagePleaseEnsureInternetMetadata}</a>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</neon-animatable>
|
</neon-animatable>
|
||||||
@ -84,7 +84,7 @@
|
|||||||
<div class="listTopPaging">
|
<div class="listTopPaging">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="items" class="itemsContainer paddedItemsContainer" style="text-align:center;"></div>
|
<div id="items" class="itemsContainer paddedItemsContainer" style="text-align: center;"></div>
|
||||||
</div>
|
</div>
|
||||||
</neon-animatable>
|
</neon-animatable>
|
||||||
<neon-animatable>
|
<neon-animatable>
|
||||||
@ -107,22 +107,11 @@
|
|||||||
</neon-animatable>
|
</neon-animatable>
|
||||||
<neon-animatable>
|
<neon-animatable>
|
||||||
<div class="pageTabContent" data-index="6">
|
<div class="pageTabContent" data-index="6">
|
||||||
<div class="alphabetPicker">
|
|
||||||
</div>
|
|
||||||
<div class="viewSettings">
|
<div class="viewSettings">
|
||||||
<div class="listTopPaging">
|
<div class="listTopPaging">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="itemsContainer"></div>
|
<div id="items" class="itemsContainer paddedItemsContainer" style="text-align: center;"></div>
|
||||||
</div>
|
|
||||||
</neon-animatable>
|
|
||||||
<neon-animatable>
|
|
||||||
<div class="pageTabContent" data-index="7">
|
|
||||||
<div class="viewSettings">
|
|
||||||
<div class="listTopPaging">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="items" class="itemsContainer paddedItemsContainer" style="text-align:center;"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</neon-animatable>
|
</neon-animatable>
|
||||||
</neon-animated-pages>
|
</neon-animated-pages>
|
||||||
@ -258,36 +247,6 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div data-role="panel" class="viewPanel peopleViewPanel hide" data-theme="b" data-position="right" data-display="overlay" data-position-fixed="true">
|
|
||||||
<div class="ui-panel-inner">
|
|
||||||
<form>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h1>
|
|
||||||
${HeaderFilters}
|
|
||||||
</h1>
|
|
||||||
<div class="paperCheckboxList">
|
|
||||||
<paper-checkbox class="chkStandardFilter" data-filter="IsFavorite">${OptionFavorite}</paper-checkbox>
|
|
||||||
<paper-checkbox class="chkStandardFilter" data-filter="Likes">${OptionLikes}</paper-checkbox>
|
|
||||||
<paper-checkbox class="chkStandardFilter" data-filter="Dislikes">${OptionDislikes}</paper-checkbox>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h1>
|
|
||||||
${HeaderPersonTypes}
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<div class="paperCheckboxList">
|
|
||||||
<paper-checkbox class="chkPersonTypeFilter" data-filter="Actor">${OptionActors}</paper-checkbox>
|
|
||||||
<paper-checkbox class="chkPersonTypeFilter" data-filter="GuestStar">${OptionGuestStars}</paper-checkbox>
|
|
||||||
<paper-checkbox class="chkPersonTypeFilter" data-filter="Director">${OptionDirectors}</paper-checkbox>
|
|
||||||
<paper-checkbox class="chkPersonTypeFilter" data-filter="Producer">${OptionProducers}</paper-checkbox>
|
|
||||||
<paper-checkbox class="chkPersonTypeFilter" data-filter="Writer">${OptionWriters}</paper-checkbox>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user