diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 552bc8929b..b48d5ab770 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -125,6 +125,9 @@ .itemMiscInfo { color: #ddd; font-size: 14px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; } .mediaInfoStream { @@ -210,6 +213,7 @@ color: #fff; text-align: left; vertical-align: top; + overflow: hidden; } .posterDetailViewName { diff --git a/dashboard-ui/itemlist.html b/dashboard-ui/itemlist.html index 37c423f42a..b4dc35b859 100644 --- a/dashboard-ui/itemlist.html +++ b/dashboard-ui/itemlist.html @@ -8,8 +8,84 @@

+
+
+ +
+ + +
+
+ +
+
+ + Sort By: + + + + + + + + + + + + + + + + + + + +
+ +
+ + Sort Order: + + + + + + + +
+
+
+
+
+
+ + Filters: + + + + + + + + + + + + + + + + + + +
+
+
diff --git a/dashboard-ui/scripts/itemlistpage.js b/dashboard-ui/scripts/itemlistpage.js index 99f832ab68..87f8e4b761 100644 --- a/dashboard-ui/scripts/itemlistpage.js +++ b/dashboard-ui/scripts/itemlistpage.js @@ -1,5 +1,7 @@ (function ($, document) { + var view = "Poster"; + // The base query options var query = { @@ -26,10 +28,19 @@ html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true); } - html += LibraryBrowser.getPosterDetailViewHtml({ - items: result.Items, - useAverageAspectRatio: true - }); + if (view == "Backdrop") { + html += LibraryBrowser.getPosterDetailViewHtml({ + items: result.Items, + useAverageAspectRatio: true, + preferBackdrop: true + }); + } + else if (view == "Poster") { + html += LibraryBrowser.getPosterDetailViewHtml({ + items: result.Items, + useAverageAspectRatio: true + }); + } if (showPaging) { html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount); @@ -64,12 +75,76 @@ $(document).on('pageinit', "#itemListPage", function () { + var page = this; + + $('.radioSortBy', this).on('click', function () { + query.StartIndex = 0; + query.SortBy = this.getAttribute('data-sortby'); + reloadItems(page); + }); + + $('.radioSortOrder', this).on('click', function () { + query.StartIndex = 0; + query.SortOrder = this.getAttribute('data-sortorder'); + reloadItems(page); + }); + + $('.chkStandardFilter', this).on('change', function () { + + var filterName = this.getAttribute('data-filter'); + var filters = query.Filters || ""; + + filters = (',' + filters).replace(',' + filterName, '').substring(1); + + if (this.checked) { + filters = filters ? (filters + ',' + filterName) : filterName; + } + + query.StartIndex = 0; + query.Filters = filters; + + reloadItems(page); + }); + + $('#selectView', this).on('change', function () { + + view = this.value; + + reloadItems(page); + }); }).on('pageshow', "#itemListPage", function () { query.ParentId = getParameterByName('parentId'); + query.Filters = ""; + query.SortBy = "SortName"; + query.SortOrder = "Ascending"; + reloadItems(this); + // Reset form values using the last used query + $('.radioSortBy', this).each(function () { + + this.checked = query.SortBy == this.getAttribute('data-sortby'); + + }).checkboxradio('refresh'); + + $('.radioSortOrder', this).each(function () { + + this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + + }).checkboxradio('refresh'); + + $('.chkStandardFilter', this).each(function () { + + var filters = "," + (query.Filters || ""); + var filterName = this.getAttribute('data-filter'); + + this.checked = filters.indexOf(',' + filterName) != -1; + + }).checkboxradio('refresh'); + + $('#selectView', this).val(view).selectmenu('refresh'); }); })(jQuery, document); \ No newline at end of file diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 352d7ba4f6..d78f7fef72 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -125,7 +125,7 @@ html += '

' + childText + '

'; } else { - html += '

' + LibraryBrowser.getMiscInfoHtml(item, false) + '

'; + html += '

' + LibraryBrowser.getMiscInfoHtml(item) + '

'; } html += '

' + LibraryBrowser.getUserDataIconsHtml(item) + '

'; @@ -836,12 +836,17 @@ return html; }, - getMiscInfoHtml: function (item, includeMediaInfo) { + getMiscInfoHtml: function (item) { var miscInfo = []; if (item.ProductionYear) { - miscInfo.push(item.ProductionYear); + + if (item.Status == "Continuing") { + miscInfo.push(item.ProductionYear + "-Present"); + } else { + miscInfo.push(item.ProductionYear); + } } if (item.OfficialRating) { @@ -857,16 +862,13 @@ miscInfo.push(parseInt(minutes) + "min"); } - if (includeMediaInfo !== false) { - if (item.DisplayMediaType) { - miscInfo.push(item.DisplayMediaType); - } - - if (item.VideoFormat && item.VideoFormat !== 'Standard') { - miscInfo.push(item.VideoFormat); - } + if (item.MediaType && item.DisplayMediaType) { + miscInfo.push(item.DisplayMediaType); } + if (item.VideoFormat && item.VideoFormat !== 'Standard') { + miscInfo.push(item.VideoFormat); + } return miscInfo.join('     '); }, diff --git a/dashboard-ui/scripts/moviepeople.js b/dashboard-ui/scripts/moviepeople.js index 2b9d0281cb..2a54456333 100644 --- a/dashboard-ui/scripts/moviepeople.js +++ b/dashboard-ui/scripts/moviepeople.js @@ -127,6 +127,15 @@ this.checked = query.SortOrder == this.getAttribute('data-sortorder'); }).checkboxradio('refresh'); + + $('.chkPersonTypeFilter', this).each(function () { + + var filters = "," + (query.PersonTypes || ""); + var filterName = this.getAttribute('data-filter'); + + this.checked = filters.indexOf(',' + filterName) != -1; + + }).checkboxradio('refresh'); }); })(jQuery, document); \ No newline at end of file diff --git a/dashboard-ui/scripts/movies.js b/dashboard-ui/scripts/movies.js index 11556d8241..58bf15a599 100644 --- a/dashboard-ui/scripts/movies.js +++ b/dashboard-ui/scripts/movies.js @@ -139,7 +139,6 @@ }).on('pageshow', "#moviesPage", function () { - // Reset form values using the last used query $('.radioSortBy', this).each(function () { diff --git a/dashboard-ui/scripts/tvpeople.js b/dashboard-ui/scripts/tvpeople.js index f01fd1f787..5ee9e23ff1 100644 --- a/dashboard-ui/scripts/tvpeople.js +++ b/dashboard-ui/scripts/tvpeople.js @@ -136,6 +136,15 @@ this.checked = filters.indexOf(',' + filterName) != -1; }).checkboxradio('refresh'); + + $('.chkPersonTypeFilter', this).each(function () { + + var filters = "," + (query.PersonTypes || ""); + var filterName = this.getAttribute('data-filter'); + + this.checked = filters.indexOf(',' + filterName) != -1; + + }).checkboxradio('refresh'); }); })(jQuery, document); \ No newline at end of file diff --git a/dashboard-ui/scripts/tvseries.js b/dashboard-ui/scripts/tvseries.js index b34efe9ac3..ae04409659 100644 --- a/dashboard-ui/scripts/tvseries.js +++ b/dashboard-ui/scripts/tvseries.js @@ -69,6 +69,7 @@ $('#itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(item)); + LibraryBrowser.renderPremiereDate($('#itemPremiereDate', page), item); LibraryBrowser.renderGenres($('#itemGenres', page), item); LibraryBrowser.renderStudios($('#itemStudios', page), item); renderUserDataIcons(page, item); diff --git a/dashboard-ui/tvseries.html b/dashboard-ui/tvseries.html index cb79de90c9..308b760436 100644 --- a/dashboard-ui/tvseries.html +++ b/dashboard-ui/tvseries.html @@ -35,7 +35,7 @@

- +