diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 6c92968971..11535f554f 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -74,6 +74,10 @@ pre, textarea.pre { color: #1B58B8; } +.hide { + display: none; +} + /* Page / Base styles */ diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html index 655c0d2c21..48e67af5d1 100644 --- a/dashboard-ui/itemdetails.html +++ b/dashboard-ui/itemdetails.html @@ -7,6 +7,7 @@
+

@@ -36,27 +37,27 @@
-
+

Media Info

-
+

Scenes

-
+

Special Features

-
+

Trailers

-
+

Cast & Crew

-
+

Gallery

diff --git a/dashboard-ui/scripts/Itemdetailpage.js b/dashboard-ui/scripts/Itemdetailpage.js index c831857ff4..61d32666d8 100644 --- a/dashboard-ui/scripts/Itemdetailpage.js +++ b/dashboard-ui/scripts/Itemdetailpage.js @@ -4,11 +4,17 @@ ItemDetailPage.reload(); + $('#scenesCollapsible', this).on('expand', ItemDetailPage.onScenesExpand); + $('#specialsCollapsible', this).on('expand', ItemDetailPage.onSpecialsExpand); + $('#trailersCollapsible', this).on('expand', ItemDetailPage.onTrailersExpand); $('#galleryCollapsible', this).on('expand', ItemDetailPage.onGalleryExpand); }, onPageHide: function () { + $('#scenesCollapsible', this).off('expand', ItemDetailPage.onScenesExpand); + $('#specialsCollapsible', this).off('expand', ItemDetailPage.onSpecialsExpand); + $('#trailersCollapsible', this).off('expand', ItemDetailPage.onTrailersExpand); $('#galleryCollapsible', this).off('expand', ItemDetailPage.onGalleryExpand); ItemDetailPage.item = null; @@ -35,6 +41,9 @@ if (item.IndexNumber != null) { name = item.IndexNumber + " - " + name; } + if (item.ParentIndexNumber != null) { + name = item.ParentIndexNumber + "." + name; + } Dashboard.setPageTitle(name); @@ -46,21 +55,29 @@ if (!item.Chapters || !item.Chapters.length) { $('#scenesCollapsible', page).hide(); } else { + $('#scenesCollapsible', page).show(); ItemDetailPage.renderScenes(item); } if (!item.LocalTrailerCount || item.LocalTrailerCount == 0) { $('#trailersCollapsible', page).hide(); } else { + $('#trailersCollapsible', page).show(); ItemDetailPage.renderTrailers(item); } if (!item.SpecialFeatureCount || item.SpecialFeatureCount == 0) { $('#specialsCollapsible', page).hide(); } else { + $('#specialsCollapsible', page).show(); ItemDetailPage.renderSpecials(item); } $('#itemName', page).html(name); + if (item.SeriesName || item.Album) { + var series_name = item.SeriesName || item.Album; + $('#seriesName', page).html(series_name).show(); + } + Dashboard.hideLoadingMsg(); }, @@ -131,7 +148,7 @@ }, renderOverviewBlock: function (item) { - +console.log(item); var page = $.mobile.activePage; if (item.Taglines && item.Taglines.length) { @@ -140,8 +157,13 @@ $('#itemTagline', page).hide(); } - if (item.Overview) { - $('#itemOverview', page).html(item.Overview).show(); + if (item.Overview || item.OverviewHtml) { + var overview = item.OverviewHtml || item.Overview; + + $('#itemOverview', page).html(overview).show(); + $('#itemOverview a').each(function(){ + $(this).attr("target","_blank"); + }); } else { $('#itemOverview', page).hide(); } @@ -305,12 +327,8 @@ html += '
' + chapter_name + '
'; html += '
'; - if (chapter.StartPositionTicks != "") { - html += ticks_to_human(chapter.StartPositionTicks); - } - else { - html += " "; - } + html += ticks_to_human(chapter.StartPositionTicks); + html += '
'; html += ''; @@ -399,7 +417,7 @@ html += 'Close'; html += ''; diff --git a/dashboard-ui/scripts/extensions.js b/dashboard-ui/scripts/extensions.js index 877a255bf5..0eed03cff4 100644 --- a/dashboard-ui/scripts/extensions.js +++ b/dashboard-ui/scripts/extensions.js @@ -685,13 +685,15 @@ function ticks_to_human(str) { var in_seconds = (str / 10000000); var hours = Math.floor(in_seconds/3600); - var minutes = '0'+Math.floor((in_seconds-(hours*3600))/60); + var minutes = Math.floor((in_seconds-(hours*3600))/60); var seconds = '0'+Math.round(in_seconds-(hours*3600)-(minutes*60)); var time = ''; if (hours > 0) time += hours+":"; - time += minutes.substr(-2) + ":" +seconds.substr(-2); + if (minutes < 10 && hours == 0) time += minutes; + else time += ('0'+minutes).substr(-2); + time += ":" + seconds.substr(-2); return time; }; \ No newline at end of file