From 8062c8c011de87e54e7b991dac6e521780b38fdf Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 5 Jul 2013 12:17:32 -0400 Subject: [PATCH] improve offline support and add a web client indicator --- dashboard-ui/css/librarybrowser.css | 4 ++++ dashboard-ui/scripts/librarybrowser.js | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 5176a1f67..eec60d034 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -641,6 +641,10 @@ a.itemTag:hover { color: #fff; } +.offlinePosterRibbon { + background-color: #cc3333; +} + .itemProgress { vertical-align: top; font-size: 19px; diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 782b6c223..0c3fe87ae 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -203,7 +203,11 @@ html += ''; - html += LibraryBrowser.getNewIndicatorHtml(item); + if (item.LocationType == "Offline") { + html += LibraryBrowser.getOfflineIndicatorHtml(item); + } else { + html += LibraryBrowser.getNewIndicatorHtml(item); + } html += ""; } @@ -564,7 +568,9 @@ html += ""; } - if (options.showNewIndicator !== false) { + if (item.LocationType == "Offline") { + html += LibraryBrowser.getOfflineIndicatorHtml(item); + } else if (options.showNewIndicator !== false) { html += LibraryBrowser.getNewIndicatorHtml(item); } @@ -605,6 +611,10 @@ return name; }, + getOfflineIndicatorHtml: function () { + + return '
Offline
'; + }, getNewIndicatorHtml: function (item) { if (item.RecentlyAddedItemCount) {