1
0
Fork 0
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:
Luke Pulverenti 2013-04-22 23:56:11 -04:00
parent d775c77482
commit 03a19ef190
11 changed files with 277 additions and 44 deletions

View file

@ -114,6 +114,7 @@
.detailPageContent { .detailPageContent {
width: 70%; width: 70%;
max-width: 1200px;
} }
} }
@ -251,7 +252,7 @@
} }
.detailPagePrimaryInfo { .detailPagePrimaryInfo {
margin: 1em 0 1.5em; margin: 1em 0;
} }
.scenePosterViewItem img { .scenePosterViewItem img {
@ -297,7 +298,7 @@
@media all and (min-width: 1200px) { @media all and (min-width: 1200px) {
.tileItem { .tileItem {
width: 30.6%; width: 31%;
} }
.scenePosterViewItem img { .scenePosterViewItem img {
@ -314,7 +315,7 @@
@media all and (min-width: 1920px) { @media all and (min-width: 1920px) {
.tileItem { .tileItem {
width: 31.3%; width: 31.5%;
} }
.tileImage { .tileImage {
@ -324,7 +325,7 @@
@media all and (min-width: 2000px) { @media all and (min-width: 2000px) {
.tileItem { .tileItem {
width: 23%; width: 23.5%;
} }
} }
@ -337,25 +338,37 @@
.detailTable { .detailTable {
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0; border-spacing: 0;
min-width: 70%; width: 70%;
max-width: 1200px;
} }
.detailTable td { .centeredDetailTable {
border-spacing: 0; margin: auto;
border-top: 1px solid #444; }
border-bottom: 1px solid #444; .stretchedDetailTable {
padding: 3px 5px; width: 100%;
} }
.detailTable th { .detailTable td {
border-spacing: 0; border-spacing: 0;
border-bottom: 1px solid #444; border-top: 1px solid #444;
padding: 5px; border-bottom: 1px solid #444;
font-weight: normal; padding: 3px 5px;
text-align: left; }
}
.detailTable .imgUserItemRating { .detailTable th {
width: 20px; border-spacing: 0;
height: 20px; border-bottom: 1px solid #444;
} padding: 5px;
font-weight: normal;
text-align: left;
vertical-align: top;
}
.detailTable .imgUserItemRating {
width: 18px;
height: 18px;
}
.userDataCell {
width: 140px;
}

View file

@ -471,7 +471,7 @@ form, .readOnlyContent {
bottom: 28px; bottom: 28px;
} }
.posterViewItem:hover, .userItem:hover, .posterDetailViewItem:hover { .posterViewItem:hover, .userItem:hover, .tileItem:hover {
-moz-box-shadow: 0 0 20px 3px #2572EB; -moz-box-shadow: 0 0 20px 3px #2572EB;
-webkit-box-shadow: 0 0 20px 3px #2572EB; -webkit-box-shadow: 0 0 20px 3px #2572EB;
box-shadow: 0 0 20px 3px #2572EB; box-shadow: 0 0 20px 3px #2572EB;
@ -660,6 +660,7 @@ progress {
.itemDetailImage { .itemDetailImage {
max-width: 100%; max-width: 100%;
max-height: 400px;
} }
.itemImageBlock { .itemImageBlock {
@ -712,7 +713,7 @@ progress {
} }
.itemDetailImage { .itemDetailImage {
width: 220px; max-width: 220px;
} }
.itemDetailBlock { .itemDetailBlock {
@ -730,7 +731,7 @@ progress {
@media all and (min-width: 750px) { @media all and (min-width: 750px) {
.itemDetailImage { .itemDetailImage {
width: 300px; max-width: 300px;
} }
.itemDetailBlock { .itemDetailBlock {
@ -756,7 +757,7 @@ progress {
@media all and (min-width: 1440px) { @media all and (min-width: 1440px) {
.itemDetailImage { .itemDetailImage {
width: 350px; max-width: 350px;
} }
.itemDetailBlock { .itemDetailBlock {
@ -767,7 +768,7 @@ progress {
@media all and (min-width: 1700px) { @media all and (min-width: 1700px) {
.itemDetailImage { .itemDetailImage {
width: 400px; max-width: 400px;
} }
.itemDetailBlock { .itemDetailBlock {
@ -778,7 +779,7 @@ progress {
@media all and (min-width: 1920px) { @media all and (min-width: 1920px) {
.itemDetailBlock { .itemDetailBlock {
width: 65%; width: 63%;
} }
} }

View file

@ -111,8 +111,9 @@
<p id="itemLinks"></p> <p id="itemLinks"></p>
</div> </div>
</div> </div>
<div id="itemSongs"></div>
<div style="vertical-align: top;"> <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> <h3><span id="childrenTitle" class="collapsibleTitle"></span></h3>
<div id="childrenContent"></div> <div id="childrenContent"></div>
</div> </div>

View file

@ -10,7 +10,7 @@
<div data-role="content"> <div data-role="content">
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true"> <div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
<a href="musicrecommended.html" data-role="button">Suggested</a> <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="musicalbums.html" data-role="button" class="ui-btn-active">Albums</a>
<a href="musicartists.html" data-role="button">Artists</a> <a href="musicartists.html" data-role="button">Artists</a>
<a href="musicgenres.html" data-role="button">Genres</a> <a href="musicgenres.html" data-role="button">Genres</a>

View file

@ -10,7 +10,7 @@
<div data-role="content"> <div data-role="content">
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true"> <div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
<a href="musicrecommended.html" data-role="button">Suggested</a> <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="musicalbums.html" data-role="button">Albums</a>
<a href="musicartists.html" data-role="button" class="ui-btn-active">Artists</a> <a href="musicartists.html" data-role="button" class="ui-btn-active">Artists</a>
<a href="musicgenres.html" data-role="button">Genres</a> <a href="musicgenres.html" data-role="button">Genres</a>

View file

@ -10,7 +10,7 @@
<div data-role="content"> <div data-role="content">
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true"> <div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
<a href="musicrecommended.html" data-role="button">Suggested</a> <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="musicalbums.html" data-role="button">Albums</a>
<a href="musicartists.html" data-role="button">Artists</a> <a href="musicartists.html" data-role="button">Artists</a>
<a href="musicgenres.html" data-role="button" class="ui-btn-active">Genres</a> <a href="musicgenres.html" data-role="button" class="ui-btn-active">Genres</a>

View file

@ -10,7 +10,7 @@
<div data-role="content"> <div data-role="content">
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true"> <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="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="musicalbums.html" data-role="button">Albums</a>
<a href="musicartists.html" data-role="button">Artists</a> <a href="musicartists.html" data-role="button">Artists</a>
<a href="musicgenres.html" data-role="button">Genres</a> <a href="musicgenres.html" data-role="button">Genres</a>

View file

@ -127,10 +127,18 @@
function setInitialCollapsibleState(page, item) { 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(); $('#childrenCollapsible', page).show();
renderChildren(page, item); renderChildren(page, item);
} else { }
else {
$('#itemSongs', page).hide();
$('#childrenCollapsible', page).hide(); $('#childrenCollapsible', page).hide();
} }
if (LibraryBrowser.shouldDisplayGallery(item)) { if (LibraryBrowser.shouldDisplayGallery(item)) {
@ -212,7 +220,7 @@
if (item.Type == "MusicAlbum") { if (item.Type == "MusicAlbum") {
$('#childrenContent', page).html(LibraryBrowser.getSongTableHtml(result.Items)).trigger('create'); $('#itemSongs', page).html(LibraryBrowser.getSongTableHtml(result.Items)).trigger('create');
} else { } else {
var html = LibraryBrowser.getPosterDetailViewHtml({ var html = LibraryBrowser.getPosterDetailViewHtml({

View file

@ -162,19 +162,36 @@
return html; return html;
}, },
getSongTableHtml: function (items) { getSongTableHtml: function (items, options) {
options = options || {};
var html = ''; 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 += '<tr>';
html += '<th></th>'; html += '<th></th>';
html += '<th>Track</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>Duration</th>';
html += '<th>Play Count</th>'; html += '<th>Play Count</th>';
html += '<th></th>'; html += '<th class="userDataCell"></th>';
html += '</tr>'; html += '</tr>';
@ -193,13 +210,21 @@
html += '<td><a href="' + LibraryBrowser.getHref(item) + '">' + (item.Name || "") + '</a></td>'; 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); var time = DashboardPage.getDisplayText(item.RunTimeTicks || 0);
html += '<td>' + time + '</td>'; html += '<td>' + time + '</td>';
html += '<td>' + (item.UserData ? item.UserData.PlayCount : 0) + '</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>'; html += '</tr>';
} }
@ -540,8 +565,15 @@
else if (item.Type == "Person") else if (item.Type == "Person")
links.push('<a class="ui-link" href="http://www.tv.com/people/' + providerIds.Tvcom + '" target="_blank">TV.com</a>'); 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) {
links.push('<a class="ui-link" href="http://musicbrainz.org/release/' + providerIds.Musicbrainz + '" target="_blank">MusicBrainz</a>');
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) if (providerIds.Gamesdb)
links.push('<a class="ui-link" href="http://www.games-db.com/Game/' + providerIds.Gamesdb + '" target="_blank">GamesDB</a>'); 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") { else if (item.MediaType == "Audio" || item.Type == "MusicAlbum") {
url = "css/images/items/detail/audio.png"; url = "css/images/items/detail/audio.png";
useBackgroundColor = true; useBackgroundColor = true;
maxwidth = 150;
} }
else if (item.MediaType == "Game") { else if (item.MediaType == "Game") {
url = "css/images/items/detail/game.png"; url = "css/images/items/detail/game.png";
useBackgroundColor = true; useBackgroundColor = true;
maxwidth = 150;
} }
else if (item.Type == "Person") { else if (item.Type == "Person") {
url = "css/images/items/detail/person.png"; url = "css/images/items/detail/person.png";

View 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
View 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>