From 12e7761111bb589e3153ee3bc8b53abff87da41c Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 15 May 2013 18:55:24 -0400 Subject: [PATCH] display similar items on detail page --- ApiClient.js | 11 ++++++ dashboard-ui/css/librarybrowser.css | 4 ++ dashboard-ui/itemdetails.html | 8 +++- dashboard-ui/scripts/Itemdetailpage.js | 53 +++++++++++++++++++++++--- packages.config | 2 +- 5 files changed, 70 insertions(+), 8 deletions(-) diff --git a/ApiClient.js b/ApiClient.js index 04c85c5c8f..1c5c6339aa 100644 --- a/ApiClient.js +++ b/ApiClient.js @@ -257,6 +257,17 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) { }); }; + self.getSimilarItems = function (itemId, options) { + + var url = self.getUrl("Items/" + itemId + "/Similar", options); + + return self.ajax({ + type: "GET", + url: url, + dataType: "json" + }); + }; + /** * Gets all cultures known to the server */ diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 491ea55256..59736f3eb3 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -203,6 +203,7 @@ .criticRatingSummary { background-color: #FFE482!important; + background-color: rgba(255,228,130,0.7); color: #000!important; } @@ -368,6 +369,9 @@ a.itemTag:hover { border: 1px solid #181818; background: #222; margin-top: 2em; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; } .detailSectionContent { diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html index 4ca107d51a..eac98daa08 100644 --- a/dashboard-ui/itemdetails.html +++ b/dashboard-ui/itemdetails.html @@ -130,10 +130,10 @@

-

+

@@ -170,6 +170,12 @@
+