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

update latest items

This commit is contained in:
Luke Pulverenti 2016-11-05 15:34:03 -04:00
parent 30ad844e37
commit 3c571f5ded
8 changed files with 40 additions and 49 deletions

View file

@ -689,7 +689,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
return 'defaultCardColor' + getDefaultColorIndex(str);
}
function getCardTextLines(lines, cssClass, forceLines, isOuterFooter, cardLayout, addRightMargin) {
function getCardTextLines(lines, cssClass, forceLines, isOuterFooter, cardLayout, addRightMargin, maxLines) {
var html = '';
@ -714,10 +714,17 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
html += text;
html += "</div>";
valid++;
if (maxLines && valid >= maxLines) {
break;
}
}
}
if (forceLines) {
length = Math.min(lines.length, maxLines || lines.length);
while (valid < length) {
html += "<div class='" + cssClass + "'>&nbsp;</div>";
valid++;
@ -985,7 +992,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
lines = [];
}
html += getCardTextLines(lines, cssClass, !options.overlayText, isOuterFooter, options.cardLayout, isOuterFooter && options.cardLayout && !options.centerText);
html += getCardTextLines(lines, cssClass, !options.overlayText, isOuterFooter, options.cardLayout, isOuterFooter && options.cardLayout && !options.centerText, options.lines);
if (progressHtml) {
html += progressHtml;