1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

moved render gallery code to LibraryBrowser

This commit is contained in:
Techywarrior 2013-04-15 17:45:08 -07:00
parent 71a0792f0e
commit 0f1bb2b8be
4 changed files with 52 additions and 118 deletions

View file

@ -979,6 +979,55 @@
return html;
},
renderGallery: function (imageTags) {
var html;
var i, length;
if (imageTags.Logo) {
html += LibraryBrowser.createGalleryImage(item.Id, "Logo", item.ImageTags.Logo);
}
if (imageTags.Thumb) {
html += LibraryBrowser.createGalleryImage(item.Id, "Thumb", item.ImageTags.Thumb);
}
if (imageTags.Art) {
html += LibraryBrowser.createGalleryImage(item.Id, "Art", item.ImageTags.Art);
}
if (imageTags.Menu) {
html += LibraryBrowser.createGalleryImage(item.Id, "Menu", item.ImageTags.Menu);
}
if (imageTags.Disc) {
html += LibraryBrowser.createGalleryImage(item.Id, "Disc", item.ImageTags.Disc);
}
if (imageTags.Box) {
html += LibraryBrowser.createGalleryImage(item.Id, "Box", item.ImageTags.Box);
}
if (item.BackdropImageTags) {
for (i = 0, length = item.BackdropImageTags.length; i < length; i++) {
html += LibraryBrowser.createGalleryImage(item.Id, "Backdrop", item.BackdropImageTags[0], i);
}
}
if (item.ScreenshotImageTags) {
for (i = 0, length = item.ScreenshotImageTags.length; i < length; i++) {
html += LibraryBrowser.createGalleryImage(item.Id, "Screenshot", item.ScreenshotImageTags[0], i);
}
}
return html;
},
createGalleryImage: function (itemId, type, tag, index) {
var downloadWidth = 400;