diff --git a/dashboard-ui/itemlist.html b/dashboard-ui/itemlist.html index 8de80b131b..698b355e08 100644 --- a/dashboard-ui/itemlist.html +++ b/dashboard-ui/itemlist.html @@ -10,6 +10,6 @@ -
+ \ No newline at end of file diff --git a/dashboard-ui/scripts/itembynamedetailpage.js b/dashboard-ui/scripts/itembynamedetailpage.js index caca00fff8..97b9d6afff 100644 --- a/dashboard-ui/scripts/itembynamedetailpage.js +++ b/dashboard-ui/scripts/itembynamedetailpage.js @@ -109,7 +109,7 @@ ArtistIds: "", Limit: 10 }, { - shape: "detailPagePortrait", + shape: "portrait", showTitle: true, centerText: true, overlayMoreButton: true @@ -124,7 +124,7 @@ ArtistIds: "", Limit: 10 }, { - shape: "detailPagePortrait", + shape: "portrait", showTitle: true, centerText: true, overlayPlayButton: true @@ -139,7 +139,7 @@ ArtistIds: "", Limit: 10 }, { - shape: "detailPagePortrait", + shape: "portrait", showTitle: true, centerText: true, overlayMoreButton: true @@ -154,7 +154,7 @@ ArtistIds: "", Limit: 10 }, { - shape: "detailPagePortrait", + shape: "portrait", showTitle: true, centerText: true, overlayPlayButton: true @@ -169,7 +169,7 @@ ArtistIds: "", Limit: 10 }, { - shape: "detailPagePortrait", + shape: "portrait", showTitle: true, centerText: true, overlayMoreButton: true @@ -184,7 +184,7 @@ ArtistIds: "", Limit: 8 }, { - shape: "detailPageSquare", + shape: "square", playFromHere: true, showTitle: true, showParentTitle: true, @@ -201,7 +201,7 @@ ArtistIds: "", Limit: 6 }, { - shape: "detailPage169", + shape: "backdrop", showTitle: true, showParentTitle: true, centerText: true, diff --git a/dashboard-ui/scripts/itemlistpage.js b/dashboard-ui/scripts/itemlistpage.js index 0aa01c942e..765c458155 100644 --- a/dashboard-ui/scripts/itemlistpage.js +++ b/dashboard-ui/scripts/itemlistpage.js @@ -1,4 +1,4 @@ -define(['libraryBrowser', 'alphaPicker', 'listView', 'emby-itemscontainer'], function (libraryBrowser, alphaPicker, listView) { +define(['libraryBrowser', 'alphaPicker', 'listView', 'cardBuilder', 'emby-itemscontainer'], function (libraryBrowser, alphaPicker, listView, cardBuilder) { return function (view, params) { @@ -45,6 +45,25 @@ return view.savedQueryKey; } + function onViewStyleChange() { + + var viewStyle = getPageData(view).view; + + var itemsContainer = view.querySelector('#items'); + + if (viewStyle == "List") { + + itemsContainer.classList.add('vertical-list'); + itemsContainer.classList.remove('vertical-wrap'); + } + else { + + itemsContainer.classList.remove('vertical-list'); + itemsContainer.classList.add('vertical-wrap'); + } + itemsContainer.innerHTML = ''; + } + function reloadItems() { Dashboard.showLoadingMsg(); @@ -101,7 +120,7 @@ posterOptions.showTitle = true; posterOptions.preferBackdrop = true; - html = libraryBrowser.getPosterViewHtml(posterOptions); + html = cardBuilder.getCardsHtml(posterOptions); } else if (viewStyle == "PosterCard") { @@ -110,7 +129,7 @@ posterOptions.cardLayout = true; posterOptions.centerText = false; - html = libraryBrowser.getPosterViewHtml(posterOptions); + html = cardBuilder.getCardsHtml(posterOptions); } else if (viewStyle == "List") { @@ -123,14 +142,14 @@ posterOptions.preferThumb = true; posterOptions.shape = "backdrop"; - html = libraryBrowser.getPosterViewHtml(posterOptions); + html = cardBuilder.getCardsHtml(posterOptions); } else { // Poster posterOptions.showTitle = context == 'photos' ? 'auto' : true; posterOptions.overlayText = context == 'photos'; - html = libraryBrowser.getPosterViewHtml(posterOptions); + html = cardBuilder.getCardsHtml(posterOptions); } if (currentItem.CollectionType == 'boxsets') { @@ -273,9 +292,12 @@ var layout = e.detail.viewStyle; getPageData().view = layout; libraryBrowser.saveViewSetting(getSavedQueryKey(), layout); + onViewStyleChange(); reloadItems(view); }); + onViewStyleChange(); + view.querySelector('.btnFilter').addEventListener('click', function () { showFilterMenu(); });