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>
|
||||||
<div class="tabPlaylist tabContent" style="display: none;">
|
<div class="tabPlaylist tabContent" style="display: none;">
|
||||||
|
|
||||||
<div class="readOnlyContent" style="margin: 0 auto; padding: 0 1em;">
|
<div class="playlist itemsContainer" style="max-width:800px;margin: 0 auto;">
|
||||||
|
|
||||||
<div class="playlist detailTableContainer">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -887,6 +887,14 @@
|
||||||
|
|
||||||
itemsContainer.trigger('playallfromhere', [index]);
|
itemsContainer.trigger('playallfromhere', [index]);
|
||||||
}
|
}
|
||||||
|
else if (action == 'setplaylistindex') {
|
||||||
|
|
||||||
|
index = elemWithAttributes.getAttribute('data-index');
|
||||||
|
|
||||||
|
closeContextMenu();
|
||||||
|
|
||||||
|
MediaController.currentPlaylistIndex(index);
|
||||||
|
}
|
||||||
else if (action == 'photoslideshow') {
|
else if (action == 'photoslideshow') {
|
||||||
|
|
||||||
if (!$(elem).hasClass('card')) {
|
if (!$(elem).hasClass('card')) {
|
||||||
|
|
|
@ -629,57 +629,36 @@
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
html += '<table class="detailTable">';
|
//ApiClient.getItems(Dashboard.getCurrentUserId(), {
|
||||||
|
|
||||||
html += '<thead><tr>';
|
// SortBy: "SortName",
|
||||||
html += '<th></th>';
|
// SortOrder: "Ascending",
|
||||||
html += '<th>' + Globalize.translate('HeaderName') + '</th>';
|
// IncludeItemTypes: "Audio",
|
||||||
html += '<th>' + Globalize.translate('HeaderAlbum') + '</th>';
|
// Recursive: true,
|
||||||
html += '<th>' + Globalize.translate('HeaderArtist') + '</th>';
|
// Fields: "PrimaryImageAspectRatio,SortName,MediaSourceCount,IsUnidentified,SyncInfo",
|
||||||
html += '<th>' + Globalize.translate('HeaderAlbumArtist') + '</th>';
|
// StartIndex: 0,
|
||||||
html += '<th>' + Globalize.translate('HeaderTime') + '</th>';
|
// ImageTypeLimit: 1,
|
||||||
html += '</tr></thead>';
|
// 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 += LibraryBrowser.getListViewHtml({
|
||||||
|
items: MediaController.playlist(),
|
||||||
html += '<tr>';
|
smallIcon: true,
|
||||||
html += '<td><button type="button" data-index="' + i + '" class="lnkPlayFromIndex" data-icon="play" data-iconpos="notext">' + Globalize.translate('ButtonPlay') + '</button></td>';
|
defaultAction: 'play'
|
||||||
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 += '</tbody>';
|
$(".playlist", page).html(html).trigger('create').lazyChildren();
|
||||||
html += '</table>';
|
|
||||||
|
|
||||||
$(".playlist", page).html(html).trigger('create');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('pageinit', "#nowPlayingPage", function () {
|
$(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;">';
|
var videoPlayerHtml = '<div id="mediaPlayer" data-theme="b" class="ui-bar-b" style="display: none;">';
|
||||||
|
|
||||||
|
@ -1526,7 +1528,11 @@ $(function () {
|
||||||
if (isTouchDevice()) {
|
if (isTouchDevice()) {
|
||||||
$(document.body).addClass('touch');
|
$(document.body).addClass('touch');
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
|
$(onReady);
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
||||||
Dashboard.jQueryMobileInit();
|
Dashboard.jQueryMobileInit();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue