diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index e896785e50..68d9c18ca9 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -65,15 +65,25 @@ width: 50px; } +.thName, .tdName { + max-width: 300px; +} + +.libraryItemsGrid .imgUserItemRating { + width: 20px; + height: 20px; +} + +.libraryItemsGrid a { + text-shadow: none; +} + @media all and (min-width: 650px) { .libraryPage .ui-content { padding: 15px 30px 100px; } } -@media all and (min-width: 750px) { -} - @media all and (min-width: 1200px) { .libraryPage .ui-content { @@ -81,7 +91,7 @@ } .ehsContent { - max-width: 900px; + max-width: 850px; } .libraryItemsGridContainer { @@ -90,6 +100,10 @@ } @media all and (min-width: 1440px) { + .ehsContent { + max-width: 900px; + } + .libraryItemsGridContainer { padding: 0 20%; } @@ -97,8 +111,9 @@ @media all and (min-width: 1920px) { .ehsContent { - max-width: 1300px; + max-width: 1000px; } + .libraryItemsGridContainer { padding: 0 25%; } diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index e4e97fe8f2..128d6930bd 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -691,16 +691,10 @@ progress { background-position: right center; } -.userItemRating { +.imgUserItemRating { height: 24px; width: 24px; margin-right: 1em; - overflow: hidden; - display: inline-block; -} - -.imgUserItemRating { - height: 24px; cursor: pointer; } diff --git a/dashboard-ui/movies.html b/dashboard-ui/movies.html index 7478c761a8..7a5cb68d5e 100644 --- a/dashboard-ui/movies.html +++ b/dashboard-ui/movies.html @@ -17,6 +17,12 @@ Directors
+
+ +
@@ -77,10 +83,13 @@

Filters:

- + - + + + + @@ -90,14 +99,10 @@ - - -
- - + diff --git a/dashboard-ui/moviesrecommended.html b/dashboard-ui/moviesrecommended.html index f8504cc220..5979de8ad3 100644 --- a/dashboard-ui/moviesrecommended.html +++ b/dashboard-ui/moviesrecommended.html @@ -18,7 +18,7 @@
-

Latest Movies

+

Latest Unwatched Movies

@@ -29,6 +29,13 @@
+ + diff --git a/dashboard-ui/scripts/Itemdetailpage.js b/dashboard-ui/scripts/Itemdetailpage.js index 6641ca9f7a..18f5eb8eaf 100644 --- a/dashboard-ui/scripts/Itemdetailpage.js +++ b/dashboard-ui/scripts/Itemdetailpage.js @@ -723,26 +723,26 @@ //played/unplayed if (userData.Played) { - html += '
Played
'; + html += 'Played'; } else { - html += '
Played
'; + html += 'Played'; } if (typeof userData.Likes == "undefined") { - html += '
Dislike
'; - html += '
Like
'; + html += 'Dislike'; + html += 'Like'; } else if (userData.Likes) { - html += '
Dislike
'; - html += '
Liked
'; + html += 'Dislike'; + html += 'Liked'; } else { - html += '
Dislike
'; - html += '
Like
'; + html += 'Dislike'; + html += 'Like'; } if (userData.IsFavorite) { - html += '
Favorite
'; + html += 'Favorite'; } else { - html += '
Favorite
'; + html += 'Favorite'; } $('#itemRatings', page).html(html); diff --git a/dashboard-ui/scripts/itembynamedetailpage.js b/dashboard-ui/scripts/itembynamedetailpage.js index a998f5ad4f..ea424549a8 100644 --- a/dashboard-ui/scripts/itembynamedetailpage.js +++ b/dashboard-ui/scripts/itembynamedetailpage.js @@ -130,20 +130,20 @@ var userData = item.UserData || {}; if (typeof userData.Likes == "undefined") { - html += '
Dislike
'; - html += '
Like
'; + html += 'Dislike'; + html += 'Like'; } else if (userData.Likes) { - html += '
Dislike
'; - html += '
Liked
'; + html += 'Dislike'; + html += 'Liked'; } else { - html += '
Dislike
'; - html += '
Like
'; + html += 'Dislike'; + html += 'Like'; } if (userData.IsFavorite) { - html += '
Favorite
'; + html += 'Favorite'; } else { - html += '
Favorite
'; + html += 'Favorite'; } $('#itemRatings', page).html(html); diff --git a/dashboard-ui/scripts/movies.js b/dashboard-ui/scripts/movies.js index c31406a10d..01ba19a99e 100644 --- a/dashboard-ui/scripts/movies.js +++ b/dashboard-ui/scripts/movies.js @@ -1,5 +1,7 @@ (function ($, document) { + var view = "Poster"; + // The base query options var query = { @@ -7,7 +9,7 @@ SortOrder: "Ascending", IncludeItemTypes: "Movie", Recursive: true, - Fields: "PrimaryImageAspectRatio" + Fields: "PrimaryImageAspectRatio,UserData" }; function getTableHtml(items) { @@ -18,11 +20,12 @@ html += ''; html += ' '; - html += 'Name'; + html += 'Name'; html += 'Year'; - html += 'Official Rating'; + html += 'Rating'; html += 'Runtime'; html += 'Community Rating'; + html += ''; html += ''; html += ''; @@ -57,7 +60,7 @@ html += ''; @@ -68,14 +71,48 @@ html += ''; - html += '' + item.Name + ''; + html += '' + item.Name + ''; html += '' + (item.ProductionYear || "") + ''; html += '' + (item.OfficialRating || "") + ''; - html += '' + (item.RunTimeTicks || "") + ''; + + var minutes = (item.RunTimeTicks || 0) / 600000000; + + minutes = minutes || 1; + + html += '' + parseInt(minutes) + 'min'; html += '' + (item.CommunityRating || "") + ''; + html += ''; + + var userData = item.UserData || {}; + + if (userData.Played) { + html += 'Played'; + } else { + html += 'Played'; + } + + if (typeof userData.Likes == "undefined") { + html += 'Dislike'; + html += 'Like'; + } else if (userData.Likes) { + html += 'Dislike'; + html += 'Liked'; + } else { + html += 'Dislike'; + html += 'Like'; + } + + if (userData.IsFavorite) { + html += 'Favorite'; + } else { + html += 'Favorite'; + } + + html += ''; + html += ''; return html; } @@ -86,12 +123,15 @@ ApiClient.getItems(Dashboard.getCurrentUserId(), query).done(function (result) { - $('#items', page).html(LibraryBrowser.getPosterViewHtml({ - - items: result.Items, - useAverageAspectRatio: true - - }))/*.html(getTableHtml(result.Items)).trigger('create')*/; + if (view == "Poster") { + $('#items', page).html(LibraryBrowser.getPosterViewHtml({ + items: result.Items, + useAverageAspectRatio: true + })); + } + else if (view == "Grid") { + $('#items', page).html(getTableHtml(result.Items)).trigger('create'); + } Dashboard.hideLoadingMsg(); }); @@ -143,6 +183,13 @@ reloadItems(page); }); + + $('#selectView', this).on('change', function () { + + view = this.value; + + reloadItems(page); + }); }).on('pageshow', "#moviesPage", function () { diff --git a/dashboard-ui/scripts/moviesrecommended.js b/dashboard-ui/scripts/moviesrecommended.js index 450f5f8832..cfdf4abdf0 100644 --- a/dashboard-ui/scripts/moviesrecommended.js +++ b/dashboard-ui/scripts/moviesrecommended.js @@ -11,7 +11,8 @@ IncludeItemTypes: "Movie", Limit: 5, Recursive: true, - Fields: "PrimaryImageAspectRatio" + Fields: "PrimaryImageAspectRatio", + Filters: "IsUnplayed" }; ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) { @@ -50,6 +51,33 @@ }); + + options = { + + SortBy: "DateCreated", + SortOrder: "Descending", + IncludeItemTypes: "Trailer", + Limit: 5, + Recursive: true, + Fields: "PrimaryImageAspectRatio", + Filters: "IsUnplayed" + }; + + ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) { + + if (result.Items.length) { + $('#trailerSection', page).show(); + } else { + $('#trailerSection', page).hide(); + } + + $('#trailerItems', page).html(LibraryBrowser.getPosterViewHtml({ + items: result.Items, + useAverageAspectRatio: true + })); + + }); + }); diff --git a/dashboard-ui/scripts/scheduledtaskspage.js b/dashboard-ui/scripts/scheduledtaskspage.js index 297044f82c..3ae0ae4b55 100644 --- a/dashboard-ui/scripts/scheduledtaskspage.js +++ b/dashboard-ui/scripts/scheduledtaskspage.js @@ -146,8 +146,6 @@ startTask: function (id) { - Dashboard.showLoadingMsg(); - ApiClient.startScheduledTask(id).done(function (result) { ScheduledTasksPage.reloadList(); @@ -157,8 +155,6 @@ stopTask: function (id) { - Dashboard.showLoadingMsg(); - ApiClient.stopScheduledTask(id).done(function (result) { ScheduledTasksPage.reloadList(); diff --git a/dashboard-ui/scripts/tvrecommended.js b/dashboard-ui/scripts/tvrecommended.js index 3341145eb6..6c4d342230 100644 --- a/dashboard-ui/scripts/tvrecommended.js +++ b/dashboard-ui/scripts/tvrecommended.js @@ -11,7 +11,8 @@ IncludeItemTypes: "Episode", Limit: 6, Recursive: true, - Fields: "PrimaryImageAspectRatio,SeriesInfo" + Fields: "PrimaryImageAspectRatio,SeriesInfo", + Filters: "IsUnplayed" }; ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) { diff --git a/dashboard-ui/tvrecommended.html b/dashboard-ui/tvrecommended.html index 59959eefcf..31a996bc41 100644 --- a/dashboard-ui/tvrecommended.html +++ b/dashboard-ui/tvrecommended.html @@ -15,7 +15,7 @@ Actors
-

Latest Episodes

+

Latest Unwatched Episodes