update music tabs

This commit is contained in:
Luke Pulverenti 2015-09-03 14:07:15 -04:00
parent a310b3aa39
commit 2c776145d5
15 changed files with 195 additions and 326 deletions

View File

@ -1,141 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Emby</title>
</head>
<body>
<div id="musicAlbumsPage" data-role="page" class="page libraryPage" data-require="scripts/musicalbums,scripts/queryfilters">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="musicrecommended.html"><iron-icon icon="info"></iron-icon>${TabSuggestions}</a>
<a href="#" class="ui-btn-active"><iron-icon icon="album"></iron-icon>${TabAlbums}</a>
<a href="musicalbumartists.html"><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"></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="tabSort">${TabSort}</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>
<option value="Timeline">${OptionTimeline}</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 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>
</div>
<div class="tabSort viewTab">
<fieldset data-role="controlgroup">
<legend>
${HeaderSortBy}
</legend>
<input class="radioSortBy" type="radio" name="radioSortBy" id="radioSortName" value="on" checked="checked" data-sortby="SortName" data-mini="true">
<label for="radioSortName">${OptionNameSort}</label>
<input class="radioSortBy defaultSort" type="radio" name="radioSortBy" id="radioAlbumArtist" value="off" data-sortby="AlbumArtist,SortName" data-mini="true">
<label for="radioAlbumArtist">${OptionAlbumArtist}</label>
<input class="radioSortBy" type="radio" name="radioSortBy" id="radioCommunityRating" value="off" data-sortby="CommunityRating,SortName" data-mini="true">
<label for="radioCommunityRating">${OptionCommunityRating}</label>
<input class="radioSortBy" type="radio" name="radioSortBy" id="radioDateCreated" value="off" data-sortby="DateCreated" data-mini="true">
<label for="radioDateCreated">${OptionDateAdded}</label>
<input class="radioSortBy" type="radio" name="radioSortBy" id="radioPremiereDate" value="off" data-sortby="ProductionYear,PremiereDate" data-mini="true">
<label for="radioPremiereDate">${OptionReleaseDate}</label>
</fieldset>
<fieldset data-role="controlgroup">
<legend>
${HeaderSortOrder}
</legend>
<input class="radioSortOrder" type="radio" name="radioSortOrder" id="radioAscending" value="on" checked="checked" data-sortorder="Ascending" data-mini="true">
<label for="radioAscending">${OptionAscending}</label>
<input class="radioSortOrder" type="radio" name="radioSortOrder" id="radioDescending" value="off" data-sortorder="Descending" data-mini="true">
<label for="radioDescending">${OptionDescending}</label>
</fieldset>
</div>
</form>
</div>
</div>
</body>
</html>

View File

@ -8,11 +8,11 @@
<div class="libraryViewNav libraryViewNavWithMinHeight">
<paper-tabs hidescrollbuttons noink>
<paper-tab><iron-icon icon="info"></iron-icon>${TabSuggestions}</paper-tab>
<paper-tab><iron-icon icon="local-movies"></iron-icon>${TabMovies}</paper-tab>
<paper-tab class="movieTrailersTab"><iron-icon icon="movie"></iron-icon>${TabTrailers}</paper-tab>
<paper-tab><iron-icon icon="video-library"></iron-icon>${TabCollections}</paper-tab>
<paper-tab><iron-icon icon="video-library"></iron-icon>${TabGenres}</paper-tab>
<paper-tab class="moviePeopleTab"><iron-icon icon="people"></iron-icon>${TabPeople}</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>
@ -62,6 +62,17 @@
</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>
@ -99,25 +110,72 @@
</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" name="chkPlayed" id="chkPlayed" data-filter="IsPlayed" data-mini="true">
<label for="chkPlayed">${OptionPlayed}</label>
<input class="chkStandardFilter" type="checkbox" id="chkPlayedSongs" data-filter="IsPlayed" data-mini="true">
<label for="chkPlayedSongs">${OptionPlayed}</label>
<input class="chkStandardFilter" type="checkbox" name="chkUnplayed" id="chkUnplayed" data-filter="IsUnPlayed" data-mini="true">
<label for="chkUnplayed">${OptionUnplayed}</label>
<input class="chkStandardFilter" type="checkbox" id="chkUnplayedSongs" data-filter="IsUnPlayed" data-mini="true">
<label for="chkUnplayedSongs">${OptionUnplayed}</label>
<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" id="chkIsFavoriteSongs" data-filter="IsFavorite" data-mini="true">
<label for="chkIsFavoriteSongs">${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" id="chkLikesSongs" data-filter="Likes" data-mini="true">
<label for="chkLikesSongs">${OptionLikes}</label>
<input class="chkStandardFilter" type="checkbox" name="chkDislikes" id="chkDislikes" data-filter="Dislikes" data-mini="true">
<label for="chkDislikes">${OptionDislikes}</label>
<input class="chkStandardFilter" type="checkbox" id="chkDislikesSongs" data-filter="Dislikes" data-mini="true">
<label for="chkDislikesSongs">${OptionDislikes}</label>
</fieldset>
<br />

View File

@ -33,7 +33,7 @@
function getSavedQueryKey() {
return getWindowUrl();
return getWindowUrl() + 'collections';
}
function reloadItems(page) {

View File

@ -32,7 +32,7 @@
function getSavedQueryKey() {
return getWindowUrl();
return getWindowUrl() + 'genres';
}
function reloadItems(page) {

View File

@ -30,7 +30,7 @@
function getSavedQueryKey() {
return getWindowUrl();
return getWindowUrl() + 'people';
}
function reloadItems(page, viewPanel) {

View File

@ -35,7 +35,7 @@
function getSavedQueryKey() {
return getWindowUrl();
return getWindowUrl() + 'movies';
}
function reloadItems(page, viewPanel) {
@ -278,12 +278,11 @@
$('.alphabetPicker', tabContent).alphaValue(query.NameStartsWithOrGreater);
}
var filtersLoaded;
function reloadFiltersIfNeeded(tabContent, viewPanel) {
if (!filtersLoaded) {
if (!getPageData().filtersLoaded) {
filtersLoaded = true;
getPageData().filtersLoaded = true;
var query = getQuery();
QueryFilters.loadFilters(viewPanel, Dashboard.getCurrentUserId(), query, function () {

View File

@ -29,7 +29,7 @@
function getSavedQueryKey() {
return getWindowUrl();
return getWindowUrl() + 'studios'
}
function reloadItems(page) {

View File

@ -29,7 +29,7 @@
function getSavedQueryKey() {
return getWindowUrl();
return getWindowUrl() + 'trailers';
}
function reloadItems(page, viewPanel) {

View File

@ -33,7 +33,7 @@
function getSavedQueryKey() {
return getWindowUrl();
return getWindowUrl() + 'albumartists';
}
function reloadItems(page) {
@ -141,12 +141,11 @@
$('#selectPageSize', page).val(query.Limit);
}
var filtersLoaded;
function reloadFiltersIfNeeded(page) {
if (!filtersLoaded) {
if (!getPageData().filtersLoaded) {
filtersLoaded = true;
getPageData().filtersLoaded = true;
var query = getQuery();

View File

@ -1,11 +1,7 @@
(function ($, document) {
var view = LibraryBrowser.getDefaultItemsView('Poster', 'Poster');
var data = {};
function getQuery() {
function getPageData() {
var key = getSavedQueryKey();
var pageData = data[key];
@ -21,21 +17,27 @@
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() {
return getWindowUrl();
return getWindowUrl() + 'albums';
}
function reloadItems(page) {
function reloadItems(page, viewPanel) {
Dashboard.showLoadingMsg();
@ -47,18 +49,24 @@
window.scrollTo(0, 0);
var html = '';
var view = getPageData().view;
var pagingHtml = LibraryBrowser.getQueryPagingHtml({
startIndex: query.StartIndex,
limit: query.Limit,
totalRecordCount: result.TotalRecordCount,
viewButton: true,
showLimit: false,
addSelectionButton: true
addSelectionButton: true,
sortButton: true,
viewPanelClass: 'albumsViewPanel',
addLayoutButton: true,
currentLayout: view,
updatePageSizeSetting: false
});
page.querySelector('.listTopPaging').innerHTML = pagingHtml;
updateFilterControls(page);
updateFilterControls(page, viewPanel);
var trigger = false;
if (view == "Poster") {
@ -117,12 +125,52 @@
$('.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);
});
// On callback make sure to set StartIndex = 0
$('.btnSort', page).on('click', function () {
LibraryBrowser.showSortMenu({
items: [{
name: Globalize.translate('OptionNameSort'),
id: 'SortName'
},
{
name: Globalize.translate('OptionAlbumArtist'),
id: 'AlbumArtist,SortName'
},
{
name: Globalize.translate('OptionCommunityRating'),
id: 'CommunityRating,SortName'
},
{
name: Globalize.translate('OptionCriticRating'),
id: 'CriticRating,SortName'
},
{
name: Globalize.translate('OptionDateAdded'),
id: 'DateCreated,SortName'
},
{
name: Globalize.translate('OptionReleaseDate'),
id: 'ProductionYear,PremiereDate,SortName'
}],
callback: function () {
reloadItems(page, viewPanel);
},
query: query
});
});
LibraryBrowser.saveQueryValues(getSavedQueryKey(), query);
@ -131,85 +179,37 @@
});
}
function updateFilterControls(page) {
function updateFilterControls(page, viewPanel) {
var query = getQuery();
$('#selectView', page).val(view);
// Reset form values using the last used query
$('.radioSortBy', page).each(function () {
this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase();
}).checkboxradio('refresh');
$('.radioSortOrder', page).each(function () {
this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase();
}).checkboxradio('refresh');
$('.alphabetPicker', page).alphaValue(query.NameStartsWith);
$('#selectPageSize', page).val(query.Limit);
}
var filtersLoaded;
function reloadFiltersIfNeeded(page) {
function reloadFiltersIfNeeded(page, viewPanel) {
if (!filtersLoaded) {
if (!getPageData().filtersLoaded) {
filtersLoaded = true;
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', "#musicAlbumsPage", function () {
function initPage(tabContent, viewPanel) {
var page = this;
$(viewPanel).on('panelopen', function () {
$('.viewPanel', page).on('panelopen', function () {
reloadFiltersIfNeeded(page);
reloadFiltersIfNeeded(tabContent, viewPanel);
});
$('.radioSortBy', page).on('click', function () {
$('.chkStandardFilter', viewPanel).on('change', function () {
var query = getQuery();
query.SortBy = this.getAttribute('data-sortby');
query.StartIndex = 0;
// Clear this
$('.alphabetPicker', page).alphaClear();
query.NameStartsWithOrGreater = '';
query.AlbumArtistStartsWithOrGreater = '';
reloadItems(page);
});
$('.radioSortOrder', page).on('click', function () {
var query = getQuery();
query.SortOrder = this.getAttribute('data-sortorder');
query.StartIndex = 0;
// Clear this
$('.alphabetPicker', page).alphaClear();
query.NameStartsWithOrGreater = '';
query.AlbumArtistStartsWithOrGreater = '';
reloadItems(page);
});
$('.chkStandardFilter', page).on('change', function () {
var query = getQuery();
var filterName = this.getAttribute('data-filter');
var filters = query.Filters || "";
@ -222,29 +222,10 @@
query.StartIndex = 0;
query.Filters = filters;
reloadItems(page);
reloadItems(tabContent, viewPanel);
});
$('#selectView', page).on('change', function () {
view = this.value;
var query = getQuery();
if (view == "Timeline") {
query.SortBy = "PremiereDate";
query.SortOrder = "Descending";
query.StartIndex = 0;
$('#radioPremiereDate', page)[0].click();
} else {
reloadItems(page);
}
LibraryBrowser.saveViewSetting(getSavedQueryKey(), view);
});
$('.alphabetPicker', page).on('alphaselect', function (e, character) {
$('.alphabetPicker', tabContent).on('alphaselect', function (e, character) {
var query = getQuery();
@ -258,7 +239,7 @@
query.StartIndex = 0;
reloadItems(page);
reloadItems(tabContent, viewPanel);
}).on('alphaclear', function (e) {
@ -267,36 +248,22 @@
query.NameStartsWithOrGreater = '';
query.AlbumArtistStartsWithOrGreater = '';
reloadItems(page);
reloadItems(tabContent, viewPanel);
});
}
$('#selectPageSize', page).on('change', function () {
var query = getQuery();
window.MusicPage.initAlbumsTab = function (page, tabContent) {
query.Limit = parseInt(this.value);
query.StartIndex = 0;
reloadItems(page);
});
var viewPanel = page.querySelector('.albumsViewPanel');
initPage(tabContent, viewPanel);
};
}).on('pagebeforeshow', "#musicAlbumsPage", function () {
window.MusicPage.renderAlbumsTab = function (page, tabContent) {
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);
}
});
if (LibraryBrowser.needsRefresh(tabContent)) {
var viewPanel = page.querySelector('.albumsViewPanel');
reloadItems(tabContent, viewPanel);
}
updateFilterControls(this);
});
};
})(jQuery, document);

View File

@ -33,7 +33,7 @@
function getSavedQueryKey() {
return getWindowUrl();
return getWindowUrl() + 'artists';
}
function reloadItems(page) {
@ -140,13 +140,12 @@
$('#selectPageSize', page).val(query.Limit);
}
var filtersLoaded;
function reloadFiltersIfNeeded(page) {
var query = getQuery();
if (!filtersLoaded) {
if (!getPageData().filtersLoaded) {
filtersLoaded = true;
getPageData().filtersLoaded = true;
QueryFilters.loadFilters(page, Dashboard.getCurrentUserId(), query, function () {

View File

@ -32,7 +32,7 @@
function getSavedQueryKey() {
return getWindowUrl();
return getWindowUrl() + 'genres';
}
function reloadItems(page) {

View File

@ -220,10 +220,10 @@
renderMethod = 'renderSuggestedTab';
break;
case 1:
depends.push('scripts/movies');
depends.push('scripts/musicalbums');
renderMethod = 'renderAlbumsTab';
initMethod = 'initAlbumsTab';
depends.push('scripts/queryfilters');
renderMethod = 'renderMoviesTab';
initMethod = 'initMoviesTab';
break;
case 2:
depends.push('scripts/movietrailers');

View File

@ -35,7 +35,7 @@
function getSavedQueryKey() {
return getWindowUrl();
return getWindowUrl() + 'songs';
}
function reloadItems(page, viewPanel) {
@ -89,20 +89,20 @@
$('.btnSort', page).on('click', function () {
LibraryBrowser.showSortMenu({
items: [{
name: Globalize.translate('OptionNameSort'),
id: 'SortName'
name: Globalize.translate('OptionTrackName'),
id: 'Name'
},
{
name: Globalize.translate('OptionBudget'),
id: 'Budget,SortName'
name: Globalize.translate('OptionAlbum'),
id: 'Album,SortName'
},
{
name: Globalize.translate('OptionImdbRating'),
id: 'CommunityRating,SortName'
name: Globalize.translate('OptionAlbumArtist'),
id: 'AlbumArtist,Album,SortName'
},
{
name: Globalize.translate('OptionCriticRating'),
id: 'CriticRating,SortName'
name: Globalize.translate('OptionArtist'),
id: 'Artist,Album,SortName'
},
{
name: Globalize.translate('OptionDateAdded'),
@ -112,33 +112,17 @@
name: Globalize.translate('OptionDatePlayed'),
id: 'DatePlayed,SortName'
},
{
name: Globalize.translate('OptionMetascore'),
id: 'Metascore,SortName'
},
{
name: Globalize.translate('OptionParentalRating'),
id: 'OfficialRating,SortName'
},
{
name: Globalize.translate('OptionPlayCount'),
id: 'PlayCount,SortName'
},
{
name: Globalize.translate('OptionReleaseDate'),
id: 'PremiereDate,SortName'
},
{
name: Globalize.translate('OptionRevenue'),
id: 'Revenue,SortName'
id: 'PremiereDate,AlbumArtist,Album,SortName'
},
{
name: Globalize.translate('OptionRuntime'),
id: 'Runtime,SortName'
},
{
name: Globalize.translate('OptionVideoBitrate'),
id: 'VideoBitRate,SortName'
id: 'Runtime,AlbumArtist,Album,SortName'
}],
callback: function () {
reloadItems(page, viewPanel);
@ -153,12 +137,11 @@
});
}
var filtersLoaded;
function reloadFiltersIfNeeded(page, viewPanel) {
if (!filtersLoaded) {
if (!getPageData().filtersLoaded) {
filtersLoaded = true;
getPageData().filtersLoaded = true;
var query = getQuery();
QueryFilters.loadFilters(viewPanel, Dashboard.getCurrentUserId(), query, function () {

View File

@ -862,6 +862,11 @@
"OptionDateAdded": "Date Added",
"OptionPlayCount": "Play Count",
"ButtonDisconnect": "Disconnect",
"OptionAlbumArtist": "Album Artist",
"OptionArtist": "Artist",
"OptionAlbum": "Album",
"OptionTrackName": "Track Name",
"OptionCommunityRating": "Community Rating",
"ButtonSort": "Sort",
"ButtonMenu": "Menu",
"ButtonFilter": "Filter",