mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
rework playlist ui
This commit is contained in:
parent
81cfd99137
commit
59466a8ff3
4 changed files with 120 additions and 130 deletions
|
@ -128,10 +128,7 @@
|
|||
</div>
|
||||
<div class="tabPlaylist tabContent" style="display: none;">
|
||||
|
||||
<div class="readOnlyContent" style="margin: 0 auto; padding: 0 1em;">
|
||||
|
||||
<div class="playlist detailTableContainer">
|
||||
</div>
|
||||
<div class="playlist itemsContainer" style="max-width:800px;margin: 0 auto;">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -887,6 +887,14 @@
|
|||
|
||||
itemsContainer.trigger('playallfromhere', [index]);
|
||||
}
|
||||
else if (action == 'setplaylistindex') {
|
||||
|
||||
index = elemWithAttributes.getAttribute('data-index');
|
||||
|
||||
closeContextMenu();
|
||||
|
||||
MediaController.currentPlaylistIndex(index);
|
||||
}
|
||||
else if (action == 'photoslideshow') {
|
||||
|
||||
if (!$(elem).hasClass('card')) {
|
||||
|
|
|
@ -629,57 +629,36 @@
|
|||
|
||||
var html = '';
|
||||
|
||||
html += '<table class="detailTable">';
|
||||
//ApiClient.getItems(Dashboard.getCurrentUserId(), {
|
||||
|
||||
html += '<thead><tr>';
|
||||
html += '<th></th>';
|
||||
html += '<th>' + Globalize.translate('HeaderName') + '</th>';
|
||||
html += '<th>' + Globalize.translate('HeaderAlbum') + '</th>';
|
||||
html += '<th>' + Globalize.translate('HeaderArtist') + '</th>';
|
||||
html += '<th>' + Globalize.translate('HeaderAlbumArtist') + '</th>';
|
||||
html += '<th>' + Globalize.translate('HeaderTime') + '</th>';
|
||||
html += '</tr></thead>';
|
||||
// SortBy: "SortName",
|
||||
// SortOrder: "Ascending",
|
||||
// IncludeItemTypes: "Audio",
|
||||
// Recursive: true,
|
||||
// Fields: "PrimaryImageAspectRatio,SortName,MediaSourceCount,IsUnidentified,SyncInfo",
|
||||
// StartIndex: 0,
|
||||
// ImageTypeLimit: 1,
|
||||
// EnableImageTypes: "Primary,Backdrop,Banner,Thumb",
|
||||
// Limit: 100
|
||||
|
||||
html += '<tbody>';
|
||||
//}).done(function (result) {
|
||||
|
||||
$.each(MediaController.playlist(), function (i, item) {
|
||||
// html += LibraryBrowser.getListViewHtml({
|
||||
// items: result.Items,
|
||||
// smallIcon: true,
|
||||
// defaultAction: 'setplaylistindex'
|
||||
// });
|
||||
|
||||
var name = LibraryBrowser.getPosterViewDisplayName(item);
|
||||
// $(".playlist", page).html(html).trigger('create').lazyChildren();
|
||||
//});
|
||||
|
||||
var parentName = item.SeriesName || item.Album;
|
||||
|
||||
html += '<tr>';
|
||||
html += '<td><button type="button" data-index="' + i + '" class="lnkPlayFromIndex" data-icon="play" data-iconpos="notext">' + Globalize.translate('ButtonPlay') + '</button></td>';
|
||||
html += '<td>';
|
||||
html += '<a href="itemdetails.html?id=' + item.Id + '">' + name + '</a>';
|
||||
html += '</td>';
|
||||
|
||||
html += '<td>';
|
||||
if (parentName) {
|
||||
var parentId = item.AlbumId || item.SeriesId || item.ParentId;
|
||||
html += '<a href="itemdetails.html?id=' + parentId + '">' + parentName + '</a>';
|
||||
}
|
||||
html += '</td>';
|
||||
|
||||
html += '<td>';
|
||||
html += LibraryBrowser.getArtistLinksHtml(item.ArtistItems || []);
|
||||
html += '</td>';
|
||||
|
||||
html += '<td>';
|
||||
if (item.AlbumArtist) {
|
||||
html += LibraryBrowser.getArtistLinksHtml(item.AlbumArtists || []);
|
||||
}
|
||||
html += '</td>';
|
||||
|
||||
html += '<td>' + Dashboard.getDisplayTime(item.RunTimeTicks) + '</td>';
|
||||
html += '<td><button type="button" data-index="' + i + '" class="lnkRemoveFromIndex" data-icon="delete" data-iconpos="notext">' + Globalize.translate('ButtonRemove') + '</button></td>';
|
||||
html += '</tr>';
|
||||
html += LibraryBrowser.getListViewHtml({
|
||||
items: MediaController.playlist(),
|
||||
smallIcon: true,
|
||||
defaultAction: 'play'
|
||||
});
|
||||
|
||||
html += '</tbody>';
|
||||
html += '</table>';
|
||||
|
||||
$(".playlist", page).html(html).trigger('create');
|
||||
$(".playlist", page).html(html).trigger('create').lazyChildren();
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#nowPlayingPage", function () {
|
||||
|
|
|
@ -1412,7 +1412,9 @@ var Dashboard = {
|
|||
|
||||
})();
|
||||
|
||||
$(function () {
|
||||
(function() {
|
||||
|
||||
function onReady() {
|
||||
|
||||
var videoPlayerHtml = '<div id="mediaPlayer" data-theme="b" class="ui-bar-b" style="display: none;">';
|
||||
|
||||
|
@ -1526,7 +1528,11 @@ $(function () {
|
|||
if (isTouchDevice()) {
|
||||
$(document.body).addClass('touch');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(onReady);
|
||||
|
||||
})();
|
||||
|
||||
Dashboard.jQueryMobileInit();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue