continue card unification

This commit is contained in:
Luke Pulverenti 2016-07-30 00:53:19 -04:00
parent d0100ecb29
commit ebe4dc0ca5
4 changed files with 11 additions and 13 deletions

View File

@ -24,7 +24,7 @@
}
.verticalItemsContainer .card {
contain: layout style;
contain: strict;
}
.card, .card:focus {
@ -280,10 +280,6 @@ button.cardContent {
transition: background-color .5s ease-out;
}
.emptyCardImageContainer {
font-size: 90%;
}
.defaultCardColor1 {
background-color: #009688;
}

View File

@ -977,7 +977,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
}
if (!imgUrl) {
cardImageContainerClass += ' emptyCardImageContainer defaultCardColor' + getRandomInt(1, 5);
cardImageContainerClass += ' defaultCardColor' + getRandomInt(1, 5);
}
var separateCardBox = scalable;

View File

@ -1,4 +1,4 @@
define(['libraryBrowser', 'scrollStyles', 'emby-itemscontainer'], function (libraryBrowser) {
define(['libraryBrowser', 'cardBuilder', 'scrollStyles', 'emby-itemscontainer'], function (libraryBrowser, cardBuilder) {
function itemsPerRow() {
@ -34,7 +34,7 @@
ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).then(function (items) {
var elem = page.querySelector('#recentlyAddedSongs');
elem.innerHTML = libraryBrowser.getPosterViewHtml({
elem.innerHTML = cardBuilder.getCardsHtml({
items: items,
showUnplayedIndicator: false,
showLatestItemsPopup: false,
@ -80,7 +80,7 @@
}
var itemsContainer = elem.querySelector('.itemsContainer');
itemsContainer.innerHTML = libraryBrowser.getPosterViewHtml({
itemsContainer.innerHTML = cardBuilder.getCardsHtml({
items: result.Items,
showUnplayedIndicator: false,
shape: getSquareShape(),
@ -126,7 +126,7 @@
}
var itemsContainer = elem.querySelector('.itemsContainer');
itemsContainer.innerHTML = libraryBrowser.getPosterViewHtml({
itemsContainer.innerHTML = cardBuilder.getCardsHtml({
items: result.Items,
showUnplayedIndicator: false,
shape: getSquareShape(),
@ -169,7 +169,7 @@
}
var itemsContainer = elem.querySelector('.itemsContainer');
itemsContainer.innerHTML = libraryBrowser.getPosterViewHtml({
itemsContainer.innerHTML = cardBuilder.getCardsHtml({
items: result.Items,
shape: getSquareShape(),
showTitle: true,
@ -255,8 +255,10 @@
for (var i = 0, length = containers.length; i < length; i++) {
if (enableScrollX()) {
containers[i].classList.add('hiddenScrollX');
containers[i].classList.remove('verticalItemsContainer');
} else {
containers[i].classList.remove('hiddenScrollX');
containers[i].classList.add('verticalItemsContainer');
}
}
};

View File

@ -1,4 +1,4 @@
define(['libraryBrowser', 'focusManager', 'embyRouter', 'emby-input', 'paper-icon-button-light', 'material-icons', 'emby-itemscontainer'], function (libraryBrowser, focusManager, embyRouter) {
define(['libraryBrowser', 'focusManager', 'embyRouter', 'cardBuilder', 'emby-input', 'paper-icon-button-light', 'material-icons', 'emby-itemscontainer'], function (libraryBrowser, focusManager, embyRouter, cardBuilder) {
function loadSuggestions(page) {
@ -112,7 +112,7 @@
return i;
});
var html = libraryBrowser.getPosterViewHtml({
var html = cardBuilder.getCardsHtml({
items: hints,
shape: "auto",
lazy: true,