mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
audio page progress
This commit is contained in:
parent
d775c77482
commit
03a19ef190
11 changed files with 277 additions and 44 deletions
|
@ -114,6 +114,7 @@
|
|||
|
||||
.detailPageContent {
|
||||
width: 70%;
|
||||
max-width: 1200px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -251,7 +252,7 @@
|
|||
}
|
||||
|
||||
.detailPagePrimaryInfo {
|
||||
margin: 1em 0 1.5em;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.scenePosterViewItem img {
|
||||
|
@ -297,7 +298,7 @@
|
|||
|
||||
@media all and (min-width: 1200px) {
|
||||
.tileItem {
|
||||
width: 30.6%;
|
||||
width: 31%;
|
||||
}
|
||||
|
||||
.scenePosterViewItem img {
|
||||
|
@ -314,7 +315,7 @@
|
|||
|
||||
@media all and (min-width: 1920px) {
|
||||
.tileItem {
|
||||
width: 31.3%;
|
||||
width: 31.5%;
|
||||
}
|
||||
|
||||
.tileImage {
|
||||
|
@ -324,7 +325,7 @@
|
|||
|
||||
@media all and (min-width: 2000px) {
|
||||
.tileItem {
|
||||
width: 23%;
|
||||
width: 23.5%;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -337,7 +338,15 @@
|
|||
.detailTable {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
min-width: 70%;
|
||||
width: 70%;
|
||||
max-width: 1200px;
|
||||
}
|
||||
|
||||
.centeredDetailTable {
|
||||
margin: auto;
|
||||
}
|
||||
.stretchedDetailTable {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.detailTable td {
|
||||
|
@ -353,9 +362,13 @@
|
|||
padding: 5px;
|
||||
font-weight: normal;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.detailTable .imgUserItemRating {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
.userDataCell {
|
||||
width: 140px;
|
||||
}
|
|
@ -471,7 +471,7 @@ form, .readOnlyContent {
|
|||
bottom: 28px;
|
||||
}
|
||||
|
||||
.posterViewItem:hover, .userItem:hover, .posterDetailViewItem:hover {
|
||||
.posterViewItem:hover, .userItem:hover, .tileItem:hover {
|
||||
-moz-box-shadow: 0 0 20px 3px #2572EB;
|
||||
-webkit-box-shadow: 0 0 20px 3px #2572EB;
|
||||
box-shadow: 0 0 20px 3px #2572EB;
|
||||
|
@ -660,6 +660,7 @@ progress {
|
|||
|
||||
.itemDetailImage {
|
||||
max-width: 100%;
|
||||
max-height: 400px;
|
||||
}
|
||||
|
||||
.itemImageBlock {
|
||||
|
@ -712,7 +713,7 @@ progress {
|
|||
}
|
||||
|
||||
.itemDetailImage {
|
||||
width: 220px;
|
||||
max-width: 220px;
|
||||
}
|
||||
|
||||
.itemDetailBlock {
|
||||
|
@ -730,7 +731,7 @@ progress {
|
|||
@media all and (min-width: 750px) {
|
||||
|
||||
.itemDetailImage {
|
||||
width: 300px;
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
.itemDetailBlock {
|
||||
|
@ -756,7 +757,7 @@ progress {
|
|||
@media all and (min-width: 1440px) {
|
||||
|
||||
.itemDetailImage {
|
||||
width: 350px;
|
||||
max-width: 350px;
|
||||
}
|
||||
|
||||
.itemDetailBlock {
|
||||
|
@ -767,7 +768,7 @@ progress {
|
|||
@media all and (min-width: 1700px) {
|
||||
|
||||
.itemDetailImage {
|
||||
width: 400px;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.itemDetailBlock {
|
||||
|
@ -778,7 +779,7 @@ progress {
|
|||
@media all and (min-width: 1920px) {
|
||||
|
||||
.itemDetailBlock {
|
||||
width: 65%;
|
||||
width: 63%;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -111,8 +111,9 @@
|
|||
<p id="itemLinks"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="itemSongs"></div>
|
||||
<div style="vertical-align: top;">
|
||||
<div data-role="collapsible" id="childrenCollapsible" class="hide" data-mini="true" data-collapsed="false" data-corners="false">
|
||||
<div data-role="collapsible" id="childrenCollapsible" class="hide" data-mini="true" data-collapsed="false" data-corners="false" data-inset="fa">
|
||||
<h3><span id="childrenTitle" class="collapsibleTitle"></span></h3>
|
||||
<div id="childrenContent"></div>
|
||||
</div>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div data-role="content">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||
<a href="musicrecommended.html" data-role="button">Suggested</a>
|
||||
<a href="#" data-role="button">Songs</a>
|
||||
<a href="songs.html" data-role="button">Songs</a>
|
||||
<a href="musicalbums.html" data-role="button" class="ui-btn-active">Albums</a>
|
||||
<a href="musicartists.html" data-role="button">Artists</a>
|
||||
<a href="musicgenres.html" data-role="button">Genres</a>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div data-role="content">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||
<a href="musicrecommended.html" data-role="button">Suggested</a>
|
||||
<a href="#" data-role="button">Songs</a>
|
||||
<a href="songs.html" data-role="button">Songs</a>
|
||||
<a href="musicalbums.html" data-role="button">Albums</a>
|
||||
<a href="musicartists.html" data-role="button" class="ui-btn-active">Artists</a>
|
||||
<a href="musicgenres.html" data-role="button">Genres</a>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div data-role="content">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||
<a href="musicrecommended.html" data-role="button">Suggested</a>
|
||||
<a href="#" data-role="button">Songs</a>
|
||||
<a href="songs.html" data-role="button">Songs</a>
|
||||
<a href="musicalbums.html" data-role="button">Albums</a>
|
||||
<a href="musicartists.html" data-role="button">Artists</a>
|
||||
<a href="musicgenres.html" data-role="button" class="ui-btn-active">Genres</a>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div data-role="content">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||
<a href="musicrecommended.html" data-role="button" class="ui-btn-active">Suggested</a>
|
||||
<a href="#" data-role="button">Songs</a>
|
||||
<a href="songs.html" data-role="button">Songs</a>
|
||||
<a href="musicalbums.html" data-role="button">Albums</a>
|
||||
<a href="musicartists.html" data-role="button">Artists</a>
|
||||
<a href="musicgenres.html" data-role="button">Genres</a>
|
||||
|
|
|
@ -127,10 +127,18 @@
|
|||
|
||||
function setInitialCollapsibleState(page, item) {
|
||||
|
||||
if (item.ChildCount) {
|
||||
if (item.ChildCount && item.Type == "MusicAlbum") {
|
||||
$('#itemSongs', page).show();
|
||||
$('#childrenCollapsible', page).hide();
|
||||
renderChildren(page, item);
|
||||
}
|
||||
else if (item.ChildCount) {
|
||||
$('#itemSongs', page).hide();
|
||||
$('#childrenCollapsible', page).show();
|
||||
renderChildren(page, item);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$('#itemSongs', page).hide();
|
||||
$('#childrenCollapsible', page).hide();
|
||||
}
|
||||
if (LibraryBrowser.shouldDisplayGallery(item)) {
|
||||
|
@ -212,7 +220,7 @@
|
|||
|
||||
if (item.Type == "MusicAlbum") {
|
||||
|
||||
$('#childrenContent', page).html(LibraryBrowser.getSongTableHtml(result.Items)).trigger('create');
|
||||
$('#itemSongs', page).html(LibraryBrowser.getSongTableHtml(result.Items)).trigger('create');
|
||||
|
||||
} else {
|
||||
var html = LibraryBrowser.getPosterDetailViewHtml({
|
||||
|
|
|
@ -162,19 +162,36 @@
|
|||
return html;
|
||||
},
|
||||
|
||||
getSongTableHtml: function (items) {
|
||||
getSongTableHtml: function (items, options) {
|
||||
|
||||
options = options || {};
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<table class="detailTable">';
|
||||
var cssClass = options.center ? "centeredDetailTable detailTable" : "detailTable";
|
||||
|
||||
if (options.strech) {
|
||||
cssClass += " stretchedDetailTable";
|
||||
}
|
||||
|
||||
html += '<table class="' + cssClass + '">';
|
||||
|
||||
html += '<tr>';
|
||||
|
||||
html += '<th></th>';
|
||||
|
||||
html += '<th>Track</th>';
|
||||
|
||||
if (options.showAlbum) {
|
||||
html += '<th>Album</th>';
|
||||
}
|
||||
if (options.showArtist) {
|
||||
html += '<th>Artists</th>';
|
||||
}
|
||||
|
||||
html += '<th>Duration</th>';
|
||||
html += '<th>Play Count</th>';
|
||||
html += '<th></th>';
|
||||
html += '<th class="userDataCell"></th>';
|
||||
|
||||
html += '</tr>';
|
||||
|
||||
|
@ -193,13 +210,21 @@
|
|||
|
||||
html += '<td><a href="' + LibraryBrowser.getHref(item) + '">' + (item.Name || "") + '</a></td>';
|
||||
|
||||
if (options.showAlbum) {
|
||||
html += '<td><a href="itemdetails.html?id=' + item.ParentId + '">' + item.Album + '</a></td>';
|
||||
}
|
||||
|
||||
if (options.showArtist) {
|
||||
html += '<td>' + item.Artist + '</td>';
|
||||
}
|
||||
|
||||
var time = DashboardPage.getDisplayText(item.RunTimeTicks || 0);
|
||||
|
||||
html += '<td>' + time + '</td>';
|
||||
|
||||
html += '<td>' + (item.UserData ? item.UserData.PlayCount : 0) + '</td>';
|
||||
|
||||
html += '<td>' + LibraryBrowser.getUserDataIconsHtml(item) + '</td>';
|
||||
html += '<td class="userDataCell">' + LibraryBrowser.getUserDataIconsHtml(item) + '</td>';
|
||||
|
||||
html += '</tr>';
|
||||
}
|
||||
|
@ -540,8 +565,15 @@
|
|||
else if (item.Type == "Person")
|
||||
links.push('<a class="ui-link" href="http://www.tv.com/people/' + providerIds.Tvcom + '" target="_blank">TV.com</a>');
|
||||
}
|
||||
if (providerIds.Musicbrainz)
|
||||
if (providerIds.Musicbrainz) {
|
||||
|
||||
if (item.Type == "MusicArtist" || item.Type == "Artist") {
|
||||
links.push('<a class="ui-link" href="http://musicbrainz.org/artist/' + providerIds.Musicbrainz + '" target="_blank">MusicBrainz</a>');
|
||||
} else {
|
||||
links.push('<a class="ui-link" href="http://musicbrainz.org/release/' + providerIds.Musicbrainz + '" target="_blank">MusicBrainz</a>');
|
||||
}
|
||||
|
||||
}
|
||||
if (providerIds.Gamesdb)
|
||||
links.push('<a class="ui-link" href="http://www.games-db.com/Game/' + providerIds.Gamesdb + '" target="_blank">GamesDB</a>');
|
||||
|
||||
|
@ -996,12 +1028,10 @@
|
|||
else if (item.MediaType == "Audio" || item.Type == "MusicAlbum") {
|
||||
url = "css/images/items/detail/audio.png";
|
||||
useBackgroundColor = true;
|
||||
maxwidth = 150;
|
||||
}
|
||||
else if (item.MediaType == "Game") {
|
||||
url = "css/images/items/detail/game.png";
|
||||
useBackgroundColor = true;
|
||||
maxwidth = 150;
|
||||
}
|
||||
else if (item.Type == "Person") {
|
||||
url = "css/images/items/detail/person.png";
|
||||
|
|
108
dashboard-ui/scripts/songs.js
Normal file
108
dashboard-ui/scripts/songs.js
Normal file
|
@ -0,0 +1,108 @@
|
|||
(function ($, document) {
|
||||
|
||||
// The base query options
|
||||
var query = {
|
||||
|
||||
SortBy: "Artist,Album,SortName",
|
||||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "Audio",
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,ItemCounts,DateCreated,UserData,AudioInfo,ParentId",
|
||||
Limit: 200,
|
||||
StartIndex: 0
|
||||
};
|
||||
|
||||
function reloadItems(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), query).done(function (result) {
|
||||
|
||||
var html = '';
|
||||
|
||||
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
|
||||
|
||||
html += LibraryBrowser.getSongTableHtml(result.Items, {
|
||||
showAlbum: true,
|
||||
showArtist: true,
|
||||
center: true,
|
||||
strech: true
|
||||
});
|
||||
|
||||
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);
|
||||
});
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#songsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.radioSortOrder', this).on('click', function () {
|
||||
query.SortOrder = this.getAttribute('data-sortorder');
|
||||
query.StartIndex = 0;
|
||||
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);
|
||||
});
|
||||
|
||||
}).on('pagebeforeshow', "#songsPage", function () {
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#songsPage", 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');
|
||||
});
|
||||
|
||||
})(jQuery, document);
|
72
dashboard-ui/songs.html
Normal file
72
dashboard-ui/songs.html
Normal file
|
@ -0,0 +1,72 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Media Browser</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="songsPage" data-role="page" class="page libraryPage noLogoPage" data-theme="a">
|
||||
<h1 class="libraryPageHeader"><a href="index.html" class="imageLink">
|
||||
<img src="css/images/mblogoicon.png"></a>Music</h1>
|
||||
<div data-role="content">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||
<a href="musicrecommended.html" data-role="button">Suggested</a>
|
||||
<a href="songs.html" data-role="button" class="ui-btn-active">Songs</a>
|
||||
<a href="musicalbums.html" data-role="button">Albums</a>
|
||||
<a href="musicartists.html" data-role="button">Artists</a>
|
||||
<a href="musicgenres.html" data-role="button">Genres</a>
|
||||
</div>
|
||||
<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"></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" data-theme="c" type="radio" name="radioSortBy" id="radioSortName" value="on" checked="checked" data-sortby="SortName" data-mini="true">
|
||||
<label for="radioSortName">Name</label>
|
||||
</fieldset>
|
||||
|
||||
<fieldset data-role="controlgroup">
|
||||
<legend>
|
||||
<strong>Sort Order:</strong>
|
||||
</legend>
|
||||
|
||||
<input class="radioSortOrder" data-theme="c" type="radio" name="radioSortOrder" id="radioAscending" value="on" checked="checked" data-sortorder="Ascending" data-mini="true">
|
||||
<label for="radioAscending">Ascending</label>
|
||||
|
||||
<input class="radioSortOrder" data-theme="c" type="radio" name="radioSortOrder" 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" name="chkIsFavorite" id="chkIsFavorite" data-theme="c" data-filter="IsFavorite" data-mini="true">
|
||||
<label for="chkIsFavorite">Favorite</label>
|
||||
|
||||
<input class="chkStandardFilter" type="checkbox" name="chkLikes" id="chkLikes" data-theme="c" data-filter="Likes" data-mini="true">
|
||||
<label for="chkLikes">Likes</label>
|
||||
|
||||
<input class="chkStandardFilter" type="checkbox" name="chkDislikes" id="chkDislikes" data-theme="c" data-filter="Dislikes" data-mini="true">
|
||||
<label for="chkDislikes">Dislikes</label>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue