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

update vaapi defaults

This commit is contained in:
Luke Pulverenti 2016-08-24 16:14:35 -04:00
parent cbca3a20ae
commit ee908c0726
6 changed files with 31 additions and 18 deletions

View file

@ -702,7 +702,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
return html;
}
function getCardFooterText(item, options, showTitle, forceName, imgUrl, footerClass, progressHtml, isOuterFooter) {
function getCardFooterText(item, options, showTitle, forceName, overlayText, imgUrl, footerClass, progressHtml, isOuterFooter) {
var html = '';
@ -737,7 +737,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
}
}
if (showTitle) {
if (showTitle || forceName) {
var name = options.showTitle == 'auto' && !item.IsFolder && item.MediaType == 'Photo' ? '' : itemHelper.getDisplayName(item);
@ -869,7 +869,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
}
}
if (showTitle && forceName && lines.length == 1) {
if (showTitle && forceName && overlayText && lines.length == 1) {
lines = [];
}
@ -1022,7 +1022,6 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
var overlayText = options.overlayText;
if (forceName && !options.cardLayout) {
showTitle = imgUrl;
if (overlayText == null) {
overlayText = true;
@ -1061,7 +1060,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
if (overlayText) {
footerCssClass = progressHtml ? 'innerCardFooter fullInnerCardFooter' : 'innerCardFooter';
innerCardFooter += getCardFooterText(item, options, showTitle, forceName, imgUrl, footerCssClass, progressHtml, false);
innerCardFooter += getCardFooterText(item, options, showTitle, forceName, overlayText, imgUrl, footerCssClass, progressHtml, false);
footerOverlayed = true;
}
else if (progressHtml) {
@ -1080,7 +1079,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
var outerCardFooter = '';
if (!overlayText && !footerOverlayed) {
footerCssClass = options.cardLayout ? 'cardFooter visualCardBox-cardFooter' : 'cardFooter transparent';
outerCardFooter = getCardFooterText(item, options, showTitle, forceName, imgUrl, footerCssClass, progressHtml, true);
outerCardFooter = getCardFooterText(item, options, showTitle, forceName, overlayText, imgUrl, footerCssClass, progressHtml, true);
}
if (outerCardFooter && !options.cardLayout && options.allowBottomPadding !== false) {

View file

@ -154,6 +154,13 @@
return html;
}
function onCardOverlayButtonsClick(e) {
var button = dom.parentWithTag(e.target, 'BUTTON');
if (button) {
e.stopPropagation();
}
}
function onShowTimerExpired(elem) {
@ -164,6 +171,10 @@
innerElem.classList.add('hide');
innerElem.classList.add('cardOverlayTarget');
// allow the overlay to be clicked to view the item
innerElem.classList.add('itemAction');
innerElem.setAttribute('data-action', 'link');
var appendTo = elem.querySelector('div.cardContent') || elem.querySelector('.cardScalable') || elem.querySelector('.cardBox');
//if (appendTo && appendTo.tagName == 'BUTTON') {
@ -203,6 +214,8 @@
var user = responses[1];
innerElem.innerHTML = getOverlayHtml(apiClient, item, user, dataElement);
innerElem.querySelector('.cardOverlayButtons').addEventListener('click', onCardOverlayButtonsClick);
});
slideUpToShow(innerElem);