From dd808d82987dc7974fe353750d2bad6cfe906045 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 22 Apr 2013 10:44:11 -0400 Subject: [PATCH] better detail page context --- dashboard-ui/boxset.html | 60 -------- dashboard-ui/css/librarybrowser.css | 21 ++- dashboard-ui/css/site.css | 19 +-- dashboard-ui/itemdetails.html | 189 +++++++++++++++++-------- dashboard-ui/scripts/Itemdetailpage.js | 180 ++++++++++++++--------- dashboard-ui/scripts/boxset.js | 121 ---------------- dashboard-ui/scripts/librarybrowser.js | 14 +- dashboard-ui/scripts/site.js | 39 +++-- dashboard-ui/scripts/tvseason.js | 153 -------------------- dashboard-ui/scripts/tvseries.js | 172 ---------------------- dashboard-ui/tvseason.html | 66 --------- dashboard-ui/tvseries.html | 66 --------- 12 files changed, 302 insertions(+), 798 deletions(-) delete mode 100644 dashboard-ui/boxset.html delete mode 100644 dashboard-ui/scripts/boxset.js delete mode 100644 dashboard-ui/scripts/tvseason.js delete mode 100644 dashboard-ui/scripts/tvseries.js delete mode 100644 dashboard-ui/tvseason.html delete mode 100644 dashboard-ui/tvseries.html diff --git a/dashboard-ui/boxset.html b/dashboard-ui/boxset.html deleted file mode 100644 index 15577c7089..0000000000 --- a/dashboard-ui/boxset.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - -
-

- Movies

-
- - - -
-
-
-
-
-
- -
- -

-

-

-

-

-

- -

-

- -
-
- -
-

Titles

-
-
-
-

Trailers

-
-
-
-

Gallery

-
-
- -
-
- - diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index f8161c516e..4e104c99a3 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -89,6 +89,11 @@ /*.libraryPage:not(.folderListPage) > .ui-content, .libraryPage:not(.folderListPage) > .ui-panel-content-wrap { margin-top: -35px!important; }*/ + + .detailPageContent { + width: 90%; + margin: 0 auto; + } } @media all and (min-width: 1200px) { @@ -106,6 +111,10 @@ .ehsContent { max-width: 900px; } + + .detailPageContent { + width: 70%; + } } @media all and (min-width: 1920px) { @@ -148,12 +157,12 @@ border-bottom: 1px solid #555; padding-bottom: 5px; margin-bottom: .5em; - font-weight: bold; } .mediaInfoDetails { - margin: 0 0 0 2em; + margin: 0 0 0 1.5em; padding: 0; + list-style-type: circle; } .mediaInfoLabel { @@ -237,6 +246,10 @@ margin: 1em 0 1.5em; } +.scenePosterViewItem img { + max-width: 150px!important; +} + @media all and (min-width: 650px) { .detailPagePrimaryInfo { padding: 0 10px; @@ -278,6 +291,10 @@ .posterDetailViewItem { width: 31%; } + + .scenePosterViewItem img { + max-width: 200px!important; + } } @media all and (min-width: 1440px) { diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index a62c2a19f4..dcbc651d2e 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -660,7 +660,6 @@ progress { .itemDetailImage { max-width: 100%; - max-height: 300px; } .itemImageBlock { @@ -712,8 +711,8 @@ progress { display: inline-block; } - .itemDetailImage, .itemImageBlock { - max-width: 220px; + .itemDetailImage { + width: 220px; } .itemDetailBlock { @@ -731,11 +730,7 @@ progress { @media all and (min-width: 750px) { .itemDetailImage { - max-height: 400px; - } - - .itemDetailImage, .itemImageBlock { - max-width: 300px; + width: 300px; } .itemDetailBlock { @@ -753,10 +748,6 @@ progress { @media all and (min-width: 1200px) { - .itemDetailBlock { - width: 70%; - } - .galleryImage { width: 200px; } @@ -764,8 +755,8 @@ progress { @media all and (min-width: 1440px) { - .itemDetailImage, .itemImageBlock { - max-width: 400px; + .itemDetailImage { + width: 400px; } .itemDetailBlock { diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html index faee8628c3..3f65184dba 100644 --- a/dashboard-ui/itemdetails.html +++ b/dashboard-ui/itemdetails.html @@ -4,71 +4,146 @@ -
+
+
+ +
+

+

+ + + + + +
+
+
+
+
-
-
-
-
+ + - - + +
+
+
-
-
-
+
+ +

+

+ +

+

+

+

+

+ +

+

+

+

+

+ +
- -
- -

-

- -

-

-

-

-

- -

-

-

-

-

- +
+
+

+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
-
- -
-

Media Info

-
-
-
-

Scenes

-
-
-
-

Special Features

-
-
-
-

Trailers

-
-
-
-

Cast & Crew

-
-
-
-

Gallery

-
diff --git a/dashboard-ui/scripts/Itemdetailpage.js b/dashboard-ui/scripts/Itemdetailpage.js index abbc3e67f1..7b59116ff1 100644 --- a/dashboard-ui/scripts/Itemdetailpage.js +++ b/dashboard-ui/scripts/Itemdetailpage.js @@ -12,6 +12,8 @@ currentItem = item; + renderHeader(page, item); + var name = item.Name; if (item.IndexNumber != null) { @@ -29,11 +31,11 @@ if (item.SeriesName) { - $('#seriesName', page).html('' + item.SeriesName + '').show().trigger('create'); + $('#seriesName', page).html('' + item.SeriesName + '').show().trigger('create'); } else if (item.Album) { $('#seriesName', page).html(item.Album).show(); - + } else { $('#seriesName', page).hide(); } @@ -45,51 +47,117 @@ $('#btnPlayMenu', page).show(); $('#playButtonShadow', page).show(); if (MediaPlayer.isPlaying()) - $('#btnQueueMenu', page).show(); - else - $('#btnQueueMenu', page).hide(); + $('#btnQueueMenu', page).show(); + else + $('#btnQueueMenu', page).hide(); } else { $('#btnPlayMenu', page).hide(); $('#playButtonShadow', page).hide(); $('#btnQueueMenu', page).hide(); } - if (LibraryBrowser.shouldDisplayGallery(item)) { - $('#galleryCollapsible', page).show(); - } else { - $('#galleryCollapsible', page).hide(); - } - Dashboard.hideLoadingMsg(); }); } + function enableCustomHeader(page, text) { + var elem = $('.libraryPageHeader', page).show(); + + $('span', elem).html(text); + } + + function renderHeader(page, item) { + + if (item.Type == "Movie" || item.Type == "Trailer" || item.Type == "BoxSet") { + enableCustomHeader(page, "Movies"); + $('#standardLogo', page).hide(); + } + else if (item.Type == "Episode" || item.Type == "Season" || item.Type == "Series") { + enableCustomHeader(page, "TV Shows"); + $('#standardLogo', page).hide(); + } + else if (item.Type == "Audio") { + enableCustomHeader(page, "Music"); + $('#standardLogo', page).hide(); + } + else { + $('.libraryPageHeader', page).hide(); + $('#standardLogo', page).show(); + } + + if (item.Type == "Audio") { + $('#songTabs', page).show(); + } else { + $('#songTabs', page).hide(); + } + + if (item.Type == "Movie") { + $('#movieTabs', page).show(); + } else { + $('#movieTabs', page).hide(); + } + + if (item.Type == "BoxSet") { + $('#boxsetTabs', page).show(); + } else { + $('#boxsetTabs', page).hide(); + } + if (item.Type == "Trailer") { + $('#trailerTabs', page).show(); + } else { + $('#trailerTabs', page).hide(); + } + if (item.Type == "Episode" || item.Type == "Season" || item.Type == "Series") { + $('#tvShowsTabs', page).show(); + } else { + $('#tvShowsTabs', page).hide(); + } + } + function setInitialCollapsibleState(page, item) { + if (item.ChildCount) { + $('#childrenCollapsible', page).show(); + renderChildren(page, item); + } else { + $('#childrenCollapsible', page).hide(); + } + if (LibraryBrowser.shouldDisplayGallery(item)) { + $('#galleryCollapsible', page).show(); + renderGallery(page, item); + } else { + $('#galleryCollapsible', page).hide(); + } + if (!item.MediaStreams || !item.MediaStreams.length) { $('#mediaInfoCollapsible', page).hide(); } else { $('#mediaInfoCollapsible', page).show(); + renderMediaInfo(page, item); } if (!item.Chapters || !item.Chapters.length) { $('#scenesCollapsible', page).hide(); } else { $('#scenesCollapsible', page).show(); + renderScenes(page, item); } if (!item.LocalTrailerCount || item.LocalTrailerCount == 0) { $('#trailersCollapsible', page).hide(); } else { $('#trailersCollapsible', page).show(); + renderTrailers(page, item); } if (!item.SpecialFeatureCount || item.SpecialFeatureCount == 0) { $('#specialsCollapsible', page).hide(); } else { $('#specialsCollapsible', page).show(); + renderSpecials(page, item); } if (!item.People || !item.People.length) { $('#castCollapsible', page).hide(); } else { $('#castCollapsible', page).show(); + renderCast(page, item); } } @@ -121,6 +189,37 @@ LibraryBrowser.renderLinks($('#itemLinks', page), item); } + function renderChildren(page, item) { + + ApiClient.getItems(Dashboard.getCurrentUserId(), { + + ParentId: getParameterByName('id'), + SortBy: "SortName", + Fields: "PrimaryImageAspectRatio,ItemCounts,DisplayMediaType,DateCreated,UserData" + + }).done(function (result) { + + var html = LibraryBrowser.getPosterDetailViewHtml({ + items: result.Items, + useAverageAspectRatio: true + }); + + $('#childrenContent', page).html(html); + }); + + if (item.Type == "Season") { + $('#childrenTitle', page).html('Episodes (' + item.ChildCount + ')'); + } + else if (item.Type == "Series") { + $('#childrenTitle', page).html('Seasons (' + item.ChildCount + ')'); + } + else if (item.Type == "BoxSet") { + $('#childrenTitle', page).html('Movies (' + item.ChildCount + ')'); + } + else { + $('#childrenTitle', page).html('Items (' + item.ChildCount + ')'); + } + } function renderUserDataIcons(page, item) { $('#itemRatings', page).html(LibraryBrowser.getUserDataIconsHtml(item)); } @@ -135,13 +234,13 @@ var chapter = chapters[i]; var chapterName = chapter.Name || "Chapter " + i; - html += '
'; + html += '
'; html += ''; if (chapter.ImageTag) { var imgUrl = ApiClient.getImageUrl(item.Id, { - width: 500, + width: 400, tag: chapter.ImageTag, type: "Chapter", index: i @@ -259,8 +358,6 @@ } $('#mediaInfoContent', page).html(html).trigger('create'); - - $('#mediaInfoCollapsible', page).show(); } function renderSpecials(page, item) { @@ -366,9 +463,9 @@ for (var i = 0, length = casts.length; i < length; i++) { - var cast = casts[i]; + var cast = casts[i]; - html += LibraryBrowser.createCastImage(cast); + html += LibraryBrowser.createCastImage(cast); } $('#castContent', page).html(html); @@ -439,58 +536,9 @@ reload(page); - $('#mediaInfoCollapsible', page).on('expand.lazyload', function () { - renderMediaInfo(page, currentItem); - - $(this).off('expand.lazyload'); - }); - - $('#scenesCollapsible', page).on('expand.lazyload', function () { - - if (currentItem) { - - renderScenes(page, currentItem); - - $(this).off('expand.lazyload'); - } - }); - - $('#specialsCollapsible', page).on('expand.lazyload', function () { - renderSpecials(page, currentItem); - - $(this).off('expand.lazyload'); - }); - - $('#trailersCollapsible', page).on('expand.lazyload', function () { - renderTrailers(page, currentItem); - - $(this).off('expand.lazyload'); - }); - - $('#castCollapsible', page).on('expand.lazyload', function () { - renderCast(page, currentItem); - - $(this).off('expand.lazyload'); - }); - - $('#galleryCollapsible', page).on('expand.lazyload', function () { - - renderGallery(page, currentItem); - - $(this).off('expand.lazyload'); - }); - }).on('pagehide', "#itemDetailPage", function () { currentItem = null; - var page = this; - - $('#mediaInfoCollapsible', page).off('expand.lazyload'); - $('#scenesCollapsible', page).off('expand.lazyload'); - $('#specialsCollapsible', page).off('expand.lazyload'); - $('#trailersCollapsible', page).off('expand.lazyload'); - $('#castCollapsible', page).off('expand.lazyload'); - $('#galleryCollapsible', page).off('expand.lazyload'); }); function itemDetailPage() { diff --git a/dashboard-ui/scripts/boxset.js b/dashboard-ui/scripts/boxset.js deleted file mode 100644 index c7ed88f3ea..0000000000 --- a/dashboard-ui/scripts/boxset.js +++ /dev/null @@ -1,121 +0,0 @@ -(function ($, document, LibraryBrowser) { - - var currentItem; - - function reload(page) { - - var id = getParameterByName('id'); - - Dashboard.showLoadingMsg(); - - ApiClient.getItem(Dashboard.getCurrentUserId(), id).done(function (item) { - - currentItem = item; - - var name = item.Name; - - $('#itemImage', page).html(LibraryBrowser.getDetailImageHtml(item)); - - Dashboard.setPageTitle(name); - - $('#itemName', page).html(name); - - renderDetails(page, item); - - if (LibraryBrowser.shouldDisplayGallery(item)) { - $('#galleryCollapsible', page).show(); - } else { - $('#galleryCollapsible', page).hide(); - } - - $('#moviesCollapsible .collapsibleTitle', page).html('Titles (' + item.ChildCount + ')'); - - Dashboard.hideLoadingMsg(); - }); - } - - function renderDetails(page, item) { - - if (item.Taglines && item.Taglines.length) { - $('#itemTagline', page).html(item.Taglines[0]).show(); - } else { - $('#itemTagline', page).hide(); - } - - LibraryBrowser.renderOverview($('#itemOverview', page), item); - - if (item.CommunityRating) { - $('#itemCommunityRating', page).html(LibraryBrowser.getStarRatingHtml(item)).show().attr('title', item.CommunityRating); - } else { - $('#itemCommunityRating', page).hide(); - } - - $('#itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(item)); - - LibraryBrowser.renderGenres($('#itemGenres', page), item); - LibraryBrowser.renderStudios($('#itemStudios', page), item); - renderUserDataIcons(page, item); - LibraryBrowser.renderLinks($('#itemLinks', page), item); - } - - function renderUserDataIcons(page, item) { - $('#itemRatings', page).html(LibraryBrowser.getUserDataIconsHtml(item)); - } - - function renderMovies(page) { - - ApiClient.getItems(Dashboard.getCurrentUserId(), { - - ParentId: getParameterByName('id'), - SortBy: "SortName", - Fields: "PrimaryImageAspectRatio,ItemCounts,DisplayMediaType,DateCreated,UserData" - - }).done(function (result) { - - var html = LibraryBrowser.getPosterDetailViewHtml({ - items: result.Items, - useAverageAspectRatio: true - }); - - - $('#moviesContent', page).html(html); - }); - } - - function renderGallery(page, item) { - - var html = LibraryBrowser.getGalleryHtml(item); - - $('#galleryContent', page).html(html).trigger('create'); - } - - $(document).on('pageshow', "#boxsetPage", function () { - - var page = this; - - reload(page); - - $('#moviesCollapsible', page).on('expand.lazyload', function () { - - renderMovies(page); - - $(this).off('expand.lazyload'); - }); - - $('#galleryCollapsible', page).on('expand.lazyload', function () { - - renderGallery(page, currentItem); - - $(this).off('expand.lazyload'); - }); - - }).on('pagehide', "#boxsetPage", function () { - - var page = this; - - $('#moviesCollapsible', page).off('expand.lazyload'); - $('#galleryCollapsible', page).off('expand.lazyload'); - }); - - -})(jQuery, document, LibraryBrowser); \ No newline at end of file diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index ab497ba537..60d02440e9 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -159,13 +159,13 @@ } if (item.Type == "Series") { - return "tvseries.html?id=" + item.Id; + return "itemdetails.html?id=" + item.Id; } if (item.Type == "Season") { - return "tvseason.html?id=" + item.Id; + return "itemdetails.html?id=" + item.Id; } if (item.Type == "BoxSet") { - return "boxset.html?id=" + item.Id; + return "itemdetails.html?id=" + item.Id; } if (item.Type == "Genre") { return "itembynamedetails.html?genre=" + item.Name; @@ -1246,10 +1246,6 @@ html += LibraryBrowser.createGalleryImage(item.Id, "Menu", imageTags.Menu); } - if (imageTags.Disc) { - - html += LibraryBrowser.createGalleryImage(item.Id, "Disc", imageTags.Disc); - } if (imageTags.Box) { html += LibraryBrowser.createGalleryImage(item.Id, "Box", imageTags.Box); @@ -1269,6 +1265,10 @@ html += LibraryBrowser.createGalleryImage(item.Id, "Screenshot", item.ScreenshotImageTags[i], i); } } + if (imageTags.Disc) { + + html += LibraryBrowser.createGalleryImage(item.Id, "Disc", imageTags.Disc); + } return html; }, diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 693c7bf922..8d68b216e8 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -632,7 +632,7 @@ var Dashboard = { ensureHeader: function (page) { - if (!$('.header', page).length) { + if (!$('.headerButtons', page).length) { var isLoggedIn = Dashboard.getCurrentUserId(); @@ -652,28 +652,39 @@ var Dashboard = { renderHeader: function (page, user) { var headerHtml = ''; - headerHtml += '
'; var isLibraryPage = page.hasClass('libraryPage'); - if (!page.hasClass('noLogoPage')) { - headerHtml += ''; + page.prepend(headerHtml); - headerHtml += ''; - } - headerHtml += ''; + header = $('.header', page); } var imageColor = isLibraryPage ? "white" : "black"; + headerHtml = ''; + headerHtml += '
'; + if (user && !page.hasClass('wizardPage')) { - headerHtml += ''; } headerHtml += '
'; - page.prepend(headerHtml); + + header.append(headerHtml); Dashboard.getPluginSecurityInfo().done(function (pluginSecurityInfo) { if (pluginSecurityInfo.IsMBSupporter) { - $('').insertBefore('.btnTools', page); + $('').insertBefore('.btnTools', header); } }); }, diff --git a/dashboard-ui/scripts/tvseason.js b/dashboard-ui/scripts/tvseason.js deleted file mode 100644 index 451a9d60f1..0000000000 --- a/dashboard-ui/scripts/tvseason.js +++ /dev/null @@ -1,153 +0,0 @@ -(function ($, document, LibraryBrowser, window) { - - var currentItem; - - function reload(page) { - - var id = getParameterByName('id'); - - Dashboard.showLoadingMsg(); - - ApiClient.getItem(Dashboard.getCurrentUserId(), id).done(function (item) { - - currentItem = item; - - var name = item.Name; - - $('#itemImage', page).html(LibraryBrowser.getDetailImageHtml(item)); - - Dashboard.setPageTitle(name); - - $('#itemName', page).html(name); - $('#seriesName', page).html('' + item.SeriesName + '').trigger('create'); - - setInitialCollapsibleState(page, item); - renderDetails(page, item); - - if (LibraryBrowser.shouldDisplayGallery(item)) { - $('#galleryCollapsible', page).show(); - } else { - $('#galleryCollapsible', page).hide(); - } - - $('#episodesCollapsible .collapsibleTitle', page).html('Episodes (' + item.ChildCount + ')'); - - Dashboard.hideLoadingMsg(); - }); - } - - function setInitialCollapsibleState(page, item) { - - if (!item.People || !item.People.length) { - $('#castCollapsible', page).hide(); - } else { - $('#castCollapsible', page).show(); - } - } - - function renderDetails(page, item) { - - if (item.Taglines && item.Taglines.length) { - $('#itemTagline', page).html(item.Taglines[0]).show(); - } else { - $('#itemTagline', page).hide(); - } - - LibraryBrowser.renderOverview($('#itemOverview', page), item); - - if (item.CommunityRating) { - $('#itemCommunityRating', page).html(LibraryBrowser.getStarRatingHtml(item)).show().attr('title', item.CommunityRating); - } else { - $('#itemCommunityRating', page).hide(); - } - - $('#itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(item)); - - LibraryBrowser.renderGenres($('#itemGenres', page), item); - LibraryBrowser.renderStudios($('#itemStudios', page), item); - renderUserDataIcons(page, item); - LibraryBrowser.renderLinks($('#itemLinks', page), item); - } - - function renderUserDataIcons(page, item) { - $('#itemRatings', page).html(LibraryBrowser.getUserDataIconsHtml(item)); - } - - function renderSeasons(page) { - - ApiClient.getItems(Dashboard.getCurrentUserId(), { - - ParentId: getParameterByName('id'), - SortBy: "SortName", - Fields: "PrimaryImageAspectRatio,ItemCounts,DisplayMediaType,DateCreated,UserData" - - }).done(function (result) { - - var html = LibraryBrowser.getPosterDetailViewHtml({ - items: result.Items, - useAverageAspectRatio: true - }); - - $('#episodesContent', page).html(html); - }); - } - - function renderGallery(page, item) { - - var html = LibraryBrowser.getGalleryHtml(item); - - $('#galleryContent', page).html(html).trigger('create'); - } - - function renderCast(page, item) { - var html = ''; - - var casts = item.People || []; - - for (var i = 0, length = casts.length; i < length; i++) { - - var cast = casts[i]; - - html += LibraryBrowser.createCastImage(cast); - } - - $('#castContent', page).html(html); - } - - $(document).on('pageshow', "#tvSeasonPage", function () { - - var page = this; - - reload(page); - - $('#episodesCollapsible', page).on('expand.lazyload', function () { - - renderSeasons(page); - - $(this).off('expand.lazyload'); - }); - - $('#castCollapsible', page).on('expand.lazyload', function () { - renderCast(page, currentItem); - - $(this).off('expand.lazyload'); - }); - - $('#galleryCollapsible', page).on('expand.lazyload', function () { - - renderGallery(page, currentItem); - - $(this).off('expand.lazyload'); - }); - - }).on('pagehide', "#tvSeasonPage", function () { - - currentItem = null; - var page = this; - - $('#episodesCollapsible', page).off('expand.lazyload'); - $('#castCollapsible', page).off('expand.lazyload'); - $('#galleryCollapsible', page).off('expand.lazyload'); - }); - -})(jQuery, document, LibraryBrowser, window); diff --git a/dashboard-ui/scripts/tvseries.js b/dashboard-ui/scripts/tvseries.js deleted file mode 100644 index 5dc9a56f3a..0000000000 --- a/dashboard-ui/scripts/tvseries.js +++ /dev/null @@ -1,172 +0,0 @@ -(function ($, document, LibraryBrowser, window) { - - var currentItem; - - function reload(page) { - - var id = getParameterByName('id'); - - Dashboard.showLoadingMsg(); - - ApiClient.getItem(Dashboard.getCurrentUserId(), id).done(function (item) { - - currentItem = item; - - var name = item.Name; - - $('#itemImage', page).html(LibraryBrowser.getDetailImageHtml(item)); - - Dashboard.setPageTitle(name); - - $('#itemName', page).html(name); - - setInitialCollapsibleState(page, item); - renderDetails(page, item); - - if (LibraryBrowser.shouldDisplayGallery(item)) { - $('#galleryCollapsible', page).show(); - } else { - $('#galleryCollapsible', page).hide(); - } - - Dashboard.hideLoadingMsg(); - }); - } - - function setInitialCollapsibleState(page, item) { - - if (!item.People || !item.People.length) { - $('#castCollapsible', page).hide(); - } else { - $('#castCollapsible', page).show(); - } - } - - function renderDetails(page, item) { - - if (item.Taglines && item.Taglines.length) { - $('#itemTagline', page).html(item.Taglines[0]).show(); - } else { - $('#itemTagline', page).hide(); - } - - LibraryBrowser.renderOverview($('#itemOverview', page), item); - - if (item.CommunityRating) { - $('#itemCommunityRating', page).html(LibraryBrowser.getStarRatingHtml(item)).show().attr('title', item.CommunityRating); - } else { - $('#itemCommunityRating', page).hide(); - } - - $('#itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(item)); - - $('#seasonsCollapsible .collapsibleTitle', page).html('Seasons (' + item.ChildCount + ')'); - - LibraryBrowser.renderPremiereDate($('#itemPremiereDate', page), item); - LibraryBrowser.renderGenres($('#itemGenres', page), item); - LibraryBrowser.renderStudios($('#itemStudios', page), item); - renderUserDataIcons(page, item); - LibraryBrowser.renderLinks($('#itemLinks', page), item); - - var airs = item.Status == "Ended" ? "Aired" : "Airs"; - - if (item.AirDays && item.AirDays.length) { - - airs += " " + item.AirDays.map(function (i) { - return i.substring(0, 3); - }).join(','); - } - - if (item.AirTime) { - airs += " at " + item.AirTime; - } - - if (item.Studios && item.Studios.length) { - airs += " on " + item.Studios[0]; - } - - $('#itemAirTime', page).html(airs); - } - - function renderUserDataIcons(page, item) { - $('#itemRatings', page).html(LibraryBrowser.getUserDataIconsHtml(item)); - } - - function renderSeasons(page) { - - ApiClient.getItems(Dashboard.getCurrentUserId(), { - - ParentId: getParameterByName('id'), - SortBy: "SortName", - Fields: "PrimaryImageAspectRatio,ItemCounts,DisplayMediaType,DateCreated,UserData" - - }).done(function (result) { - - var html = LibraryBrowser.getPosterDetailViewHtml({ - items: result.Items, - useAverageAspectRatio: true - }); - - $('#seasonsContent', page).html(html); - }); - } - - function renderGallery(page, item) { - - var html = LibraryBrowser.getGalleryHtml(item); - - $('#galleryContent', page).html(html).trigger('create'); - } - - function renderCast(page, item) { - var html = ''; - - var casts = item.People || []; - - for (var i = 0, length = casts.length; i < length; i++) { - - var cast = casts[i]; - - html += LibraryBrowser.createCastImage(cast); - } - - $('#castContent', page).html(html); - } - - $(document).on('pageshow', "#tvSeriesPage", function () { - - var page = this; - - reload(page); - - $('#seasonsCollapsible', page).on('expand.lazyload', function () { - - renderSeasons(page); - - $(this).off('expand.lazyload'); - }); - - $('#castCollapsible', page).on('expand.lazyload', function () { - renderCast(page, currentItem); - - $(this).off('expand.lazyload'); - }); - - $('#galleryCollapsible', page).on('expand.lazyload', function () { - - renderGallery(page, currentItem); - - $(this).off('expand.lazyload'); - }); - - }).on('pagehide', "#tvSeriesPage", function () { - - currentItem = null; - var page = this; - - $('#seasonsCollapsible', page).off('expand.lazyload'); - $('#castCollapsible', page).off('expand.lazyload'); - $('#galleryCollapsible', page).off('expand.lazyload'); - }); - -})(jQuery, document, LibraryBrowser, window); diff --git a/dashboard-ui/tvseason.html b/dashboard-ui/tvseason.html deleted file mode 100644 index 76e58660c9..0000000000 --- a/dashboard-ui/tvseason.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - -
-

- TV Shows

- -
- - - -
- -
-
-
-
-
- -
- -

-

- -

-

-

-

-

- -

-

- -
-
- -
-

Episodes

-
-
-
-

Trailers

-
-
-
-

Cast & Crew

-
-
-
-

Gallery

-
-
- -
-
- - diff --git a/dashboard-ui/tvseries.html b/dashboard-ui/tvseries.html deleted file mode 100644 index 8a75ea4a49..0000000000 --- a/dashboard-ui/tvseries.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - -
-

- TV Shows

- -
- - - -
- -
-
-
-
-
- -
- -

- -

-

-

-

-

-

-

-

-

- -
-
- -
-

Seasons

-
-
-
-

Trailers

-
-
-
-

Cast & Crew

-
-
-
-

Gallery

-
-
- -
-
- -