diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 5a5ef76b69..165cde40bd 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -525,14 +525,14 @@ a.itemTag:hover { margin-top: 0; } -.detailPageCollabsible .ui-collapsible-heading a { - background-color: #141414 !important; - font-size: 16px; - font-weight: 400 !important; - border-radius: 4px; - padding-top: .75em; - padding-bottom: .75em; -} + .detailPageCollabsible .ui-collapsible-heading a { + background-color: #141414 !important; + font-size: 16px; + font-weight: 400 !important; + border-radius: 4px; + padding-top: .75em; + padding-bottom: .75em; + } .detailSectionHeader { background-clip: border-box; diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html index 235a422aa0..d033080dd2 100644 --- a/dashboard-ui/itemdetails.html +++ b/dashboard-ui/itemdetails.html @@ -216,12 +216,12 @@ -
-
-

${HeaderPhotoInfo}

-
-
-
+
+
+ ${HeaderPhotoInfo} +
+
+
diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index ec34647ccb..eda0acd3de 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -507,7 +507,7 @@ $('.lnkSibling', page).addClass('hide'); - if ((item.Type != "Episode" && item.Type != "Season" && item.Type != "Audio") || item.IndexNumber == null) { + if ((item.Type != "Episode" && item.Type != "Season" && item.Type != "Audio" && item.Type != "Photo")) { return; } @@ -534,7 +534,8 @@ } else { promise = ApiClient.getItems(Dashboard.getCurrentUserId(), { AdjacentTo: item.Id, - ParentId: item.ParentId + ParentId: item.ParentId, + SortBy: 'SortName' }); } @@ -542,19 +543,20 @@ promise.done(function (result) { + var foundExisting = false; + for (var i = 0, length = result.Items.length; i < length; i++) { var curr = result.Items[i]; - if (curr.IndexNumber == null) { - continue; + if (curr.Id == item.Id) { + foundExisting = true; } - - if (curr.IndexNumber < item.IndexNumber) { + else if (!foundExisting) { $('.lnkPreviousItem', page).removeClass('hide').attr('href', 'itemdetails.html?id=' + curr.Id + '&context=' + context); } - else if (curr.IndexNumber > item.IndexNumber) { + else { $('.lnkNextItem', page).removeClass('hide').attr('href', 'itemdetails.html?id=' + curr.Id + '&context=' + context); }