mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added cast and gallery to tv series page, moved html generation for cast and gallery to libraryBrowser
This commit is contained in:
parent
d87dd85f1f
commit
99ad771039
4 changed files with 202 additions and 109 deletions
|
@ -90,35 +90,35 @@
|
|||
|
||||
if (imageTags.Logo) {
|
||||
|
||||
html += createGalleryImage(item.Id, "Logo", item.ImageTags.Logo);
|
||||
html += LibraryBrowser.createGalleryImage(item.Id, "Logo", item.ImageTags.Logo);
|
||||
}
|
||||
if (imageTags.Thumb) {
|
||||
|
||||
html += createGalleryImage(item.Id, "Thumb", item.ImageTags.Thumb);
|
||||
html += LibraryBrowser.createGalleryImage(item.Id, "Thumb", item.ImageTags.Thumb);
|
||||
}
|
||||
if (imageTags.Art) {
|
||||
|
||||
html += createGalleryImage(item.Id, "Art", item.ImageTags.Art);
|
||||
html += LibraryBrowser.createGalleryImage(item.Id, "Art", item.ImageTags.Art);
|
||||
|
||||
}
|
||||
if (imageTags.Menu) {
|
||||
|
||||
html += createGalleryImage(item.Id, "Menu", item.ImageTags.Menu);
|
||||
html += LibraryBrowser.createGalleryImage(item.Id, "Menu", item.ImageTags.Menu);
|
||||
|
||||
}
|
||||
if (imageTags.Disc) {
|
||||
|
||||
html += createGalleryImage(item.Id, "Disc", item.ImageTags.Disc);
|
||||
html += LibraryBrowser.createGalleryImage(item.Id, "Disc", item.ImageTags.Disc);
|
||||
}
|
||||
if (imageTags.Box) {
|
||||
|
||||
html += createGalleryImage(item.Id, "Box", item.ImageTags.Box);
|
||||
html += LibraryBrowser.createGalleryImage(item.Id, "Box", item.ImageTags.Box);
|
||||
}
|
||||
|
||||
if (item.BackdropImageTags) {
|
||||
|
||||
for (var i = 0, length = item.BackdropImageTags.length; i < length; i++) {
|
||||
html += createGalleryImage(item.Id, "Backdrop", item.BackdropImageTags[0], i);
|
||||
html += LibraryBrowser.createGalleryImage(item.Id, "Backdrop", item.BackdropImageTags[0], i);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -126,37 +126,6 @@
|
|||
$('#galleryContent', page).html(html).trigger('create');
|
||||
}
|
||||
|
||||
function createGalleryImage(itemId, type, tag, index) {
|
||||
|
||||
var downloadWidth = 400;
|
||||
var lightboxWidth = 800;
|
||||
var html = '';
|
||||
|
||||
if (typeof (index) == "undefined") index = 0;
|
||||
|
||||
html += '<div class="posterViewItem" style="padding-bottom:0px;">';
|
||||
html += '<a href="#pop_' + index + '_' + tag + '" data-transition="fade" data-rel="popup" data-position-to="window">';
|
||||
html += '<img class="galleryImage" src="' + ApiClient.getImageUrl(itemId, {
|
||||
type: type,
|
||||
maxwidth: downloadWidth,
|
||||
tag: tag,
|
||||
index: index
|
||||
}) + '" />';
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="galleryPopup" id="pop_' + index + '_' + tag + '" data-role="popup" data-theme="d" data-corners="false" data-overlay-theme="a">';
|
||||
html += '<a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a>';
|
||||
html += '<img class="" src="' + ApiClient.getImageUrl(itemId, {
|
||||
type: type,
|
||||
maxwidth: lightboxWidth,
|
||||
tag: tag,
|
||||
index: index
|
||||
}) + '" />';
|
||||
html += '</div>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function renderTrailers(page, item) {
|
||||
var html = '';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue