From afe5161947a2902f26df337a9d855f727ddf0705 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 17 Oct 2013 12:24:35 -0400 Subject: [PATCH] update list pages to display current sort order --- dashboard-ui/boxsets.html | 3 ++- dashboard-ui/css/librarybrowser.css | 6 +++++- dashboard-ui/episodes.html | 3 ++- dashboard-ui/gamegenres.html | 3 ++- dashboard-ui/games.html | 3 ++- dashboard-ui/gamestudios.html | 3 ++- dashboard-ui/gamesystems.html | 3 ++- dashboard-ui/itemlist.html | 3 ++- dashboard-ui/metadatatv.html | 2 +- dashboard-ui/moviegenres.html | 3 ++- dashboard-ui/moviepeople.html | 3 ++- dashboard-ui/movies.html | 3 ++- dashboard-ui/moviestudios.html | 3 ++- dashboard-ui/movietrailers.html | 3 ++- dashboard-ui/musicalbums.html | 3 ++- dashboard-ui/musicartists.html | 3 ++- dashboard-ui/musicgenres.html | 3 ++- dashboard-ui/musicvideos.html | 5 +++-- dashboard-ui/scripts/boxsets.js | 3 +++ dashboard-ui/scripts/episodes.js | 3 +++ dashboard-ui/scripts/gamegenrepage.js | 3 +++ dashboard-ui/scripts/gamespage.js | 3 +++ dashboard-ui/scripts/gamestudiospage.js | 3 +++ dashboard-ui/scripts/gamesystemspage.js | 3 +++ dashboard-ui/scripts/itemlistpage.js | 3 +++ dashboard-ui/scripts/librarybrowser.js | 22 +++++++++++++++++++++- dashboard-ui/scripts/moviegenres.js | 3 +++ dashboard-ui/scripts/moviepeople.js | 3 +++ dashboard-ui/scripts/movies.js | 7 +++++++ dashboard-ui/scripts/moviestudios.js | 3 +++ dashboard-ui/scripts/movietrailers.js | 3 +++ dashboard-ui/scripts/musicalbums.js | 3 +++ dashboard-ui/scripts/musicartists.js | 3 +++ dashboard-ui/scripts/musicgenres.js | 3 +++ dashboard-ui/scripts/musicvideos.js | 3 +++ dashboard-ui/scripts/songs.js | 3 +++ dashboard-ui/scripts/tvgenres.js | 3 +++ dashboard-ui/scripts/tvpeople.js | 3 +++ dashboard-ui/scripts/tvshows.js | 3 +++ dashboard-ui/scripts/tvstudios.js | 3 +++ dashboard-ui/songs.html | 3 ++- dashboard-ui/tvgenres.html | 3 ++- dashboard-ui/tvpeople.html | 3 ++- dashboard-ui/tvshows.html | 3 ++- dashboard-ui/tvstudios.html | 3 ++- 45 files changed, 137 insertions(+), 25 deletions(-) diff --git a/dashboard-ui/boxsets.html b/dashboard-ui/boxsets.html index 648aa68aba..f00c978943 100644 --- a/dashboard-ui/boxsets.html +++ b/dashboard-ui/boxsets.html @@ -26,6 +26,7 @@
+
@@ -38,7 +39,7 @@

Sort By:

- + diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 36907eeb7b..c81e827de0 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -20,6 +20,10 @@ border-bottom: 1px solid #111; } +.viewSummary { + padding: .5em 0; +} + .viewMenuLink { text-decoration: none; color: #ccc; @@ -133,7 +137,7 @@ .viewSettings { text-align: center; - margin: .5em 0 .25em; + margin: 0 0 .25em; } .listPaging { diff --git a/dashboard-ui/episodes.html b/dashboard-ui/episodes.html index ad43aebb46..4c74ada541 100644 --- a/dashboard-ui/episodes.html +++ b/dashboard-ui/episodes.html @@ -26,6 +26,7 @@
+
@@ -37,7 +38,7 @@ Sort By: - + diff --git a/dashboard-ui/gamegenres.html b/dashboard-ui/gamegenres.html index ee5d90dff1..1e94269e2a 100644 --- a/dashboard-ui/gamegenres.html +++ b/dashboard-ui/gamegenres.html @@ -20,6 +20,7 @@
+
@@ -31,7 +32,7 @@ Sort By: - + diff --git a/dashboard-ui/games.html b/dashboard-ui/games.html index 9fcd1ff68e..aadc167f6d 100644 --- a/dashboard-ui/games.html +++ b/dashboard-ui/games.html @@ -29,6 +29,7 @@
+
@@ -42,7 +43,7 @@ Sort By: - + diff --git a/dashboard-ui/gamestudios.html b/dashboard-ui/gamestudios.html index 7cf0557dfe..4cc006d405 100644 --- a/dashboard-ui/gamestudios.html +++ b/dashboard-ui/gamestudios.html @@ -20,6 +20,7 @@
+
@@ -31,7 +32,7 @@ Sort By: - + diff --git a/dashboard-ui/gamesystems.html b/dashboard-ui/gamesystems.html index 23f7d0edc5..5f7fd6594b 100644 --- a/dashboard-ui/gamesystems.html +++ b/dashboard-ui/gamesystems.html @@ -20,6 +20,7 @@
+
@@ -32,7 +33,7 @@

Sort By:

- + diff --git a/dashboard-ui/itemlist.html b/dashboard-ui/itemlist.html index 6b18517388..6ea098079e 100644 --- a/dashboard-ui/itemlist.html +++ b/dashboard-ui/itemlist.html @@ -27,6 +27,7 @@
+
@@ -38,7 +39,7 @@ Sort By: - + diff --git a/dashboard-ui/metadatatv.html b/dashboard-ui/metadatatv.html index 2b12ba9a82..b9407607c4 100644 --- a/dashboard-ui/metadatatv.html +++ b/dashboard-ui/metadatatv.html @@ -31,7 +31,7 @@
  • -
    Display future episodes as part of your library. Automatic Tvdb updates are recommended to stay up to date with new metadata.
    +
    Display future episodes as part of your library. Automatic Tvdb updates are highly recommended to stay up to date with new metadata.
  • '; + } + + } + + return html; + }, + getPagingHtml: function (query, totalRecordCount) { if (query.Limit) { @@ -2092,7 +2112,7 @@ var selectedCssClass = ' selectedViewLink'; var selectedHtml = ""; - + var view = page.getAttribute('data-view') || getParameterByName('context'); if (counts.MovieCount || counts.TrailerCount) { diff --git a/dashboard-ui/scripts/moviegenres.js b/dashboard-ui/scripts/moviegenres.js index 11807ab341..711b847467 100644 --- a/dashboard-ui/scripts/moviegenres.js +++ b/dashboard-ui/scripts/moviegenres.js @@ -26,6 +26,9 @@ $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create'); + var checkSortOption = $('.radioSortBy:checked', page); + $('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create'); + html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, context: "movies" diff --git a/dashboard-ui/scripts/moviepeople.js b/dashboard-ui/scripts/moviepeople.js index ec24bf41e0..80dd2cb5e8 100644 --- a/dashboard-ui/scripts/moviepeople.js +++ b/dashboard-ui/scripts/moviepeople.js @@ -27,6 +27,9 @@ $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create'); + var checkSortOption = $('.radioSortBy:checked', page); + $('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create'); + html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, context: "movies" diff --git a/dashboard-ui/scripts/movies.js b/dashboard-ui/scripts/movies.js index 59f21ea5f0..53ebcaaa28 100644 --- a/dashboard-ui/scripts/movies.js +++ b/dashboard-ui/scripts/movies.js @@ -28,6 +28,9 @@ $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create'); + var checkSortOption = $('.radioSortBy:checked', page); + $('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create'); + if (view == "Backdrop") { html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, @@ -59,6 +62,10 @@ $('#items', page).html(html).trigger('create'); + $('.btnChangeToDefaultSort', page).on('click', function () { + $('.defaultSort', page)[0].click(); + }); + $('.selectPage', page).on('change', function () { query.StartIndex = (parseInt(this.value) - 1) * query.Limit; reloadItems(page); diff --git a/dashboard-ui/scripts/moviestudios.js b/dashboard-ui/scripts/moviestudios.js index 6d5667c9f7..1a454a6268 100644 --- a/dashboard-ui/scripts/moviestudios.js +++ b/dashboard-ui/scripts/moviestudios.js @@ -26,6 +26,9 @@ $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create'); + var checkSortOption = $('.radioSortBy:checked', page); + $('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create'); + html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, context: "movies" diff --git a/dashboard-ui/scripts/movietrailers.js b/dashboard-ui/scripts/movietrailers.js index f38ab18d81..f1bc2dde73 100644 --- a/dashboard-ui/scripts/movietrailers.js +++ b/dashboard-ui/scripts/movietrailers.js @@ -28,6 +28,9 @@ $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create'); + var checkSortOption = $('.radioSortBy:checked', page); + $('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create'); + if (view == "Backdrop") { html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, diff --git a/dashboard-ui/scripts/musicalbums.js b/dashboard-ui/scripts/musicalbums.js index ca12fc4b92..c06c20e576 100644 --- a/dashboard-ui/scripts/musicalbums.js +++ b/dashboard-ui/scripts/musicalbums.js @@ -28,6 +28,9 @@ $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create'); + var checkSortOption = $('.radioSortBy:checked', page); + $('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create'); + if (view == "Poster") { html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, diff --git a/dashboard-ui/scripts/musicartists.js b/dashboard-ui/scripts/musicartists.js index 3996b0cda6..6529e4bbfb 100644 --- a/dashboard-ui/scripts/musicartists.js +++ b/dashboard-ui/scripts/musicartists.js @@ -25,6 +25,9 @@ $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create'); + var checkSortOption = $('.radioSortBy:checked', page); + $('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create'); + html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, preferBackdrop: false, diff --git a/dashboard-ui/scripts/musicgenres.js b/dashboard-ui/scripts/musicgenres.js index d7b8782a63..8e042ebc47 100644 --- a/dashboard-ui/scripts/musicgenres.js +++ b/dashboard-ui/scripts/musicgenres.js @@ -26,6 +26,9 @@ $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create'); + var checkSortOption = $('.radioSortBy:checked', page); + $('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create'); + html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, context: "music" diff --git a/dashboard-ui/scripts/musicvideos.js b/dashboard-ui/scripts/musicvideos.js index 606734031b..99267b3530 100644 --- a/dashboard-ui/scripts/musicvideos.js +++ b/dashboard-ui/scripts/musicvideos.js @@ -28,6 +28,9 @@ $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create'); + var checkSortOption = $('.radioSortBy:checked', page); + $('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create'); + if (view == "Backdrop") { html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, diff --git a/dashboard-ui/scripts/songs.js b/dashboard-ui/scripts/songs.js index ff2d770acd..dd6a6dd06a 100644 --- a/dashboard-ui/scripts/songs.js +++ b/dashboard-ui/scripts/songs.js @@ -45,6 +45,9 @@ $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create'); + var checkSortOption = $('.radioSortBy:checked', page); + $('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create'); + html += LibraryBrowser.getSongTableHtml(result.Items, { showAlbum: true, showArtist: true, diff --git a/dashboard-ui/scripts/tvgenres.js b/dashboard-ui/scripts/tvgenres.js index 26270ff833..1561c9bf8b 100644 --- a/dashboard-ui/scripts/tvgenres.js +++ b/dashboard-ui/scripts/tvgenres.js @@ -26,6 +26,9 @@ $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create'); + var checkSortOption = $('.radioSortBy:checked', page); + $('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create'); + html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, context: "tv" diff --git a/dashboard-ui/scripts/tvpeople.js b/dashboard-ui/scripts/tvpeople.js index 067cb4e7f4..a1f34a2294 100644 --- a/dashboard-ui/scripts/tvpeople.js +++ b/dashboard-ui/scripts/tvpeople.js @@ -27,6 +27,9 @@ $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create'); + var checkSortOption = $('.radioSortBy:checked', page); + $('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create'); + html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, context: "tv" diff --git a/dashboard-ui/scripts/tvshows.js b/dashboard-ui/scripts/tvshows.js index 95836e7998..1ae8151f75 100644 --- a/dashboard-ui/scripts/tvshows.js +++ b/dashboard-ui/scripts/tvshows.js @@ -28,6 +28,9 @@ $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create'); + var checkSortOption = $('.radioSortBy:checked', page); + $('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create'); + if (view == "Backdrop") { html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, diff --git a/dashboard-ui/scripts/tvstudios.js b/dashboard-ui/scripts/tvstudios.js index 48ac4a68e8..8a28f07d7c 100644 --- a/dashboard-ui/scripts/tvstudios.js +++ b/dashboard-ui/scripts/tvstudios.js @@ -26,6 +26,9 @@ $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create'); + var checkSortOption = $('.radioSortBy:checked', page); + $('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create'); + html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, context: "tv" diff --git a/dashboard-ui/songs.html b/dashboard-ui/songs.html index 20aebb755b..e23b4361b5 100644 --- a/dashboard-ui/songs.html +++ b/dashboard-ui/songs.html @@ -21,6 +21,7 @@
    +
    @@ -35,7 +36,7 @@ - + diff --git a/dashboard-ui/tvgenres.html b/dashboard-ui/tvgenres.html index 58f95d1402..159391f408 100644 --- a/dashboard-ui/tvgenres.html +++ b/dashboard-ui/tvgenres.html @@ -22,6 +22,7 @@
    +
    @@ -33,7 +34,7 @@ Sort By: - + diff --git a/dashboard-ui/tvpeople.html b/dashboard-ui/tvpeople.html index bec7081d2f..aa650d7392 100644 --- a/dashboard-ui/tvpeople.html +++ b/dashboard-ui/tvpeople.html @@ -25,6 +25,7 @@
    +
    @@ -36,7 +37,7 @@ Sort By: - + diff --git a/dashboard-ui/tvshows.html b/dashboard-ui/tvshows.html index 392913e29f..b7cfc40191 100644 --- a/dashboard-ui/tvshows.html +++ b/dashboard-ui/tvshows.html @@ -31,6 +31,7 @@
    +
    @@ -42,7 +43,7 @@ Sort By: - + diff --git a/dashboard-ui/tvstudios.html b/dashboard-ui/tvstudios.html index 0eaa099e04..65265c149a 100644 --- a/dashboard-ui/tvstudios.html +++ b/dashboard-ui/tvstudios.html @@ -22,6 +22,7 @@
    +
    @@ -33,7 +34,7 @@ Sort By: - +