diff --git a/dashboard-ui/css/images/items/detail/audio.png b/dashboard-ui/css/images/items/detail/audio.png index 52fc10f53c..dfe3fe69c5 100644 Binary files a/dashboard-ui/css/images/items/detail/audio.png and b/dashboard-ui/css/images/items/detail/audio.png differ diff --git a/dashboard-ui/css/images/items/detail/game.png b/dashboard-ui/css/images/items/detail/game.png index 4f98ea07f5..e079184657 100644 Binary files a/dashboard-ui/css/images/items/detail/game.png and b/dashboard-ui/css/images/items/detail/game.png differ diff --git a/dashboard-ui/css/images/items/detail/person.png b/dashboard-ui/css/images/items/detail/person.png index d3073357b9..89980f0b38 100644 Binary files a/dashboard-ui/css/images/items/detail/person.png and b/dashboard-ui/css/images/items/detail/person.png differ diff --git a/dashboard-ui/css/images/items/detail/tv.png b/dashboard-ui/css/images/items/detail/tv.png index a39bdc52ff..e32fc7f666 100644 Binary files a/dashboard-ui/css/images/items/detail/tv.png and b/dashboard-ui/css/images/items/detail/tv.png differ diff --git a/dashboard-ui/css/images/items/detail/video.png b/dashboard-ui/css/images/items/detail/video.png index a035e38351..cf2f8836e6 100644 Binary files a/dashboard-ui/css/images/items/detail/video.png and b/dashboard-ui/css/images/items/detail/video.png differ diff --git a/dashboard-ui/css/images/items/folders/books.png b/dashboard-ui/css/images/items/folders/books.png deleted file mode 100644 index a8c3b7916f..0000000000 Binary files a/dashboard-ui/css/images/items/folders/books.png and /dev/null differ diff --git a/dashboard-ui/css/images/items/folders/channels.png b/dashboard-ui/css/images/items/folders/channels.png deleted file mode 100644 index b8d7392726..0000000000 Binary files a/dashboard-ui/css/images/items/folders/channels.png and /dev/null differ diff --git a/dashboard-ui/css/images/items/folders/folder.png b/dashboard-ui/css/images/items/folders/folder.png deleted file mode 100644 index 6aa970f1ff..0000000000 Binary files a/dashboard-ui/css/images/items/folders/folder.png and /dev/null differ diff --git a/dashboard-ui/css/images/items/folders/games.png b/dashboard-ui/css/images/items/folders/games.png deleted file mode 100644 index 34fd42aa26..0000000000 Binary files a/dashboard-ui/css/images/items/folders/games.png and /dev/null differ diff --git a/dashboard-ui/css/images/items/folders/home.png b/dashboard-ui/css/images/items/folders/home.png deleted file mode 100644 index c1295ea443..0000000000 Binary files a/dashboard-ui/css/images/items/folders/home.png and /dev/null differ diff --git a/dashboard-ui/css/images/items/folders/homevideos.png b/dashboard-ui/css/images/items/folders/homevideos.png deleted file mode 100644 index 46a3f3f086..0000000000 Binary files a/dashboard-ui/css/images/items/folders/homevideos.png and /dev/null differ diff --git a/dashboard-ui/css/images/items/folders/movies.png b/dashboard-ui/css/images/items/folders/movies.png deleted file mode 100644 index 2a999490ed..0000000000 Binary files a/dashboard-ui/css/images/items/folders/movies.png and /dev/null differ diff --git a/dashboard-ui/css/images/items/folders/music.png b/dashboard-ui/css/images/items/folders/music.png deleted file mode 100644 index 44702ba825..0000000000 Binary files a/dashboard-ui/css/images/items/folders/music.png and /dev/null differ diff --git a/dashboard-ui/css/images/items/folders/musicvideos.png b/dashboard-ui/css/images/items/folders/musicvideos.png deleted file mode 100644 index a5c6251766..0000000000 Binary files a/dashboard-ui/css/images/items/folders/musicvideos.png and /dev/null differ diff --git a/dashboard-ui/css/images/items/folders/photos.png b/dashboard-ui/css/images/items/folders/photos.png deleted file mode 100644 index ea98e5e430..0000000000 Binary files a/dashboard-ui/css/images/items/folders/photos.png and /dev/null differ diff --git a/dashboard-ui/css/images/items/folders/tv.png b/dashboard-ui/css/images/items/folders/tv.png deleted file mode 100644 index c6b26beb97..0000000000 Binary files a/dashboard-ui/css/images/items/folders/tv.png and /dev/null differ diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 39982bac4d..465c3c185c 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -50,13 +50,8 @@ @media all and (max-width: 1200px) { .libraryPage > .ui-content { - padding-left: .4em !important; - padding-right: .4em !important; - } - - .detailSection { - margin-left: .25em; - margin-right: .25em; + padding-left: .5em !important; + padding-right: .5em !important; } } @@ -140,10 +135,14 @@ } .detailButtonsContainer { - padding: .35em 0 .35em; + padding: 0 0 .5em; text-align: center; } + .detailButtonsContainer a, .detailButtonsContainer button { + margin-top: 0; + } + .viewSettings { margin: 0 0 .25em; text-align: center; @@ -260,7 +259,7 @@ display: inline-block; font-size: 12px; text-align: center; - padding: 2px 4px; + padding: 1px 6px 0; border-radius: 2px; } @@ -371,7 +370,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { background-size: cover; background-position: center 15%; background-repeat: no-repeat; - height: 600px; + height: 500px; position: relative; } @@ -384,14 +383,11 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { } .noBackdrop { - height: auto; - border: 0; + height: 260px; } .noBackdrop .itemBackdropContent { background-color: transparent; - position: static; - margin-top: 1em; } .lnkSibling { @@ -410,12 +406,10 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { text-decoration: underline; } -@media all and (max-width: 1000px) { - - .lnkSibling { - display: none !important; + .lnkSibling:not(.hide) { + display: block; } -} + .lnkPreviousItem { left: 10px; @@ -425,19 +419,34 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { right: 0; } +.detailImageContainer { + position: absolute; +} + +.detailImageContainer { + top: -66px; +} + .itemDetailImage { - max-height: 280px; - max-width: 320px; -moz-box-shadow: 0px 0 20px #000; -webkit-box-shadow: 0px 0 20px #000; box-shadow: 0px 0 20px #000; border: solid 1px #222; - margin-top: -20px; - margin-bottom: 10px; } -.noBackdrop .itemDetailImage { - margin-top: 0; +.thumbDetailImage { + max-width: 360px; + max-height: 360px; +} + +.squareDetailImage { + max-width: 240px; + max-height: 240px; +} + +.portraitDetailImage { + max-width: 240px; + max-height: 360px; } .itemDetailGalleryLink img:hover { @@ -446,9 +455,31 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { box-shadow: 0 0 20px 3px #38c; } -.itemByNameImageContainer .itemDetailImage { - margin: 0 !important; - max-height: 220px; +.detailContentEffectedByThumbImage:not(.lastDetailContentEffectedByImage) { + margin-left: 380px; +} + +.detailContentEffectedBySquareImage:not(.lastDetailContentEffectedByImage) { + margin-left: 260px; +} + +.detailContentEffectedByPortraitImage { + margin-left: 260px; +} + +.detailContentEffectedByImage a { +} + +.lastDetailContentEffectedByImage.detailContentEffectedByThumbImage { + padding: 0 .5em; +} + +.lastDetailContentEffectedByImage.detailContentEffectedBySquareImage { + padding: 0 .5em; +} + +.lastDetailContentEffectedByImage.detailContentEffectedByPortraitImage { + min-height: 140px; } .parentName { @@ -457,6 +488,57 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { margin-bottom: .5em; } +@media all and (min-width: 800px) { + .lastDetailContentEffectedByImage.detailContentEffectedBySquareImage { + margin-top: 2em; + } +} + +@media all and (max-width: 1000px) { + .detailImageContainer { + margin-left: 20px; + } + + .thumbDetailImage { + max-width: 340px; + } + + .squareDetailImage { + max-width: 220px; + } + + .portraitDetailImage { + max-width: 220px; + } + + .lastDetailContentEffectedByImage.detailContentEffectedByPortraitImage { + min-height: 110px; + } +} + +@media all and (max-width: 800px) { + .detailContentEffectedByThumbImage { + margin-left: 0 !important; + padding: 0 1em; + } + + .detailContentEffectedBySquareImage { + margin-left: 0 !important; + padding: 0 1em; + } + + .detailContentEffectedByPortraitImage { + margin-left: 0 !important; + padding: 0 1em; + } + + + + .parentName { + margin-bottom: 1em; + } +} + .inlineItemName { font-size: 22px; } @@ -609,7 +691,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { .detailImageProgressContainer { position: absolute; - bottom: 10px; + bottom: 3px; right: 0; left: 0; text-align: center; @@ -642,19 +724,13 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { display: none; } - .itemBackdrop { - height: auto; - } - - .itemBackdropContent { - position: static; - padding: 1em 1em .5em; + .itemBackdrop:not(.noBackdrop) { + height: 280px; } .itemDetailImage { max-height: 240px; max-width: 100px; - margin-top: 0; } .mobileOverview:not(.hide), .mobileGenres, .mobileDetailButtons { @@ -669,34 +745,28 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { font-size: 18px; } - .inlineItemName + .itemMiscInfo { - margin-left: 0 !important; - margin-top: 1em; - display: block !important; - } - - .primaryDetailPageContent .userDataIcons { - margin-left: 0 !important; - margin-top: 1em; - display: block; - } -} - - -@media all and (min-width: 750px) { - - .lnkSibling:not(.hide) { - display: block; + .primaryDetailPageContent p { + margin: 1em 0 !important; } - .itemBackdrop:not(.noBackdrop) { - border-bottom: 1px solid #111; + .backdropDetailPageContent { + text-align: center; + } + + .detailImageContainer { + display: none; + } + + .noBackdrop .detailImageContainer { + display: block; + position: static; + text-align: center; } } @media all and (min-width: 750px) { .detailPageContent { - max-width: 900px; + max-width: 1000px; width: auto; } } @@ -1312,3 +1382,27 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { margin-right: 1em; } } + +.smallDetailImageContainer img { + -moz-box-shadow: 0px 0 20px #000; + -webkit-box-shadow: 0px 0 20px #000; + box-shadow: 0px 0 20px #000; + border: solid 1px #222; + max-width: 240px; + max-height: 240px; +} + +@media all and (max-width: 800px) { + + .smallDetailImageContainer img { + max-width: 120px; + max-height: 120px; + } +} + +@media all and (max-width: 1000px) { + + .smallDetailImageContainer { + padding-left: 1em; + } +} diff --git a/dashboard-ui/css/librarymenu.css b/dashboard-ui/css/librarymenu.css index 6be6586c81..f054ff7405 100644 --- a/dashboard-ui/css/librarymenu.css +++ b/dashboard-ui/css/librarymenu.css @@ -186,10 +186,6 @@ color: #fff !important; } -.musicViewMenu { - background-image: url(images/items/folders/music.png); -} - .homeViewMenu { background-image: url(images/mblogoicon.png) !important; background-size: 39px 26px !important; diff --git a/dashboard-ui/css/materialize.css b/dashboard-ui/css/materialize.css index f434d7a007..f746c53f3b 100644 --- a/dashboard-ui/css/materialize.css +++ b/dashboard-ui/css/materialize.css @@ -123,9 +123,13 @@ padding: 1em 2em; } - .btn-large i { - font-size: 1.6rem; - } +.btn.btn-inline { + padding: .6em 1.25em .6em 34px; +} + +.btn-large i { + font-size: 1.6rem; +} .btn-floating-large i { font-size: 1.6rem; @@ -155,6 +159,10 @@ font-family: Roboto !important; } +.btnSmall { + font-size: 13px; +} + .btnCancel { background-color: #444; } @@ -172,6 +180,7 @@ display: inline-block; width: auto; margin-bottom: 0; + padding: .6em .5em .6em .5em!important; } button.btn:not(.btn-inline), button.btn-large:not(.btn-inline) { @@ -182,7 +191,7 @@ button.btn:not(.btn-inline), button.btn-large:not(.btn-inline) { vertical-align: middle; } -.btn i { +.btn:not(.btn-inline):not(.btnNoText) i { position: absolute; left: 10px; } @@ -192,3 +201,11 @@ button.btn:not(.btn-inline), button.btn-large:not(.btn-inline) { left: 24px; top: 22px; } + +.btnNoText { + padding: .6em .5em!important; +} + +.btnNoText { + border-radius: 5px; +} \ No newline at end of file diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index b3614fadad..6549e3b4f1 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -1001,11 +1001,12 @@ progress { .accentButton { display: inline-block; - background: rgba(51, 136, 204, .8); + background: rgba(51, 136, 204, .9); border-radius: 1000px; padding: 4px 10px; color: #fff !important; - font-weight: normal !important; + font-size: 13px; + font-weight: 400 !important; text-decoration: none; vertical-align: middle; border: 0; diff --git a/dashboard-ui/css/tileitem.css b/dashboard-ui/css/tileitem.css index cf448a87c1..725a6cda6e 100644 --- a/dashboard-ui/css/tileitem.css +++ b/dashboard-ui/css/tileitem.css @@ -415,14 +415,6 @@ position: relative; } -.posterItemDefaultText { - position: absolute; - top: 30%; - left: 0; - right: 0; - text-align: center; -} - .myLibraryPosterItem { width: 42%; min-width: 50px; @@ -436,12 +428,17 @@ background-color: rgba(82, 181, 75, 0.7); } - .myLibraryPosterItem .posterItemDefaultText { + .myLibraryPosterItem .posterItemText { top: 0; left: 0; line-height: 34px; text-align: left; - padding: 0 0 0 34px; + padding: 0 0 0 12px; + position: absolute; + } + + .myLibraryPosterItem i { + margin-right: 10px; } .moviesPosterItem .posterItemImage, .trailersPosterItem .posterItemImage { @@ -479,6 +476,7 @@ .musicvideosPosterItem .posterItemImage { background-color: rgba(143, 54, 168, 0.7); } + @media all and (min-width: 600px) { .myLibraryPosterItem { @@ -487,6 +485,7 @@ min-width: 160px; } } + @media all and (min-width: 1000px) { .myLibraryPosterItem { @@ -494,4 +493,4 @@ /* Specify a min width just in case the container doesn't have a width */ min-width: 220px; } -} \ No newline at end of file +} diff --git a/dashboard-ui/itembynamedetails.html b/dashboard-ui/itembynamedetails.html index 79e4bcb73f..c571139772 100644 --- a/dashboard-ui/itembynamedetails.html +++ b/dashboard-ui/itembynamedetails.html @@ -123,7 +123,7 @@
-
+

diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html index c6523db5f9..8c48744bd3 100644 --- a/dashboard-ui/itemdetails.html +++ b/dashboard-ui/itemdetails.html @@ -109,56 +109,36 @@
- - - - - -
-
-
-
-
-
-

-

- - -

-

-

-

-
- - - - - ${ButtonPlayTrailer} - ${ButtonPlay} - ${ButtonSync} - -
-
-
- - - - - ${ButtonPlayTrailer} - ${ButtonPlay} - ${ButtonSync} - + +
+ +
+
+ +
+

+

+ + +

+ +
+ + + + + ${ButtonPlayTrailer} + ${ButtonPlay} + ${ButtonSync} + +
+
-

-

+
${ButtonPrevious} ${ButtonNext} @@ -166,7 +146,29 @@
-
+
+
+ +
+ + + + + ${ButtonPlayTrailer} + ${ButtonPlay} + ${ButtonSync} + +
+

+

+

+

+
+
@@ -188,21 +190,19 @@
-
-
-

${HeaderDetails}

-
-
-

-

-

-

- - -

-

-

-
+
+
+ ${HeaderDetails} +
+
+
+

+

+

+ +

+

+

diff --git a/dashboard-ui/livetvprogram.html b/dashboard-ui/livetvprogram.html index 78581db637..3603ac3242 100644 --- a/dashboard-ui/livetvprogram.html +++ b/dashboard-ui/livetvprogram.html @@ -13,8 +13,8 @@ ${TabScheduled} ${TabSeries}
-
-
+
+
diff --git a/dashboard-ui/scripts/indexpage.js b/dashboard-ui/scripts/indexpage.js index a3d572b7c3..3afa2743c5 100644 --- a/dashboard-ui/scripts/indexpage.js +++ b/dashboard-ui/scripts/indexpage.js @@ -25,42 +25,42 @@ var item = items[i]; - var imgUrl; + var icon; switch (item.CollectionType) { case "movies": - imgUrl = "css/images/items/folders/movies.png"; + icon = "fa-film"; break; case "music": - imgUrl = "css/images/items/folders/music.png"; + icon = "fa-music"; break; case "photos": - imgUrl = "css/images/items/folders/photos.png"; + icon = "fa-photo"; break; case "livetv": case "tvshows": - imgUrl = "css/images/items/folders/tv.png"; + icon = "fa-video-camera"; break; case "games": - imgUrl = "css/images/items/folders/games.png"; + icon = "fa-gamepad"; break; case "trailers": - imgUrl = "css/images/items/folders/movies.png"; + icon = "fa-film"; break; case "homevideos": - imgUrl = "css/images/items/folders/homevideos.png"; + icon = "fa-video-camera"; break; case "musicvideos": - imgUrl = "css/images/items/folders/musicvideos.png"; + icon = "fa-video-camera"; break; case "books": - imgUrl = "css/images/items/folders/books.png"; + icon = "fa-book"; break; case "channels": - imgUrl = "css/images/items/folders/channels.png"; + icon = "fa-video-camera"; break; default: - imgUrl = "css/images/items/folders/folder.png"; + icon = "fa-folder-o"; break; } @@ -75,14 +75,13 @@ html += ''; - var style = 'background-image:url(\'' + imgUrl + '\');'; - var imageCssClass = ''; - html += '
'; + html += '
'; html += '
'; html += "
"; + html += ''; html += item.Name; html += "
"; diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index 3c1e4e6b12..8fdb35098e 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -146,7 +146,7 @@ var imageHref = user.Policy.IsAdministrator && item.MediaType != 'Photo' ? "edititemimages.html?id=" + item.Id : ""; - $('#itemImage', page).html(LibraryBrowser.getDetailImageHtml(item, imageHref)); + LibraryBrowser.renderDetailImage($('.detailImageContainer', page), item, imageHref); } function onWebSocketMessage(e, data) { diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 64e4528c5d..3029016714 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -299,6 +299,10 @@ var commands = []; + if (BoxSetEditor.supportsAddingToCollection(item)) { + commands.push('addtocollection'); + } + if (PlaylistManager.supportsPlaylists(item)) { commands.push('playlist'); } @@ -377,6 +381,10 @@ html += '
    '; html += '
  • ' + Globalize.translate('HeaderMenu') + '
  • '; + if (commands.indexOf('addtocollection') != -1) { + html += '
  • ' + Globalize.translate('ButtonAddToCollection') + '
  • '; + } + if (commands.indexOf('playlist') != -1) { html += '
  • ' + Globalize.translate('ButtonAddToPlaylist') + '
  • '; } @@ -2118,13 +2126,13 @@ var url; - var imageHeight = 280; + var imageHeight = 360; if (preferThumb && imageTags.Thumb) { url = ApiClient.getScaledImageUrl(item.Id, { type: "Thumb", - maxHeight: imageHeight, + height: imageHeight, tag: item.ImageTags.Thumb }); } @@ -2132,7 +2140,7 @@ url = ApiClient.getScaledImageUrl(item.Id, { type: "Primary", - maxHeight: imageHeight, + height: imageHeight, tag: item.ImageTags.Primary }); } @@ -2140,7 +2148,7 @@ url = ApiClient.getScaledImageUrl(item.Id, { type: "Backdrop", - maxHeight: imageHeight, + height: imageHeight, tag: item.BackdropImageTags[0] }); } @@ -2148,7 +2156,7 @@ url = ApiClient.getScaledImageUrl(item.Id, { type: "Thumb", - maxHeight: imageHeight, + height: imageHeight, tag: item.ImageTags.Thumb }); } @@ -2156,7 +2164,7 @@ url = ApiClient.getScaledImageUrl(item.Id, { type: "Disc", - maxHeight: imageHeight, + height: imageHeight, tag: item.ImageTags.Disc }); } @@ -2164,7 +2172,7 @@ url = ApiClient.getScaledImageUrl(item.AlbumId, { type: "Primary", - maxHeight: imageHeight, + height: imageHeight, tag: item.AlbumPrimaryImageTag }); @@ -2218,6 +2226,175 @@ return html; }, + renderDetailImage: function (elem, item, href, preferThumb) { + + var imageTags = item.ImageTags || {}; + + if (item.PrimaryImageTag) { + imageTags.Primary = item.PrimaryImageTag; + } + + var html = ''; + + var url; + var shape = 'portrait'; + + var imageHeight = 360; + var detectRatio = false; + + if (preferThumb && imageTags.Thumb) { + + url = ApiClient.getScaledImageUrl(item.Id, { + type: "Thumb", + height: imageHeight, + tag: item.ImageTags.Thumb + }); + shape = 'thumb'; + } + else if (imageTags.Primary) { + + url = ApiClient.getScaledImageUrl(item.Id, { + type: "Primary", + height: imageHeight, + tag: item.ImageTags.Primary + }); + detectRatio = true; + } + else if (item.BackdropImageTags && item.BackdropImageTags.length) { + + url = ApiClient.getScaledImageUrl(item.Id, { + type: "Backdrop", + height: imageHeight, + tag: item.BackdropImageTags[0] + }); + shape = 'thumb'; + } + else if (imageTags.Thumb) { + + url = ApiClient.getScaledImageUrl(item.Id, { + type: "Thumb", + height: imageHeight, + tag: item.ImageTags.Thumb + }); + shape = 'thumb'; + } + else if (imageTags.Disc) { + + url = ApiClient.getScaledImageUrl(item.Id, { + type: "Disc", + height: imageHeight, + tag: item.ImageTags.Disc + }); + shape = 'square'; + } + else if (item.AlbumId && item.AlbumPrimaryImageTag) { + + url = ApiClient.getScaledImageUrl(item.AlbumId, { + type: "Primary", + height: imageHeight, + tag: item.AlbumPrimaryImageTag + }); + shape = 'square'; + } + else if (item.MediaType == "Audio" || item.Type == "MusicAlbum" || item.Type == "MusicGenre") { + url = "css/images/items/detail/audio.png"; + shape = 'square'; + } + else if (item.MediaType == "Game" || item.Type == "GameGenre") { + url = "css/images/items/detail/game.png"; + shape = 'square'; + } + else if (item.Type == "Person") { + url = "css/images/items/detail/person.png"; + shape = 'square'; + } + else if (item.Type == "Genre" || item.Type == "Studio") { + url = "css/images/items/detail/video.png"; + shape = 'square'; + } + else if (item.Type == "TvChannel") { + url = "css/images/items/detail/tv.png"; + shape = 'square'; + } + else { + url = "css/images/items/detail/video.png"; + shape = 'square'; + } + + if (!href) { + href = "itemgallery.html?id=" + item.Id; + } + + var linkToGallery = LibraryBrowser.shouldDisplayGallery(item); + + html += '
    '; + if (linkToGallery) { + html += ""; + } + + if (detectRatio && item.PrimaryImageAspectRatio) { + + if (Math.abs(item.PrimaryImageAspectRatio - 1.777777778) < .3) { + shape = 'thumb'; + } else if (Math.abs(item.PrimaryImageAspectRatio - 1) < .2) { + shape = 'square'; + } + } + + var imgCssClass = 'itemDetailImage'; + if (shape == 'thumb') { + imgCssClass += ' thumbDetailImage'; + } + else if (shape == 'square') { + imgCssClass += ' squareDetailImage'; + } else { + imgCssClass += ' portraitDetailImage'; + } + + html += ""; + + if (linkToGallery) { + html += ""; + } + + var progressHtml = item.IsFolder ? '' : LibraryBrowser.getItemProgressBarHtml((item.Type == 'Recording' ? item : item.UserData)); + + if (progressHtml) { + html += '
    '; + html += progressHtml; + html += "
    "; + } + + html += "
    "; + + elem.html(html); + + var page = $(elem).parents('.page'); + + var detailContentEffectedByImage = $('.detailContentEffectedByImage', page); + + if (shape == 'thumb') { + detailContentEffectedByImage.addClass('detailContentEffectedByThumbImage'); + detailContentEffectedByImage.removeClass('detailContentEffectedBySquareImage'); + detailContentEffectedByImage.removeClass('detailContentEffectedByPortraitImage'); + + detailContentEffectedByImage.addClass('detailContentEffectedByThumbImage'); + detailContentEffectedByImage.removeClass('detailContentEffectedBySquareImage'); + detailContentEffectedByImage.removeClass('detailContentEffectedByPortraitImage'); + } + else if (shape == 'square') { + detailContentEffectedByImage.removeClass('detailContentEffectedByThumbImage'); + detailContentEffectedByImage.addClass('detailContentEffectedBySquareImage'); + detailContentEffectedByImage.removeClass('detailContentEffectedByPortraitImage'); + + } else { + detailContentEffectedByImage.removeClass('detailContentEffectedByThumbImage'); + detailContentEffectedByImage.removeClass('detailContentEffectedBySquareImage'); + detailContentEffectedByImage.addClass('detailContentEffectedByPortraitImage'); + + } + }, + getMiscInfoHtml: function (item) { var miscInfo = []; diff --git a/dashboard-ui/scripts/sync.js b/dashboard-ui/scripts/sync.js index ea47643e1c..af9b7ca082 100644 --- a/dashboard-ui/scripts/sync.js +++ b/dashboard-ui/scripts/sync.js @@ -27,7 +27,7 @@ userId: userId, TargetId: target, - Quality: $('#selectQuality', form).val(), + Quality: $('#selectQuality', form).val() || null, Name: $('#txtSyncJobName', form).val(), @@ -108,14 +108,16 @@ html += '
    '; - html += '
    '; - html += ''; - html += ''; - html += '
    '; + if (result.Options.indexOf('Quality') != -1) { + html += '
    '; + html += ''; + html += ''; + html += '
    '; + } //html += '
    '; //html += '

    ' + Globalize.translate('HeaderSettings') + '

    ';