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

update shared components

This commit is contained in:
Luke Pulverenti 2016-07-31 00:11:23 -04:00
parent ce0fd77a63
commit 41eeda7bab
11 changed files with 108 additions and 277 deletions

View file

@ -1,4 +1,4 @@
define(['datetime', 'imageLoader', 'itemShortcuts', 'connectionManager'], function (datetime, imageLoader, itemShortcuts, connectionManager) {
define(['datetime', 'imageLoader', 'connectionManager'], function (datetime, imageLoader, connectionManager) {
function buildChapterCardsHtml(item, chapters, options) {
@ -9,12 +9,12 @@ define(['datetime', 'imageLoader', 'itemShortcuts', 'connectionManager'], functi
return i.Type == 'Video';
})[0] || {};
var shape = 'backdropCard';
var shape = (options.backdropShape || 'backdrop') + 'Card';
if (videoStream.Width && videoStream.Height) {
if ((videoStream.Width / videoStream.Height) <= 1.34) {
shape = 'squareCard';
shape = (options.squareShape || 'square') + 'Card';
}
}
@ -121,9 +121,6 @@ define(['datetime', 'imageLoader', 'itemShortcuts', 'connectionManager'], functi
options.itemsContainer.innerHTML = html;
imageLoader.lazyChildren(options.itemsContainer);
itemShortcuts.off(options.itemsContainer);
itemShortcuts.on(options.itemsContainer);
}
return {