diff --git a/dashboard-ui/channelitems.html b/dashboard-ui/channelitems.html index 99cc69444f..f427f129ca 100644 --- a/dashboard-ui/channelitems.html +++ b/dashboard-ui/channelitems.html @@ -39,29 +39,39 @@ ${HeaderSortBy} - + - - +
+ + +
- - +
+ + +
- - +
+ + +
- - +
+ + +
- - +
+ + +
- - +
+ + +
- -
diff --git a/dashboard-ui/css/images/headersearch.png b/dashboard-ui/css/images/headersearch.png index f8b57015df..9f29803674 100644 Binary files a/dashboard-ui/css/images/headersearch.png and b/dashboard-ui/css/images/headersearch.png differ diff --git a/dashboard-ui/css/images/items/folders/channels.png b/dashboard-ui/css/images/items/folders/channels.png index 1ca1e62577..b8d7392726 100644 Binary files a/dashboard-ui/css/images/items/folders/channels.png and b/dashboard-ui/css/images/items/folders/channels.png differ diff --git a/dashboard-ui/css/images/items/folders/games.png b/dashboard-ui/css/images/items/folders/games.png index d2e450afd8..34fd42aa26 100644 Binary files a/dashboard-ui/css/images/items/folders/games.png and b/dashboard-ui/css/images/items/folders/games.png differ diff --git a/dashboard-ui/css/images/items/folders/music.png b/dashboard-ui/css/images/items/folders/music.png index dc6b8bf176..44702ba825 100644 Binary files a/dashboard-ui/css/images/items/folders/music.png and b/dashboard-ui/css/images/items/folders/music.png differ diff --git a/dashboard-ui/css/images/items/folders/settings.png b/dashboard-ui/css/images/items/folders/settings.png index 41cf1ed0fe..29c5603027 100644 Binary files a/dashboard-ui/css/images/items/folders/settings.png and b/dashboard-ui/css/images/items/folders/settings.png differ diff --git a/dashboard-ui/css/images/items/folders/tv.png b/dashboard-ui/css/images/items/folders/tv.png index 362bd11708..c6b26beb97 100644 Binary files a/dashboard-ui/css/images/items/folders/tv.png and b/dashboard-ui/css/images/items/folders/tv.png differ diff --git a/dashboard-ui/css/images/remote.png b/dashboard-ui/css/images/remote.png index 0dccaccab5..8bdfd77151 100644 Binary files a/dashboard-ui/css/images/remote.png and b/dashboard-ui/css/images/remote.png differ diff --git a/dashboard-ui/css/librarymenu.css b/dashboard-ui/css/librarymenu.css index f03cd0e0cc..1c05fdbdfb 100644 --- a/dashboard-ui/css/librarymenu.css +++ b/dashboard-ui/css/librarymenu.css @@ -188,7 +188,7 @@ .tvshowsViewMenu { background-image: url(images/items/folders/tv.png); - background-position: 16px 8px; + background-position: 16px center; } .moviesViewMenu { diff --git a/dashboard-ui/css/posteritem.css b/dashboard-ui/css/posteritem.css index dbf6fe44fa..54ec1dc441 100644 --- a/dashboard-ui/css/posteritem.css +++ b/dashboard-ui/css/posteritem.css @@ -133,7 +133,7 @@ } .myLibraryPosterItem .posterItemImage { - height: 36px; + height: 34px; background-position: 12px center; background-size: 20px 20px; background-color: rgba(51, 136, 204, 0.5); @@ -429,3 +429,11 @@ height: 167.625px; } } + + +@media all and (min-width: 1600px) { + + .myLibraryPosterItem { + width: 16%; + } +} diff --git a/dashboard-ui/index.html b/dashboard-ui/index.html index bc28eaec97..9a1ef7ea0d 100644 --- a/dashboard-ui/index.html +++ b/dashboard-ui/index.html @@ -4,7 +4,13 @@ ${TitleMediaBrowser} -
+
+ +
diff --git a/dashboard-ui/notificationlist.html b/dashboard-ui/notificationlist.html index 76263593d3..795e3ef785 100644 --- a/dashboard-ui/notificationlist.html +++ b/dashboard-ui/notificationlist.html @@ -22,7 +22,7 @@
- +
diff --git a/dashboard-ui/scripts/channelitems.js b/dashboard-ui/scripts/channelitems.js index 4434e4abdc..880e388e9b 100644 --- a/dashboard-ui/scripts/channelitems.js +++ b/dashboard-ui/scripts/channelitems.js @@ -1,15 +1,31 @@ (function ($, document) { + var maxPageSize; + // The base query options var query = { - SortBy: "SortName", + SortBy: "", SortOrder: "Ascending", StartIndex: 0 }; + + function getPageSizes() { + + var sizes = []; + + if (!maxPageSize || maxPageSize >= 10) sizes.push(10); + if (!maxPageSize || maxPageSize >= 20) sizes.push(20); + if (!maxPageSize || maxPageSize >= 30) sizes.push(30); + if (!maxPageSize || maxPageSize >= 40) sizes.push(40); + if (!maxPageSize || maxPageSize >= 50) sizes.push(50); + if (!maxPageSize || maxPageSize >= 100) sizes.push(100); + + return sizes; + } function getSavedQueryId() { - return 'channels-' + getParameterByName('id') + (getParameterByName('folderId') || ''); + return 'channels-1-' + getParameterByName('id') + (getParameterByName('folderId') || ''); } function showLoadingMessage(page) { @@ -20,9 +36,9 @@ function hideLoadingMessage(page) { $('#popupDialog', page).popup('close'); } - + function reloadFeatures(page) { - + var channelId = getParameterByName('id'); $.getJSON(ApiClient.getUrl("Channels/" + channelId + "/Features", query)).done(function (features) { @@ -41,9 +57,37 @@ } else { $('.sortOrderToggle', page).hide(); } + + maxPageSize = features.MaxPageSize; + + updateSortOrders(page, features.DefaultSortFields); + + reloadItems(page); }); } + function updateSortOrders(page, fields) { + + updateSortOrder(page, fields, 'Name'); + updateSortOrder(page, fields, 'CommunityRating'); + updateSortOrder(page, fields, 'PremiereDate'); + updateSortOrder(page, fields, 'PlayCount'); + updateSortOrder(page, fields, 'Runtime'); + updateSortOrder(page, fields, 'DateCreated'); + } + + function updateSortOrder(page, fields, name) { + + var cssClass = "sortby" + name; + + if (fields.indexOf(name) == -1) { + + $('.' + cssClass, page).hide(); + } else { + $('.' + cssClass, page).show(); + } + } + function reloadItems(page) { showLoadingMessage(page); @@ -71,7 +115,7 @@ } query.folderId = folderId; - query.Limit = 50; + $.getJSON(ApiClient.getUrl("Channels/" + channelId + "/Items", query)).done(function (result) { // Scroll back up so they can see the results from the beginning @@ -79,7 +123,7 @@ var html = ''; - $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create'); + $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, false, getPageSizes())).trigger('create'); updateFilterControls(page); @@ -92,7 +136,7 @@ coverImage: true }); - html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount); + html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, false, getPageSizes()); $('#items', page).html(html).trigger('create').createPosterItemMenus(); @@ -212,7 +256,6 @@ LibraryBrowser.loadSavedQueryValues(getSavedQueryId(), query); reloadFeatures(page); - reloadItems(page); updateFilterControls(page); }); diff --git a/dashboard-ui/scripts/notifications.js b/dashboard-ui/scripts/notifications.js index bc4bb30c56..b3e2087149 100644 --- a/dashboard-ui/scripts/notifications.js +++ b/dashboard-ui/scripts/notifications.js @@ -45,9 +45,9 @@ html += '

'; - html += ''; + html += ''; - html += '

'; + html += '
'; html += '
';