mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update music tabs
This commit is contained in:
parent
2c776145d5
commit
0e83515811
10 changed files with 131 additions and 543 deletions
|
@ -108,18 +108,18 @@
|
|||
}
|
||||
|
||||
.headerSearchInput {
|
||||
margin: 0;
|
||||
background: #222;
|
||||
border: 0;
|
||||
color: #ddd;
|
||||
border-radius: 3px;
|
||||
padding: 4px 0 3px 0;
|
||||
text-indent: 50px;
|
||||
margin: 0!important;
|
||||
background: #222!important;
|
||||
border: 0!important;
|
||||
color: #ddd!important;
|
||||
border-radius: 3px!important;
|
||||
padding: 4px 0 3px 0!important;
|
||||
text-indent: 50px!important;
|
||||
font-size: 16px;
|
||||
font-family: inherit;
|
||||
outline: none;
|
||||
vertical-align: middle;
|
||||
width: 85%;
|
||||
width: 85%!important;
|
||||
}
|
||||
|
||||
.searchInputIcon {
|
||||
|
@ -140,19 +140,19 @@
|
|||
|
||||
@media all and (min-width: 600px) {
|
||||
.headerSearchInput {
|
||||
width: 90%;
|
||||
width: 90% !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-width: 800px) {
|
||||
.headerSearchInput {
|
||||
width: 93%;
|
||||
width: 93% !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-width: 1200px) {
|
||||
.headerSearchInput {
|
||||
width: 96%;
|
||||
width: 96% !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,84 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Emby</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="musicAlbumArtistsPage" data-role="page" class="page libraryPage" data-require="scripts/musicalbumartists,scripts/queryfilters">
|
||||
<div class="libraryViewNav scopedLibraryViewNav">
|
||||
<a href="musicrecommended.html"><iron-icon icon="info"></iron-icon>${TabSuggestions}</a>
|
||||
<a href="musicalbums.html"><iron-icon icon="album"></iron-icon>${TabAlbums}</a>
|
||||
<a href="#" class="ui-btn-active"><iron-icon icon="music-note"></iron-icon>${TabAlbumArtists}</a>
|
||||
<a href="musicartists.html" class="musicArtistsTab"><iron-icon icon="music-note"></iron-icon>${TabArtists}</a>
|
||||
<a href="songs.html" class="musicSongsTab"><iron-icon icon="music-note"></iron-icon>${TabSongs}</a>
|
||||
<a href="musicgenres.html"><iron-icon icon="library-music"></iron-icon>${TabGenres}</a>
|
||||
</div>
|
||||
|
||||
<div class="alphabetPicker">
|
||||
</div>
|
||||
<div data-role="content">
|
||||
<div class="viewSettings">
|
||||
<div class="listTopPaging">
|
||||
</div>
|
||||
<div class="selectionCommands" style="display: none;">
|
||||
<div class="selectionCommandsControlGroup">
|
||||
<button class="btnAddToPlaylist" data-mini="true" data-icon="plus" data-inline="true" title="${ButtonAddToPlaylist}">${ButtonAddToPlaylist}</button>
|
||||
<button class="btnSyncItems" data-mini="true" data-icon="refresh" data-inline="true" title="${ButtonSync}">${ButtonSync}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="items" class="itemsContainer paddedItemsContainer" style="text-align:center;"></div>
|
||||
</div>
|
||||
|
||||
<div data-role="panel" class="viewPanel" data-theme="a" data-position="right" data-display="overlay" data-position-fixed="true">
|
||||
<form>
|
||||
|
||||
<div data-role="controlgroup" data-type="horizontal" data-mini="true" class="viewPanelTabs">
|
||||
<a href="#" data-role="button" class="viewTabButton" data-tab="tabView">${TabView}</a>
|
||||
<a href="#" data-role="button" class="viewTabButton" data-tab="tabFilter">${TabFilter}</a>
|
||||
</div>
|
||||
|
||||
<div class="tabView viewTab">
|
||||
|
||||
<div>
|
||||
<label for="selectView">${LabelView}</label>
|
||||
<select id="selectView">
|
||||
<option value="List">${OptionList}</option>
|
||||
<option value="Poster">${OptionPoster}</option>
|
||||
<option value="PosterCard">${OptionPosterCard}</option>
|
||||
</select>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<label for="selectPageSize">${LabelPageSize}</label>
|
||||
<select id="selectPageSize" class="selectPageSize"></select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="tabFilter viewTab">
|
||||
<fieldset data-role="controlgroup">
|
||||
<legend>${HeaderFilters}</legend>
|
||||
<input class="chkStandardFilter" type="checkbox" name="chkIsFavorite" id="chkIsFavorite" data-filter="IsFavorite" data-mini="true">
|
||||
<label for="chkIsFavorite">${OptionFavorite}</label>
|
||||
|
||||
<input class="chkStandardFilter" type="checkbox" name="chkLikes" id="chkLikes" data-filter="Likes" data-mini="true">
|
||||
<label for="chkLikes">${OptionLikes}</label>
|
||||
|
||||
<input class="chkStandardFilter" type="checkbox" name="chkDislikes" id="chkDislikes" data-filter="Dislikes" data-mini="true">
|
||||
<label for="chkDislikes">${OptionDislikes}</label>
|
||||
</fieldset>
|
||||
<br />
|
||||
|
||||
<div data-role="collapsible" data-collapsed="true" data-mini="true" class="genreFilters">
|
||||
<h2>${HeaderGenres}</h2>
|
||||
|
||||
<div class="filterOptions">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,83 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Emby</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="musicArtistsPage" data-role="page" class="page libraryPage" data-require="scripts/musicartists,scripts/queryfilters">
|
||||
<div class="libraryViewNav scopedLibraryViewNav">
|
||||
<a href="musicrecommended.html"><iron-icon icon="info"></iron-icon>${TabSuggestions}</a>
|
||||
<a href="musicalbums.html"><iron-icon icon="album"></iron-icon>${TabAlbums}</a>
|
||||
<a href="musicalbumartists.html"><iron-icon icon="music-note"></iron-icon>${TabAlbumArtists}</a>
|
||||
<a href="#" class="ui-btn-active"><iron-icon icon="music-note"></iron-icon>${TabArtists}</a>
|
||||
<a href="songs.html" class="musicSongsTab"><iron-icon icon="music-note"></iron-icon>${TabSongs}</a>
|
||||
<a href="musicgenres.html"><iron-icon icon="library-music"></iron-icon>${TabGenres}</a>
|
||||
</div>
|
||||
|
||||
<div class="alphabetPicker">
|
||||
</div>
|
||||
<div data-role="content">
|
||||
<div class="viewSettings">
|
||||
<div class="listTopPaging">
|
||||
</div>
|
||||
<div class="selectionCommands" style="display: none;">
|
||||
<div class="selectionCommandsControlGroup">
|
||||
<button class="btnAddToPlaylist" data-mini="true" data-icon="plus" data-inline="true" title="${ButtonAddToPlaylist}">${ButtonAddToPlaylist}</button>
|
||||
<button class="btnSyncItems" data-mini="true" data-icon="refresh" data-inline="true" title="${ButtonSync}">${ButtonSync}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="items" class="itemsContainer paddedItemsContainer" style="text-align:center;"></div>
|
||||
</div>
|
||||
<div data-role="panel" class="viewPanel" data-theme="a" data-position="right" data-display="overlay" data-position-fixed="true">
|
||||
<form>
|
||||
|
||||
<div data-role="controlgroup" data-type="horizontal" data-mini="true" class="viewPanelTabs">
|
||||
<a href="#" data-role="button" class="viewTabButton" data-tab="tabView">${TabView}</a>
|
||||
<a href="#" data-role="button" class="viewTabButton" data-tab="tabFilter">${TabFilter}</a>
|
||||
</div>
|
||||
|
||||
<div class="tabView viewTab">
|
||||
|
||||
<div>
|
||||
<label for="selectView">${LabelView}</label>
|
||||
<select id="selectView">
|
||||
<option value="List">${OptionList}</option>
|
||||
<option value="Poster">${OptionPoster}</option>
|
||||
<option value="PosterCard">${OptionPosterCard}</option>
|
||||
</select>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<label for="selectPageSize">${LabelPageSize}</label>
|
||||
<select id="selectPageSize" class="selectPageSize"></select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="tabFilter viewTab">
|
||||
<fieldset data-role="controlgroup">
|
||||
<legend>${HeaderFilters}</legend>
|
||||
<input class="chkStandardFilter" type="checkbox" name="chkIsFavorite" id="chkIsFavorite" data-filter="IsFavorite" data-mini="true">
|
||||
<label for="chkIsFavorite">${OptionFavorite}</label>
|
||||
|
||||
<input class="chkStandardFilter" type="checkbox" name="chkLikes" id="chkLikes" data-filter="Likes" data-mini="true">
|
||||
<label for="chkLikes">${OptionLikes}</label>
|
||||
|
||||
<input class="chkStandardFilter" type="checkbox" name="chkDislikes" id="chkDislikes" data-filter="Dislikes" data-mini="true">
|
||||
<label for="chkDislikes">${OptionDislikes}</label>
|
||||
</fieldset>
|
||||
<br />
|
||||
|
||||
<div data-role="collapsible" data-collapsed="true" data-mini="true" class="genreFilters">
|
||||
<h2>${HeaderGenres}</h2>
|
||||
|
||||
<div class="filterOptions">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,218 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Emby</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="musicRecommendedPage" data-role="page" class="page libraryPage backdropPage pageWithAbsoluteTabs" data-backdroptype="musicartist" data-require="scripts/musicrecommended">
|
||||
<div class="libraryViewNav libraryViewNavWithMinHeight">
|
||||
<paper-tabs hidescrollbuttons noink>
|
||||
<paper-tab><iron-icon icon="info"></iron-icon>${TabSuggestions}</paper-tab>
|
||||
<paper-tab><iron-icon icon="album"></iron-icon>${TabAlbums}</paper-tab>
|
||||
<paper-tab><iron-icon icon="music-note"></iron-icon>${TabAlbumArtists}</paper-tab>
|
||||
<paper-tab><iron-icon icon="music-note"></iron-icon>${TabArtists}</paper-tab>
|
||||
<paper-tab><iron-icon icon="music-note"></iron-icon>${TabSongs}</paper-tab>
|
||||
<paper-tab><iron-icon icon="library-music"></iron-icon>${TabGenres}</paper-tab>
|
||||
</paper-tabs>
|
||||
<div class="legacyTabs scopedLibraryViewNav">
|
||||
<a href="musicrecommended.html"><iron-icon icon="info"></iron-icon>${TabSuggestions}</a>
|
||||
<a href="musicrecommended.html?tab=1"><iron-icon icon="album"></iron-icon>${TabAlbums}</a>
|
||||
<a href="musicrecommended.html?tab=2"><iron-icon icon="music-note"></iron-icon>${TabAlbumArtists}</a>
|
||||
<a href="musicrecommended.html?tab=3"><iron-icon icon="music-note"></iron-icon>${TabArtists}</a>
|
||||
<a href="musicrecommended.html?tab=4"><iron-icon icon="music-note"></iron-icon>${TabSongs}</a>
|
||||
<a href="musicrecommended.html?tab=5"><iron-icon icon="library-music"></iron-icon>${TabGenres}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pageBackground"></div>
|
||||
|
||||
<div class="ehsContent fullWidth">
|
||||
|
||||
<neon-animated-pages>
|
||||
<neon-animatable>
|
||||
<div class="pageTabContent" data-index="0">
|
||||
<div class="homePageSection">
|
||||
<h1 class="listHeader">${HeaderLatestMusic}</h1>
|
||||
|
||||
<div id="recentlyAddedSongs" class="itemsContainer fullWidthItemsContainer" style="text-align:left;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="playlists" style="display: none;" class="homePageSection">
|
||||
<h1 class="listHeader">${HeaderPlaylists}</h1>
|
||||
|
||||
<div class="itemsContainer fullWidthItemsContainer" style="text-align:left;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="recentlyPlayed" style="display: none;" class="homePageSection">
|
||||
<h1 class="listHeader">${HeaderRecentlyPlayed}</h1>
|
||||
|
||||
<div id="recentlyPlayedSongs" class="itemsContainer fullWidthItemsContainer" style="text-align:left;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="topPlayed" style="display: none;" class="homePageSection">
|
||||
<h1 class="listHeader">${HeaderFrequentlyPlayed}</h1>
|
||||
|
||||
<div id="topPlayedSongs" class="itemsContainer fullWidthItemsContainer" style="text-align:left;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</neon-animatable>
|
||||
<neon-animatable>
|
||||
<div class="pageTabContent" data-index="1">
|
||||
<div class="viewSettings">
|
||||
<div class="listTopPaging">
|
||||
</div>
|
||||
<div class="selectionCommands" style="display: none;">
|
||||
<div class="selectionCommandsControlGroup">
|
||||
<button class="btnAddToPlaylist" data-mini="true" data-icon="plus" data-inline="true" title="${ButtonAddToPlaylist}">${ButtonAddToPlaylist}</button>
|
||||
<button class="btnSyncItems" data-mini="true" data-icon="refresh" data-inline="true" title="${ButtonSync}">${ButtonSync}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="items" class="itemsContainer paddedItemsContainer"></div>
|
||||
</div>
|
||||
</neon-animatable>
|
||||
<neon-animatable>
|
||||
<div class="pageTabContent" data-index="2">
|
||||
</div>
|
||||
</neon-animatable>
|
||||
<neon-animatable>
|
||||
<div class="pageTabContent" data-index="3">
|
||||
</div>
|
||||
</neon-animatable>
|
||||
<neon-animatable>
|
||||
<div class="pageTabContent" data-index="4">
|
||||
<div class="viewSettings">
|
||||
<div class="listTopPaging">
|
||||
</div>
|
||||
</div>
|
||||
<div id="items" class="itemsContainer" style="max-width:1000px;margin: 0 auto;"></div>
|
||||
</div>
|
||||
</neon-animatable>
|
||||
<neon-animatable>
|
||||
<div class="pageTabContent" data-index="5">
|
||||
<div class="viewSettings">
|
||||
<div class="listTopPaging">
|
||||
</div>
|
||||
<div class="selectionCommands" style="display: none;">
|
||||
<div class="selectionCommandsControlGroup">
|
||||
<button class="btnAddToPlaylist" data-mini="true" data-icon="plus" data-inline="true" title="${ButtonAddToPlaylist}">${ButtonAddToPlaylist}</button>
|
||||
<button class="btnSyncItems" data-mini="true" data-icon="refresh" data-inline="true" title="${ButtonSync}">${ButtonSync}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="items" class="itemsContainer paddedItemsContainer"></div>
|
||||
</div>
|
||||
</neon-animatable>
|
||||
</neon-animated-pages>
|
||||
</div>
|
||||
|
||||
<div data-role="panel" class="viewPanel albumsViewPanel" data-theme="a" data-position="right" data-display="overlay" data-position-fixed="true">
|
||||
<form>
|
||||
|
||||
<fieldset data-role="controlgroup">
|
||||
<legend>${HeaderFilters}</legend>
|
||||
<input class="chkStandardFilter" type="checkbox" id="chkIsFavoriteAlbums" data-filter="IsFavorite" data-mini="true">
|
||||
<label for="chkIsFavoriteAlbums">${OptionFavorite}</label>
|
||||
|
||||
<input class="chkStandardFilter" type="checkbox" id="chkLikesAlbums" data-filter="Likes" data-mini="true">
|
||||
<label for="chkLikesAlbums">${OptionLikes}</label>
|
||||
|
||||
<input class="chkStandardFilter" type="checkbox" id="chkDislikesAlbums" data-filter="Dislikes" data-mini="true">
|
||||
<label for="chkDislikesAlbums">${OptionDislikes}</label>
|
||||
</fieldset>
|
||||
<br />
|
||||
|
||||
<div data-role="collapsible" data-collapsed="true" data-mini="true" class="genreFilters">
|
||||
<h2>${HeaderGenres}</h2>
|
||||
|
||||
<div class="filterOptions">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-role="collapsible" data-collapsed="true" data-mini="true" class="officialRatingFilters">
|
||||
<h2>${HeaderParentalRatings}</h2>
|
||||
|
||||
<div class="filterOptions">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-role="collapsible" data-collapsed="true" data-mini="true" class="tagFilters">
|
||||
<h2>${HeaderTags}</h2>
|
||||
|
||||
<div class="filterOptions">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-role="collapsible" data-collapsed="true" data-mini="true" class="yearFilters">
|
||||
<h2>${HeaderYears}</h2>
|
||||
|
||||
<div class="filterOptions">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div data-role="panel" class="viewPanel songsViewPanel" data-theme="a" data-position="right" data-display="overlay" data-position-fixed="true">
|
||||
<form>
|
||||
|
||||
<fieldset data-role="controlgroup">
|
||||
<legend>${HeaderFilters}</legend>
|
||||
<input class="chkStandardFilter" type="checkbox" id="chkPlayedSongs" data-filter="IsPlayed" data-mini="true">
|
||||
<label for="chkPlayedSongs">${OptionPlayed}</label>
|
||||
|
||||
<input class="chkStandardFilter" type="checkbox" id="chkUnplayedSongs" data-filter="IsUnPlayed" data-mini="true">
|
||||
<label for="chkUnplayedSongs">${OptionUnplayed}</label>
|
||||
|
||||
<input class="chkStandardFilter" type="checkbox" id="chkIsFavoriteSongs" data-filter="IsFavorite" data-mini="true">
|
||||
<label for="chkIsFavoriteSongs">${OptionFavorite}</label>
|
||||
|
||||
<input class="chkStandardFilter" type="checkbox" id="chkLikesSongs" data-filter="Likes" data-mini="true">
|
||||
<label for="chkLikesSongs">${OptionLikes}</label>
|
||||
|
||||
<input class="chkStandardFilter" type="checkbox" id="chkDislikesSongs" data-filter="Dislikes" data-mini="true">
|
||||
<label for="chkDislikesSongs">${OptionDislikes}</label>
|
||||
|
||||
</fieldset>
|
||||
<br />
|
||||
|
||||
<div data-role="collapsible" data-collapsed="true" data-mini="true" class="genreFilters">
|
||||
<h2>${HeaderGenres}</h2>
|
||||
|
||||
<div class="filterOptions">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-role="collapsible" data-collapsed="true" data-mini="true" class="officialRatingFilters">
|
||||
<h2>${HeaderParentalRatings}</h2>
|
||||
|
||||
<div class="filterOptions">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-role="collapsible" data-collapsed="true" data-mini="true" class="tagFilters">
|
||||
<h2>${HeaderTags}</h2>
|
||||
|
||||
<div class="filterOptions">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-role="collapsible" data-collapsed="true" data-mini="true" class="yearFilters">
|
||||
<h2>${HeaderYears}</h2>
|
||||
|
||||
<div class="filterOptions">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div data-role="content">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -858,7 +858,7 @@
|
|||
}
|
||||
|
||||
if (item.CollectionType == 'music') {
|
||||
return 'musicrecommended.html?topParentId=' + item.Id;
|
||||
return 'music.html?topParentId=' + item.Id;
|
||||
}
|
||||
|
||||
if (item.CollectionType == 'games') {
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
(function ($, document) {
|
||||
|
||||
var pageSizeKey = 'people';
|
||||
|
||||
var view = LibraryBrowser.getDefaultItemsView('Poster', 'Poster');
|
||||
|
||||
var data = {};
|
||||
|
||||
function getQuery() {
|
||||
|
||||
function getPageData() {
|
||||
var key = getSavedQueryKey();
|
||||
var pageData = data[key];
|
||||
|
||||
|
@ -22,13 +16,19 @@
|
|||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb",
|
||||
Limit: LibraryBrowser.getDefaultPageSize()
|
||||
}
|
||||
},
|
||||
view: LibraryBrowser.getSavedView(key) || LibraryBrowser.getDefaultItemsView('Poster', 'Poster')
|
||||
};
|
||||
|
||||
pageData.query.ParentId = LibraryMenu.getTopParentId();
|
||||
LibraryBrowser.loadSavedQueryValues(key, pageData.query);
|
||||
}
|
||||
return pageData.query;
|
||||
return pageData;
|
||||
}
|
||||
|
||||
function getQuery() {
|
||||
|
||||
return getPageData().query;
|
||||
}
|
||||
|
||||
function getSavedQueryKey() {
|
||||
|
@ -36,7 +36,7 @@
|
|||
return getWindowUrl() + 'albumartists';
|
||||
}
|
||||
|
||||
function reloadItems(page) {
|
||||
function reloadItems(page, viewPanel) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
|
@ -47,20 +47,26 @@
|
|||
// Scroll back up so they can see the results from the beginning
|
||||
window.scrollTo(0, 0);
|
||||
|
||||
var view = getPageData().view;
|
||||
|
||||
var html = '';
|
||||
var pagingHtml = LibraryBrowser.getQueryPagingHtml({
|
||||
startIndex: query.StartIndex,
|
||||
limit: query.Limit,
|
||||
totalRecordCount: result.TotalRecordCount,
|
||||
viewButton: true,
|
||||
showLimit: false,
|
||||
addSelectionButton: true,
|
||||
pageSizeKey: pageSizeKey
|
||||
viewPanelClass: 'albumArtistsViewPanel',
|
||||
updatePageSizeSetting: false,
|
||||
addLayoutButton: true,
|
||||
currentLayout: view,
|
||||
viewButton: true,
|
||||
viewIcon: 'filter-list'
|
||||
});
|
||||
|
||||
page.querySelector('.listTopPaging').innerHTML = pagingHtml;
|
||||
|
||||
updateFilterControls(page);
|
||||
updateFilterControls(page, viewPanel);
|
||||
var trigger = false;
|
||||
|
||||
if (view == "List") {
|
||||
|
@ -108,12 +114,18 @@
|
|||
|
||||
$('.btnNextPage', page).on('click', function () {
|
||||
query.StartIndex += query.Limit;
|
||||
reloadItems(page);
|
||||
reloadItems(page, viewPanel);
|
||||
});
|
||||
|
||||
$('.btnPreviousPage', page).on('click', function () {
|
||||
query.StartIndex -= query.Limit;
|
||||
reloadItems(page);
|
||||
reloadItems(page, viewPanel);
|
||||
});
|
||||
|
||||
$('.btnChangeLayout', page).on('layoutchange', function (e, layout) {
|
||||
getPageData().view = layout;
|
||||
LibraryBrowser.saveViewSetting(getSavedQueryKey(), layout);
|
||||
reloadItems(page, viewPanel);
|
||||
});
|
||||
|
||||
LibraryBrowser.saveQueryValues(getSavedQueryKey(), query);
|
||||
|
@ -122,11 +134,11 @@
|
|||
});
|
||||
}
|
||||
|
||||
function updateFilterControls(page) {
|
||||
function updateFilterControls(tabContent, viewPanel) {
|
||||
|
||||
var query = getQuery();
|
||||
|
||||
$('.chkStandardFilter', page).each(function () {
|
||||
$('.chkStandardFilter', viewPanel).each(function () {
|
||||
|
||||
var filters = "," + (query.Filters || "");
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
@ -135,40 +147,33 @@
|
|||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('#selectView', page).val(view);
|
||||
|
||||
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
|
||||
$('#selectPageSize', page).val(query.Limit);
|
||||
$('.alphabetPicker', tabContent).alphaValue(query.NameStartsWithOrGreater);
|
||||
}
|
||||
|
||||
function reloadFiltersIfNeeded(page) {
|
||||
function reloadFiltersIfNeeded(page, viewPanel) {
|
||||
|
||||
if (!getPageData().filtersLoaded) {
|
||||
|
||||
getPageData().filtersLoaded = true;
|
||||
|
||||
var query = getQuery();
|
||||
QueryFilters.loadFilters(viewPanel, Dashboard.getCurrentUserId(), query, function () {
|
||||
|
||||
QueryFilters.loadFilters(page, Dashboard.getCurrentUserId(), query, function () {
|
||||
|
||||
reloadItems(page);
|
||||
reloadItems(page, viewPanel);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#musicAlbumArtistsPage", function () {
|
||||
function initPage(tabContent, viewPanel) {
|
||||
|
||||
var page = this;
|
||||
$(viewPanel).on('panelopen', function () {
|
||||
|
||||
$('.viewPanel', page).on('panelopen', function () {
|
||||
|
||||
reloadFiltersIfNeeded(page);
|
||||
reloadFiltersIfNeeded(tabContent, viewPanel);
|
||||
});
|
||||
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
$('.chkStandardFilter', viewPanel).on('change', function () {
|
||||
|
||||
var query = getQuery();
|
||||
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
var filters = query.Filters || "";
|
||||
|
||||
|
@ -181,7 +186,7 @@
|
|||
query.StartIndex = 0;
|
||||
query.Filters = filters;
|
||||
|
||||
reloadItems(page);
|
||||
reloadItems(tabContent, viewPanel);
|
||||
});
|
||||
|
||||
$('.alphabetPicker', this).on('alphaselect', function (e, character) {
|
||||
|
@ -191,7 +196,7 @@
|
|||
query.NameStartsWithOrGreater = character;
|
||||
query.StartIndex = 0;
|
||||
|
||||
reloadItems(page);
|
||||
reloadItems(tabContent, viewPanel);
|
||||
|
||||
}).on('alphaclear', function (e) {
|
||||
|
||||
|
@ -199,45 +204,22 @@
|
|||
|
||||
query.NameStartsWithOrGreater = '';
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('#selectView', this).on('change', function () {
|
||||
|
||||
view = this.value;
|
||||
|
||||
reloadItems(page);
|
||||
|
||||
LibraryBrowser.saveViewSetting(getSavedQueryKey(), view);
|
||||
});
|
||||
|
||||
$('#selectPageSize', page).on('change', function () {
|
||||
var query = getQuery();
|
||||
|
||||
query.Limit = parseInt(this.value);
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
}).on('pagebeforeshow', "#musicAlbumArtistsPage", function () {
|
||||
|
||||
var page = this;
|
||||
var query = getQuery();
|
||||
|
||||
QueryFilters.onPageShow(page, query);
|
||||
|
||||
if (LibraryBrowser.needsRefresh(page)) {
|
||||
LibraryBrowser.getSavedViewSetting(getSavedQueryKey()).done(function (val) {
|
||||
|
||||
if (val) {
|
||||
$('#selectView', page).val(val).trigger('change');
|
||||
} else {
|
||||
reloadItems(page);
|
||||
}
|
||||
reloadItems(tabContent, viewPanel);
|
||||
});
|
||||
}
|
||||
|
||||
updateFilterControls(this);
|
||||
});
|
||||
window.MusicPage.initAlbumArtistsTab = function (page, tabContent) {
|
||||
|
||||
var viewPanel = page.querySelector('.albumArtistsViewPanel');
|
||||
initPage(tabContent, viewPanel);
|
||||
};
|
||||
|
||||
window.MusicPage.renderAlbumArtistsTab = function (page, tabContent) {
|
||||
|
||||
if (LibraryBrowser.needsRefresh(tabContent)) {
|
||||
var viewPanel = page.querySelector('.albumArtistsViewPanel');
|
||||
reloadItems(tabContent, viewPanel);
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery, document);
|
|
@ -61,7 +61,8 @@
|
|||
viewPanelClass: 'albumsViewPanel',
|
||||
addLayoutButton: true,
|
||||
currentLayout: view,
|
||||
updatePageSizeSetting: false
|
||||
updatePageSizeSetting: false,
|
||||
viewIcon: 'filter-list'
|
||||
});
|
||||
|
||||
page.querySelector('.listTopPaging').innerHTML = pagingHtml;
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
(function ($, document) {
|
||||
|
||||
var pageSizeKey = 'people';
|
||||
|
||||
var view = LibraryBrowser.getDefaultItemsView('Poster', 'Poster');
|
||||
|
||||
var data = {};
|
||||
|
||||
function getQuery() {
|
||||
|
||||
function getPageData() {
|
||||
var key = getSavedQueryKey();
|
||||
var pageData = data[key];
|
||||
|
||||
|
@ -22,13 +16,19 @@
|
|||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb",
|
||||
Limit: LibraryBrowser.getDefaultPageSize()
|
||||
}
|
||||
},
|
||||
view: LibraryBrowser.getSavedView(key) || LibraryBrowser.getDefaultItemsView('Poster', 'Poster')
|
||||
};
|
||||
|
||||
pageData.query.ParentId = LibraryMenu.getTopParentId();
|
||||
LibraryBrowser.loadSavedQueryValues(key, pageData.query);
|
||||
}
|
||||
return pageData.query;
|
||||
return pageData;
|
||||
}
|
||||
|
||||
function getQuery() {
|
||||
|
||||
return getPageData().query;
|
||||
}
|
||||
|
||||
function getSavedQueryKey() {
|
||||
|
@ -36,31 +36,37 @@
|
|||
return getWindowUrl() + 'artists';
|
||||
}
|
||||
|
||||
function reloadItems(page) {
|
||||
function reloadItems(page, viewPanel) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var query = getQuery();
|
||||
|
||||
ApiClient.getArtists(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 view = getPageData().view;
|
||||
|
||||
var html = '';
|
||||
var pagingHtml = LibraryBrowser.getQueryPagingHtml({
|
||||
startIndex: query.StartIndex,
|
||||
limit: query.Limit,
|
||||
totalRecordCount: result.TotalRecordCount,
|
||||
viewButton: true,
|
||||
showLimit: false,
|
||||
addSelectionButton: true,
|
||||
pageSizeKey: pageSizeKey
|
||||
viewPanelClass: 'artistsViewPanel',
|
||||
updatePageSizeSetting: false,
|
||||
addLayoutButton: true,
|
||||
currentLayout: view,
|
||||
viewButton: true,
|
||||
viewIcon: 'filter-list'
|
||||
});
|
||||
|
||||
page.querySelector('.listTopPaging').innerHTML = pagingHtml;
|
||||
|
||||
updateFilterControls(page);
|
||||
updateFilterControls(page, viewPanel);
|
||||
var trigger = false;
|
||||
|
||||
if (view == "List") {
|
||||
|
@ -98,7 +104,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
var elem = page.querySelector('.itemsContainer');
|
||||
var elem = page.querySelector('#items');
|
||||
elem.innerHTML = html + pagingHtml;
|
||||
ImageLoader.lazyChildren(elem);
|
||||
|
||||
|
@ -108,12 +114,18 @@
|
|||
|
||||
$('.btnNextPage', page).on('click', function () {
|
||||
query.StartIndex += query.Limit;
|
||||
reloadItems(page);
|
||||
reloadItems(page, viewPanel);
|
||||
});
|
||||
|
||||
$('.btnPreviousPage', page).on('click', function () {
|
||||
query.StartIndex -= query.Limit;
|
||||
reloadItems(page);
|
||||
reloadItems(page, viewPanel);
|
||||
});
|
||||
|
||||
$('.btnChangeLayout', page).on('layoutchange', function (e, layout) {
|
||||
getPageData().view = layout;
|
||||
LibraryBrowser.saveViewSetting(getSavedQueryKey(), layout);
|
||||
reloadItems(page, viewPanel);
|
||||
});
|
||||
|
||||
LibraryBrowser.saveQueryValues(getSavedQueryKey(), query);
|
||||
|
@ -122,10 +134,11 @@
|
|||
});
|
||||
}
|
||||
|
||||
function updateFilterControls(page) {
|
||||
function updateFilterControls(tabContent, viewPanel) {
|
||||
|
||||
var query = getQuery();
|
||||
$('.chkStandardFilter', page).each(function () {
|
||||
|
||||
$('.chkStandardFilter', viewPanel).each(function () {
|
||||
|
||||
var filters = "," + (query.Filters || "");
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
@ -134,36 +147,31 @@
|
|||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('#selectView', page).val(view);
|
||||
|
||||
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
|
||||
$('#selectPageSize', page).val(query.Limit);
|
||||
$('.alphabetPicker', tabContent).alphaValue(query.NameStartsWithOrGreater);
|
||||
}
|
||||
|
||||
function reloadFiltersIfNeeded(page) {
|
||||
function reloadFiltersIfNeeded(page, viewPanel) {
|
||||
|
||||
var query = getQuery();
|
||||
if (!getPageData().filtersLoaded) {
|
||||
|
||||
getPageData().filtersLoaded = true;
|
||||
|
||||
QueryFilters.loadFilters(page, Dashboard.getCurrentUserId(), query, function () {
|
||||
var query = getQuery();
|
||||
QueryFilters.loadFilters(viewPanel, Dashboard.getCurrentUserId(), query, function () {
|
||||
|
||||
reloadItems(page);
|
||||
reloadItems(page, viewPanel);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#musicArtistsPage", function () {
|
||||
function initPage(tabContent, viewPanel) {
|
||||
|
||||
var page = this;
|
||||
$(viewPanel).on('panelopen', function () {
|
||||
|
||||
$('.viewPanel', page).on('panelopen', function () {
|
||||
|
||||
reloadFiltersIfNeeded(page);
|
||||
reloadFiltersIfNeeded(tabContent, viewPanel);
|
||||
});
|
||||
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
$('.chkStandardFilter', viewPanel).on('change', function () {
|
||||
|
||||
var query = getQuery();
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
@ -178,61 +186,40 @@
|
|||
query.StartIndex = 0;
|
||||
query.Filters = filters;
|
||||
|
||||
reloadItems(page);
|
||||
reloadItems(tabContent, viewPanel);
|
||||
});
|
||||
|
||||
$('.alphabetPicker', this).on('alphaselect', function (e, character) {
|
||||
|
||||
var query = getQuery();
|
||||
|
||||
query.NameStartsWithOrGreater = character;
|
||||
query.StartIndex = 0;
|
||||
|
||||
reloadItems(page);
|
||||
reloadItems(tabContent, viewPanel);
|
||||
|
||||
}).on('alphaclear', function (e) {
|
||||
|
||||
var query = getQuery();
|
||||
|
||||
query.NameStartsWithOrGreater = '';
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('#selectView', this).on('change', function () {
|
||||
|
||||
view = this.value;
|
||||
|
||||
reloadItems(page);
|
||||
|
||||
LibraryBrowser.saveViewSetting(getSavedQueryKey(), view);
|
||||
});
|
||||
|
||||
$('#selectPageSize', page).on('change', function () {
|
||||
var query = getQuery();
|
||||
query.Limit = parseInt(this.value);
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
}).on('pagebeforeshow', "#musicArtistsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
var query = getQuery();
|
||||
|
||||
QueryFilters.onPageShow(page, query);
|
||||
|
||||
if (LibraryBrowser.needsRefresh(page)) {
|
||||
LibraryBrowser.getSavedViewSetting(getSavedQueryKey()).done(function (val) {
|
||||
|
||||
if (val) {
|
||||
$('#selectView', page).val(val).trigger('change');
|
||||
} else {
|
||||
reloadItems(page);
|
||||
}
|
||||
reloadItems(tabContent, viewPanel);
|
||||
});
|
||||
}
|
||||
|
||||
updateFilterControls(this);
|
||||
});
|
||||
window.MusicPage.initArtistsTab = function (page, tabContent) {
|
||||
|
||||
var viewPanel = page.querySelector('.artistsViewPanel');
|
||||
initPage(tabContent, viewPanel);
|
||||
};
|
||||
|
||||
window.MusicPage.renderArtistsTab = function (page, tabContent) {
|
||||
|
||||
if (LibraryBrowser.needsRefresh(tabContent)) {
|
||||
var viewPanel = page.querySelector('.artistsViewPanel');
|
||||
reloadItems(tabContent, viewPanel);
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery, document);
|
|
@ -226,14 +226,16 @@
|
|||
depends.push('scripts/queryfilters');
|
||||
break;
|
||||
case 2:
|
||||
depends.push('scripts/movietrailers');
|
||||
renderMethod = 'renderTrailerTab';
|
||||
initMethod = 'initTrailerTab';
|
||||
depends.push('scripts/musicalbumartists');
|
||||
renderMethod = 'renderAlbumArtistsTab';
|
||||
initMethod = 'initAlbumArtistsTab';
|
||||
depends.push('scripts/queryfilters');
|
||||
break;
|
||||
case 3:
|
||||
depends.push('scripts/moviecollections');
|
||||
renderMethod = 'renderCollectionsTab';
|
||||
initMethod = 'initCollectionsTab';
|
||||
depends.push('scripts/musicartists');
|
||||
renderMethod = 'renderArtistsTab';
|
||||
initMethod = 'initArtistsTab';
|
||||
depends.push('scripts/queryfilters');
|
||||
break;
|
||||
case 4:
|
||||
depends.push('scripts/songs');
|
||||
|
@ -274,7 +276,7 @@
|
|||
var tabs = page.querySelector('paper-tabs');
|
||||
var pages = page.querySelector('neon-animated-pages');
|
||||
|
||||
var baseUrl = 'musicrecommended.html';
|
||||
var baseUrl = 'music.html';
|
||||
var topParentId = LibraryMenu.getTopParentId();
|
||||
if (topParentId) {
|
||||
baseUrl += '?topParentId=' + topParentId;
|
||||
|
|
|
@ -57,7 +57,8 @@
|
|||
showLimit: false,
|
||||
sortButton: true,
|
||||
viewPanelClass: 'songsViewPanel',
|
||||
updatePageSizeSetting: false
|
||||
updatePageSizeSetting: false,
|
||||
viewIcon: 'filter-list'
|
||||
});
|
||||
|
||||
page.querySelector('.listTopPaging').innerHTML = pagingHtml;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue