From 0a3876a9b1f5fc194d79803065c34f9099a7b5d9 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 28 Jun 2014 22:30:20 -0400 Subject: [PATCH] add tagline to editing interface --- dashboard-ui/css/mediaplayer-video.css | 2 +- dashboard-ui/css/posteritem.css | 17 ++++++++++++++--- dashboard-ui/edititemmetadata.html | 4 ++++ dashboard-ui/scripts/edititemmetadata.js | 10 ++++++++++ dashboard-ui/scripts/indexpage.js | 2 +- dashboard-ui/scripts/mediaplayer-video.js | 2 +- 6 files changed, 31 insertions(+), 6 deletions(-) diff --git a/dashboard-ui/css/mediaplayer-video.css b/dashboard-ui/css/mediaplayer-video.css index 67a782a133..404dc04dd8 100644 --- a/dashboard-ui/css/mediaplayer-video.css +++ b/dashboard-ui/css/mediaplayer-video.css @@ -99,7 +99,7 @@ } .videoTopControlsLogo img { - max-height: 40px; + max-height: 42px; max-width: 200px; } diff --git a/dashboard-ui/css/posteritem.css b/dashboard-ui/css/posteritem.css index a7948f24aa..e4518badbc 100644 --- a/dashboard-ui/css/posteritem.css +++ b/dashboard-ui/css/posteritem.css @@ -27,9 +27,11 @@ .posterItemOverlayInner { padding: 11px 12px 10px; } -.posterItemOverlayInner button:last-child { - margin-right:0!important; -} + + .posterItemOverlayInner button:last-child { + margin-right: 0!important; + } + .posterItemOverlayInner p { white-space: nowrap; overflow: hidden; @@ -139,6 +141,7 @@ .myLibraryPosterItem { width: 42%; + min-width: 50px; } .myLibraryPosterItem .posterItemImage { @@ -388,6 +391,8 @@ .myLibraryPosterItem { width: 30%; + /* Specify a min width just in case the container doesn't have a width */ + min-width: 160px; } } @@ -406,6 +411,8 @@ .myLibraryPosterItem { width: 23%; + /* Specify a min width just in case the container doesn't have a width */ + min-width: 220px; } .smallBackdropPosterItem { @@ -444,6 +451,8 @@ .myLibraryPosterItem { width: 19%; + /* Specify a min width just in case the container doesn't have a width */ + min-width: 220px; } .backdropPosterItem { @@ -484,5 +493,7 @@ .myLibraryPosterItem { width: 16%; + /* Specify a min width just in case the container doesn't have a width */ + min-width: 220px; } } diff --git a/dashboard-ui/edititemmetadata.html b/dashboard-ui/edititemmetadata.html index aed150e6f4..316beee9d4 100644 --- a/dashboard-ui/edititemmetadata.html +++ b/dashboard-ui/edititemmetadata.html @@ -127,6 +127,10 @@ +
diff --git a/dashboard-ui/scripts/edititemmetadata.js b/dashboard-ui/scripts/edititemmetadata.js index 3c8d9e76ff..078c21ed8e 100644 --- a/dashboard-ui/scripts/edititemmetadata.js +++ b/dashboard-ui/scripts/edititemmetadata.js @@ -88,6 +88,12 @@ $('#fldShortOverview', page).hide(); } + if (item.MediaType == "Video" && item.Type != "Episode") { + $('#fldTagline', page).show(); + } else { + $('#fldTagline', page).hide(); + } + Dashboard.getCurrentUser().done(function (user) { if (user.Configuration.EnableContentDeletion && @@ -458,6 +464,7 @@ $('#txtName', page).val(item.Name || ""); $('#txtOverview', page).val(item.Overview || ""); $('#txtShortOverview', page).val(item.ShortOverview || ""); + $('#txtTagline', page).val((item.Taglines.length ? item.Taglines[0] : '')); $('#txtSortName', page).val(item.ForcedSortName || ""); $('#txtDisplayMediaType', page).val(item.DisplayMediaType || ""); $('#txtCommunityRating', page).val(item.CommunityRating || ""); @@ -918,6 +925,9 @@ item.RunTimeTicks = seriesRuntime ? (seriesRuntime * 600000000) : null; } + var tagline = $('#txtTagline', form).val(); + item.Taglines = tagline ? [tagline] : []; + ApiClient.updateItem(item).done(function () { Dashboard.alert('Item saved.'); diff --git a/dashboard-ui/scripts/indexpage.js b/dashboard-ui/scripts/indexpage.js index 524754e6eb..034ffe98cf 100644 --- a/dashboard-ui/scripts/indexpage.js +++ b/dashboard-ui/scripts/indexpage.js @@ -105,7 +105,7 @@ var html = '
'; if (index) { - html += '

' + Globalize.translate('HeaderMyLibrary') + '

'; + html += '

' + Globalize.translate('HeaderMyViews') + '

'; } html += '
'; html += createMediaLinks({ diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index 986baa580e..92aa48ed78 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -298,7 +298,7 @@ url = ApiClient.getScaledImageUrl(state.NowPlayingItem.LogoItemId, { type: "Logo", - height: 40, + height: 42, tag: state.NowPlayingItem.LogoImageTag });