diff --git a/dashboard-ui/boxsets.html b/dashboard-ui/boxsets.html index d27ccedd8e..caa59ec344 100644 --- a/dashboard-ui/boxsets.html +++ b/dashboard-ui/boxsets.html @@ -18,8 +18,12 @@ Studios
- - +
+ + +
+
+
diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 3c7a010fb8..7279948360 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -56,7 +56,7 @@ .viewSettings { text-align: center; - margin: 1em 0; + margin: .5em 0; } .listPaging { @@ -68,6 +68,14 @@ .libraryPage .ui-content { padding: 10px 20px 100px; } + + .viewControls, .listTopPaging { + display: inline-block; + } + + .viewControls + .listTopPaging { + margin-left: 1em; + } } @media all and (min-width: 750px) { @@ -75,16 +83,6 @@ padding-left: 20px; padding-right: 20px; } - - .viewSettings { - margin-bottom: 0; - padding-right: 300px; - } - - .topListPaging { - padding-left: 300px; - margin-top: -35px; - } } /*@media all and (min-width: 1000px) { diff --git a/dashboard-ui/gamegenres.html b/dashboard-ui/gamegenres.html index bf864df65e..06d899eb8f 100644 --- a/dashboard-ui/gamegenres.html +++ b/dashboard-ui/gamegenres.html @@ -16,8 +16,12 @@ Studios
- - +
+ + +
+
+
diff --git a/dashboard-ui/games.html b/dashboard-ui/games.html index b0ca088bb8..9131935910 100644 --- a/dashboard-ui/games.html +++ b/dashboard-ui/games.html @@ -16,8 +16,12 @@ Studios
- - +
+ + +
+
+
diff --git a/dashboard-ui/gamestudios.html b/dashboard-ui/gamestudios.html index 4f83e1e342..f9431cc40f 100644 --- a/dashboard-ui/gamestudios.html +++ b/dashboard-ui/gamestudios.html @@ -16,8 +16,12 @@ Studios
- - +
+ + +
+
+
diff --git a/dashboard-ui/gamesystems.html b/dashboard-ui/gamesystems.html index e44c898d0e..87a5ae68ed 100644 --- a/dashboard-ui/gamesystems.html +++ b/dashboard-ui/gamesystems.html @@ -16,8 +16,12 @@ Studios
- - +
+ + +
+
+
diff --git a/dashboard-ui/itembynamedetails.html b/dashboard-ui/itembynamedetails.html index b720c40ba8..76c9f319a9 100644 --- a/dashboard-ui/itembynamedetails.html +++ b/dashboard-ui/itembynamedetails.html @@ -30,6 +30,12 @@

In Your Library

+
+
+
+
+
+
diff --git a/dashboard-ui/itemlist.html b/dashboard-ui/itemlist.html index b4dc35b859..b973e70c31 100644 --- a/dashboard-ui/itemlist.html +++ b/dashboard-ui/itemlist.html @@ -9,14 +9,18 @@

-
- +
+
+ +
+ + +
+
- -
diff --git a/dashboard-ui/moviegenres.html b/dashboard-ui/moviegenres.html index baa2b2f81d..247ec0cc96 100644 --- a/dashboard-ui/moviegenres.html +++ b/dashboard-ui/moviegenres.html @@ -18,8 +18,12 @@ Studios
- - +
+ + +
+
+
diff --git a/dashboard-ui/moviepeople.html b/dashboard-ui/moviepeople.html index f3f32b4dc5..84c78eaecf 100644 --- a/dashboard-ui/moviepeople.html +++ b/dashboard-ui/moviepeople.html @@ -18,8 +18,12 @@ Studios
- - +
+ + +
+
+
diff --git a/dashboard-ui/movies.html b/dashboard-ui/movies.html index 0cdc1cc7c3..351485161b 100644 --- a/dashboard-ui/movies.html +++ b/dashboard-ui/movies.html @@ -18,14 +18,18 @@ Studios
-
- +
+
+ +
+ + +
+
- -
diff --git a/dashboard-ui/moviestudios.html b/dashboard-ui/moviestudios.html index c5a667bf52..eee8822877 100644 --- a/dashboard-ui/moviestudios.html +++ b/dashboard-ui/moviestudios.html @@ -18,8 +18,12 @@ Studios
- - +
+ + +
+
+
diff --git a/dashboard-ui/movietrailers.html b/dashboard-ui/movietrailers.html index c92c817b96..fb7db103ee 100644 --- a/dashboard-ui/movietrailers.html +++ b/dashboard-ui/movietrailers.html @@ -18,14 +18,18 @@ Studios
-
- +
+
+ +
+ + +
+
- -
diff --git a/dashboard-ui/scripts/boxsets.js b/dashboard-ui/scripts/boxsets.js index fca11d81a4..f771d47d3f 100644 --- a/dashboard-ui/scripts/boxsets.js +++ b/dashboard-ui/scripts/boxsets.js @@ -23,9 +23,7 @@ var showPaging = result.TotalRecordCount > query.Limit; - if (showPaging) { - html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true); - } + $('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create'); html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, @@ -38,17 +36,17 @@ var elem = $('#items', page).html(html).trigger('create'); - $('select', elem).on('change', function () { + $('.selectPage', page).on('change', function () { query.StartIndex = (parseInt(this.value) - 1) * query.Limit; reloadItems(page); }); - $('.btnNextPage', elem).on('click', function () { + $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; reloadItems(page); }); - $('.btnPreviousPage', elem).on('click', function () { + $('.btnPreviousPage', page).on('click', function () { query.StartIndex -= query.Limit; reloadItems(page); }); diff --git a/dashboard-ui/scripts/gamegenrepage.js b/dashboard-ui/scripts/gamegenrepage.js index 507cfaeb25..16a1724637 100644 --- a/dashboard-ui/scripts/gamegenrepage.js +++ b/dashboard-ui/scripts/gamegenrepage.js @@ -22,9 +22,7 @@ var showPaging = result.TotalRecordCount > query.Limit; - if (showPaging) { - html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true); - } + $('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create'); html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, @@ -39,17 +37,17 @@ var elem = $('#items', page).html(html).trigger('create'); - $('select', elem).on('change', function () { - query.StartIndex = (parseInt(this.value) - 1) * query.Limit; + $('.selectPage', page).on('change', function () { + query.StartIndex = (parseInt(this.value) - 1) * query.Limit; reloadItems(page); }); - $('.btnNextPage', elem).on('click', function () { + $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; reloadItems(page); }); - $('.btnPreviousPage', elem).on('click', function () { + $('.btnPreviousPage', page).on('click', function () { query.StartIndex -= query.Limit; reloadItems(page); }); diff --git a/dashboard-ui/scripts/gamespage.js b/dashboard-ui/scripts/gamespage.js index f8a6405fdb..dcbf117ff3 100644 --- a/dashboard-ui/scripts/gamespage.js +++ b/dashboard-ui/scripts/gamespage.js @@ -25,9 +25,7 @@ var showPaging = result.TotalRecordCount > query.Limit; - if (showPaging) { - html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true); - } + $('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create'); for (var i = 0, length = result.Items.length; i < length; i++) { var item = result.Items[i]; @@ -49,17 +47,17 @@ var elem = $('#items', page).html(html).trigger('create'); - $('select', elem).on('change', function () { - query.StartIndex = (parseInt(this.value) - 1) * query.Limit; + $('.selectPage', page).on('change', function () { + query.StartIndex = (parseInt(this.value) - 1) * query.Limit; reloadItems(page); }); - $('.btnNextPage', elem).on('click', function () { + $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; reloadItems(page); }); - $('.btnPreviousPage', elem).on('click', function () { + $('.btnPreviousPage', page).on('click', function () { query.StartIndex -= query.Limit; reloadItems(page); }); diff --git a/dashboard-ui/scripts/gamestudiospage.js b/dashboard-ui/scripts/gamestudiospage.js index 06cbddea23..de082defd6 100644 --- a/dashboard-ui/scripts/gamestudiospage.js +++ b/dashboard-ui/scripts/gamestudiospage.js @@ -22,9 +22,7 @@ var showPaging = result.TotalRecordCount > query.Limit; - if (showPaging) { - html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true); - } + $('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create'); html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, @@ -39,17 +37,17 @@ var elem = $('#items', page).html(html).trigger('create'); - $('select', elem).on('change', function () { - query.StartIndex = (parseInt(this.value) - 1) * query.Limit; + $('.selectPage', page).on('change', function () { + query.StartIndex = (parseInt(this.value) - 1) * query.Limit; reloadItems(page); }); - $('.btnNextPage', elem).on('click', function () { + $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; reloadItems(page); }); - $('.btnPreviousPage', elem).on('click', function () { + $('.btnPreviousPage', page).on('click', function () { query.StartIndex -= query.Limit; reloadItems(page); }); diff --git a/dashboard-ui/scripts/gamesystemspage.js b/dashboard-ui/scripts/gamesystemspage.js index e710f40112..d8ebdfa71c 100644 --- a/dashboard-ui/scripts/gamesystemspage.js +++ b/dashboard-ui/scripts/gamesystemspage.js @@ -24,9 +24,7 @@ var showPaging = result.TotalRecordCount > query.Limit; - if (showPaging) { - html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true); - } + $('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create'); html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, @@ -39,17 +37,17 @@ var elem = $('#items', page).html(html).trigger('create'); - $('select', elem).on('change', function () { - query.StartIndex = (parseInt(this.value) - 1) * query.Limit; + $('.selectPage', page).on('change', function () { + query.StartIndex = (parseInt(this.value) - 1) * query.Limit; reloadItems(page); }); - $('.btnNextPage', elem).on('click', function () { + $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; reloadItems(page); }); - $('.btnPreviousPage', elem).on('click', function () { + $('.btnPreviousPage', page).on('click', function () { query.StartIndex -= query.Limit; reloadItems(page); }); diff --git a/dashboard-ui/scripts/itembynamedetailpage.js b/dashboard-ui/scripts/itembynamedetailpage.js index 4cef14700c..29b96d6151 100644 --- a/dashboard-ui/scripts/itembynamedetailpage.js +++ b/dashboard-ui/scripts/itembynamedetailpage.js @@ -179,20 +179,30 @@ if (item.Type == "Person" && item.PremiereDate) { - var birthday = parseISO8601Date(item.PremiereDate, { toLocal: true }).toDateString(); + try { + var birthday = parseISO8601Date(item.PremiereDate, { toLocal: true }).toDateString(); - $('#itemBirthday', page).show().html("Birthday:  " + birthday); + $('#itemBirthday', page).show().html("Birthday:  " + birthday); + } + catch(err) + { + $('#itemBirthday', page).hide(); + } } else { $('#itemBirthday', page).hide(); } if (item.Type == "Person" && item.EndDate) { - var deathday = parseISO8601Date(item.EndDate, { toLocal: true }).toDateString(); + try { + var deathday = parseISO8601Date(item.EndDate, { toLocal: true }).toDateString(); - $('#itemDeathDate', page).show().html("Death day:  " + deathday); + $('#itemDeathDate', page).show().html("Death day:  " + deathday); + } + catch (err) { + $('#itemBirthday', page).hide(); + } } else { - $('#itemDeathDate', page).hide(); } if (item.Type == "Person" && item.ProductionLocations && item.ProductionLocations.length) { @@ -246,9 +256,7 @@ var showPaging = result.TotalRecordCount > query.Limit; - if (showPaging) { - html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true); - } + $('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create'); html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, @@ -259,21 +267,21 @@ html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount); } - var elem = $('#items', page).html(html).trigger('create'); + $('#items', page).html(html).trigger('create'); - $('select', elem).on('change', function () { + $('.selectPage', page).on('change', function () { query.StartIndex = (parseInt(this.value) - 1) * query.Limit; loadItems(page, query); }); - $('.btnNextPage', elem).on('click', function () { + $('.btnNextPage', page).on('click', function () { query.StartIndex = query.StartIndex + query.Limit; loadItems(page, query); }); - $('.btnPreviousPage', elem).on('click', function () { + $('.btnPreviousPage', page).on('click', function () { query.StartIndex = query.StartIndex - query.Limit; loadItems(page, query); diff --git a/dashboard-ui/scripts/itemlistpage.js b/dashboard-ui/scripts/itemlistpage.js index 87f8e4b761..66f9bbdafa 100644 --- a/dashboard-ui/scripts/itemlistpage.js +++ b/dashboard-ui/scripts/itemlistpage.js @@ -24,9 +24,7 @@ var showPaging = result.TotalRecordCount > query.Limit; - if (showPaging) { - html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true); - } + $('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create'); if (view == "Backdrop") { html += LibraryBrowser.getPosterDetailViewHtml({ @@ -48,17 +46,17 @@ var elem = $('#items', page).html(html).trigger('create'); - $('select', elem).on('change', function () { + $('.selectPage', page).on('change', function () { query.StartIndex = (parseInt(this.value) - 1) * query.Limit; reloadItems(page); }); - $('.btnNextPage', elem).on('click', function () { + $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; reloadItems(page); }); - $('.btnPreviousPage', elem).on('click', function () { + $('.btnPreviousPage', page).on('click', function () { query.StartIndex -= query.Limit; reloadItems(page); }); diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index d78f7fef72..94c185e573 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -357,8 +357,12 @@ var date = item.DateCreated; - if (date && (new Date().getTime() - parseISO8601Date(date).getTime()) < 1209600000) { - return "
New
"; + try { + if (date && (new Date().getTime() - parseISO8601Date(date).getTime()) < 1209600000) { + return "
New
"; + } + } catch (err) { + } } @@ -468,14 +472,14 @@ } }, - getPagingHtml: function (query, totalRecordCount, isTop) { + getPagingHtml: function (query, totalRecordCount) { var html = ''; var pageCount = Math.ceil(totalRecordCount / query.Limit); var pageNumber = (query.StartIndex / query.Limit) + 1; - var dropdownHtml = ''; for (var i = 1; i <= pageCount; i++) { if (i == pageNumber) { @@ -488,7 +492,7 @@ var recordsEnd = Math.min(query.StartIndex + query.Limit, totalRecordCount); - html += isTop ? '
' : '
'; + html += '
'; html += ''; html += (query.StartIndex + 1) + '-' + recordsEnd + ' of ' + totalRecordCount + ', page ' + dropdownHtml + ' of ' + pageCount; @@ -920,7 +924,11 @@ renderPremiereDate: function (elem, item) { if (item.PremiereDate) { - elem.show().html('Premiered  ' + parseISO8601Date(item.PremiereDate, { toLocal: true }).toDateString()); + try { + elem.show().html('Premiered  ' + parseISO8601Date(item.PremiereDate, { toLocal: true }).toDateString()); + } catch (err) { + elem.hide(); + } } else { elem.hide(); } diff --git a/dashboard-ui/scripts/moviegenres.js b/dashboard-ui/scripts/moviegenres.js index 1470f5911b..0cdae7f4dd 100644 --- a/dashboard-ui/scripts/moviegenres.js +++ b/dashboard-ui/scripts/moviegenres.js @@ -22,9 +22,7 @@ var showPaging = result.TotalRecordCount > query.Limit; - if (showPaging) { - html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true); - } + $('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create'); html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, @@ -39,17 +37,17 @@ var elem = $('#items', page).html(html).trigger('create'); - $('select', elem).on('change', function () { + $('.selectPage', page).on('change', function () { query.StartIndex = (parseInt(this.value) - 1) * query.Limit; reloadItems(page); }); - $('.btnNextPage', elem).on('click', function () { + $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; reloadItems(page); }); - $('.btnPreviousPage', elem).on('click', function () { + $('.btnPreviousPage', page).on('click', function () { query.StartIndex -= query.Limit; reloadItems(page); }); diff --git a/dashboard-ui/scripts/moviepeople.js b/dashboard-ui/scripts/moviepeople.js index 2a54456333..c0e0170829 100644 --- a/dashboard-ui/scripts/moviepeople.js +++ b/dashboard-ui/scripts/moviepeople.js @@ -23,9 +23,7 @@ var showPaging = result.TotalRecordCount > query.Limit; - if (showPaging) { - html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true); - } + $('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create'); html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, @@ -40,17 +38,17 @@ var elem = $('#items', page).html(html).trigger('create'); - $('select', elem).on('change', function () { + $('.selectPage', page).on('change', function () { query.StartIndex = (parseInt(this.value) - 1) * query.Limit; reloadItems(page); }); - $('.btnNextPage', elem).on('click', function () { + $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; reloadItems(page); }); - $('.btnPreviousPage', elem).on('click', function () { + $('.btnPreviousPage', page).on('click', function () { query.StartIndex -= query.Limit; reloadItems(page); }); diff --git a/dashboard-ui/scripts/movies.js b/dashboard-ui/scripts/movies.js index 58bf15a599..2c1607c4af 100644 --- a/dashboard-ui/scripts/movies.js +++ b/dashboard-ui/scripts/movies.js @@ -24,9 +24,7 @@ var showPaging = result.TotalRecordCount > query.Limit; - if (showPaging) { - html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true); - } + $('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create'); if (view == "Backdrop") { html += LibraryBrowser.getPosterDetailViewHtml({ @@ -48,17 +46,17 @@ var elem = $('#items', page).html(html).trigger('create'); - $('select', elem).on('change', function () { + $('.selectPage', page).on('change', function () { query.StartIndex = (parseInt(this.value) - 1) * query.Limit; reloadItems(page); }); - $('.btnNextPage', elem).on('click', function () { + $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; reloadItems(page); }); - $('.btnPreviousPage', elem).on('click', function () { + $('.btnPreviousPage', page).on('click', function () { query.StartIndex -= query.Limit; reloadItems(page); }); diff --git a/dashboard-ui/scripts/moviestudios.js b/dashboard-ui/scripts/moviestudios.js index 39db92da87..678e519927 100644 --- a/dashboard-ui/scripts/moviestudios.js +++ b/dashboard-ui/scripts/moviestudios.js @@ -22,9 +22,7 @@ var showPaging = result.TotalRecordCount > query.Limit; - if (showPaging) { - html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true); - } + $('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create'); html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, @@ -39,17 +37,17 @@ var elem = $('#items', page).html(html).trigger('create'); - $('select', elem).on('change', function () { + $('.selectPage', page).on('change', function () { query.StartIndex = (parseInt(this.value) - 1) * query.Limit; reloadItems(page); }); - $('.btnNextPage', elem).on('click', function () { + $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; reloadItems(page); }); - $('.btnPreviousPage', elem).on('click', function () { + $('.btnPreviousPage', page).on('click', function () { query.StartIndex -= query.Limit; reloadItems(page); }); diff --git a/dashboard-ui/scripts/movietrailers.js b/dashboard-ui/scripts/movietrailers.js index 98f524b291..e9a69aad54 100644 --- a/dashboard-ui/scripts/movietrailers.js +++ b/dashboard-ui/scripts/movietrailers.js @@ -24,9 +24,7 @@ var showPaging = result.TotalRecordCount > query.Limit; - if (showPaging) { - html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true); - } + $('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create'); if (view == "Backdrop") { html += LibraryBrowser.getPosterDetailViewHtml({ @@ -48,17 +46,17 @@ var elem = $('#items', page).html(html).trigger('create'); - $('select', elem).on('change', function () { + $('.selectPage', page).on('change', function () { query.StartIndex = (parseInt(this.value) - 1) * query.Limit; reloadItems(page); }); - $('.btnNextPage', elem).on('click', function () { + $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; reloadItems(page); }); - $('.btnPreviousPage', elem).on('click', function () { + $('.btnPreviousPage', page).on('click', function () { query.StartIndex -= query.Limit; reloadItems(page); }); diff --git a/dashboard-ui/scripts/tvgenres.js b/dashboard-ui/scripts/tvgenres.js index d89e074cff..ad27c11b60 100644 --- a/dashboard-ui/scripts/tvgenres.js +++ b/dashboard-ui/scripts/tvgenres.js @@ -22,9 +22,7 @@ var showPaging = result.TotalRecordCount > query.Limit; - if (showPaging) { - html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true); - } + $('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create'); html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, @@ -39,17 +37,17 @@ var elem = $('#items', page).html(html).trigger('create'); - $('select', elem).on('change', function () { + $('.selectPage', page).on('change', function () { query.StartIndex = (parseInt(this.value) - 1) * query.Limit; reloadItems(page); }); - $('.btnNextPage', elem).on('click', function () { + $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; reloadItems(page); }); - $('.btnPreviousPage', elem).on('click', function () { + $('.btnPreviousPage', page).on('click', function () { query.StartIndex -= query.Limit; reloadItems(page); }); diff --git a/dashboard-ui/scripts/tvpeople.js b/dashboard-ui/scripts/tvpeople.js index 5ee9e23ff1..d025da91ca 100644 --- a/dashboard-ui/scripts/tvpeople.js +++ b/dashboard-ui/scripts/tvpeople.js @@ -23,9 +23,7 @@ var showPaging = result.TotalRecordCount > query.Limit; - if (showPaging) { - html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true); - } + $('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create'); html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, @@ -40,17 +38,17 @@ var elem = $('#items', page).html(html).trigger('create'); - $('select', elem).on('change', function () { + $('.selectPage', page).on('change', function () { query.StartIndex = (parseInt(this.value) - 1) * query.Limit; reloadItems(page); }); - $('.btnNextPage', elem).on('click', function () { + $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; reloadItems(page); }); - $('.btnPreviousPage', elem).on('click', function () { + $('.btnPreviousPage', page).on('click', function () { query.StartIndex -= query.Limit; reloadItems(page); }); diff --git a/dashboard-ui/scripts/tvshows.js b/dashboard-ui/scripts/tvshows.js index 4ee8e4f95a..7aef963af1 100644 --- a/dashboard-ui/scripts/tvshows.js +++ b/dashboard-ui/scripts/tvshows.js @@ -24,9 +24,7 @@ var showPaging = result.TotalRecordCount > query.Limit; - if (showPaging) { - html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true); - } + $('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create'); if (view == "Backdrop") { html += LibraryBrowser.getPosterDetailViewHtml({ @@ -48,17 +46,17 @@ var elem = $('#items', page).html(html).trigger('create'); - $('select', elem).on('change', function () { + $('.selectPage', page).on('change', function () { query.StartIndex = (parseInt(this.value) - 1) * query.Limit; reloadItems(page); }); - $('.btnNextPage', elem).on('click', function () { + $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; reloadItems(page); }); - $('.btnPreviousPage', elem).on('click', function () { + $('.btnPreviousPage', page).on('click', function () { query.StartIndex -= query.Limit; reloadItems(page); }); diff --git a/dashboard-ui/scripts/tvstudios.js b/dashboard-ui/scripts/tvstudios.js index 7916b867df..d668beacde 100644 --- a/dashboard-ui/scripts/tvstudios.js +++ b/dashboard-ui/scripts/tvstudios.js @@ -22,9 +22,7 @@ var showPaging = result.TotalRecordCount > query.Limit; - if (showPaging) { - html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true); - } + $('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create'); html += LibraryBrowser.getPosterDetailViewHtml({ items: result.Items, @@ -39,17 +37,17 @@ var elem = $('#items', page).html(html).trigger('create'); - $('select', elem).on('change', function () { + $('.selectPage', page).on('change', function () { query.StartIndex = (parseInt(this.value) - 1) * query.Limit; reloadItems(page); }); - $('.btnNextPage', elem).on('click', function () { + $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; reloadItems(page); }); - $('.btnPreviousPage', elem).on('click', function () { + $('.btnPreviousPage', page).on('click', function () { query.StartIndex -= query.Limit; reloadItems(page); }); diff --git a/dashboard-ui/tvgenres.html b/dashboard-ui/tvgenres.html index 2c303db4de..72babaa9e5 100644 --- a/dashboard-ui/tvgenres.html +++ b/dashboard-ui/tvgenres.html @@ -16,8 +16,12 @@ Networks
- - +
+ + +
+
+
diff --git a/dashboard-ui/tvpeople.html b/dashboard-ui/tvpeople.html index 884e3b956f..c38478c480 100644 --- a/dashboard-ui/tvpeople.html +++ b/dashboard-ui/tvpeople.html @@ -16,8 +16,12 @@ Networks
- - +
+ + +
+
+
diff --git a/dashboard-ui/tvshows.html b/dashboard-ui/tvshows.html index 150f88b301..a9a43d879d 100644 --- a/dashboard-ui/tvshows.html +++ b/dashboard-ui/tvshows.html @@ -16,14 +16,18 @@ Networks
-
- +
+
+ +
+ + +
+
- -
diff --git a/dashboard-ui/tvstudios.html b/dashboard-ui/tvstudios.html index ea761ec124..9c3c2ab2ad 100644 --- a/dashboard-ui/tvstudios.html +++ b/dashboard-ui/tvstudios.html @@ -16,8 +16,12 @@ Networks
- - +
+ + +
+
+