diff --git a/dashboard-ui/css/images/userdata/heart_off.png b/dashboard-ui/css/images/userdata/heart_off.png index 5c39dd323e..404214b1d0 100644 Binary files a/dashboard-ui/css/images/userdata/heart_off.png and b/dashboard-ui/css/images/userdata/heart_off.png differ diff --git a/dashboard-ui/css/images/userdata/heart_on.png b/dashboard-ui/css/images/userdata/heart_on.png index 8cc2cae873..9f9b0ecdb0 100644 Binary files a/dashboard-ui/css/images/userdata/heart_on.png and b/dashboard-ui/css/images/userdata/heart_on.png differ diff --git a/dashboard-ui/css/images/userdata/thumbs_down_off.png b/dashboard-ui/css/images/userdata/thumbs_down_off.png index 2627f0e2c6..94a6b5b9fe 100644 Binary files a/dashboard-ui/css/images/userdata/thumbs_down_off.png and b/dashboard-ui/css/images/userdata/thumbs_down_off.png differ diff --git a/dashboard-ui/css/images/userdata/thumbs_down_on.png b/dashboard-ui/css/images/userdata/thumbs_down_on.png index 38d6ff3c0c..29fe94a5a0 100644 Binary files a/dashboard-ui/css/images/userdata/thumbs_down_on.png and b/dashboard-ui/css/images/userdata/thumbs_down_on.png differ diff --git a/dashboard-ui/css/images/userdata/thumbs_up_off.png b/dashboard-ui/css/images/userdata/thumbs_up_off.png index 932a8bfb8f..5c8883d935 100644 Binary files a/dashboard-ui/css/images/userdata/thumbs_up_off.png and b/dashboard-ui/css/images/userdata/thumbs_up_off.png differ diff --git a/dashboard-ui/css/images/userdata/thumbs_up_on.png b/dashboard-ui/css/images/userdata/thumbs_up_on.png index 96b244c54a..1d5a267b48 100644 Binary files a/dashboard-ui/css/images/userdata/thumbs_up_on.png and b/dashboard-ui/css/images/userdata/thumbs_up_on.png differ diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 1de5bfd233..f10f2c8ffa 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -750,6 +750,16 @@ progress { background-position: right center; } +.imgUserItemRating { + height: 24px; + margin-right: 1em; + cursor: pointer; +} + +.imgUserItemRating:hover { + opacity: .5; +} + @media all and (min-width: 650px) { .itemImageBlock { display: inline-block; @@ -822,13 +832,20 @@ progress { position: relative; width: 270px; } + #nowPlayingBar #mediaInfo, #nowPlayingBar #mediaInfo div { margin-left: 10px; display: inline-block; } -#nowPlayingBar #mediaInfo {display:none;} + +#nowPlayingBar #mediaInfo { + display: none; +} + @media all and (min-width: 650px) { - #nowPlayingBar #mediaInfo {display:inline-block;} + #nowPlayingBar #mediaInfo { + display: inline-block; + } } .mediaButton img { @@ -855,10 +872,10 @@ progress { width: auto !important; } -.vjs-quality-button div { - width: auto !important; - background: none !important; -} + .vjs-quality-button div { + width: auto !important; + background: none !important; + } .vjs-chapter-button div { background-position: -100px -75px !important; @@ -870,26 +887,27 @@ progress { overflow-y: scroll; } -.vjs-chapter-button.vjs-menu-button ul li { - width: auto; - white-space: nowrap; - font-size: 1.1em; - padding-right: 10px; -} + .vjs-chapter-button.vjs-menu-button ul li { + width: auto; + white-space: nowrap; + font-size: 1.1em; + padding-right: 10px; + } .vjs-default-skin .vjs-menu-button.vjs-stop-button { float: left; background: none; border: 0; } -.vjs-default-skin .vjs-menu-button.vjs-stop-button div { - background: url("images/media/stop.png"); - height: 26px; - width: 26px; - margin: -.7em .5em auto 0; -} + + .vjs-default-skin .vjs-menu-button.vjs-stop-button div { + background: url("images/media/stop.png"); + height: 26px; + width: 26px; + margin: -.7em .5em auto 0; + } #itemFav img { width: 64px; cursor: pointer; -} \ No newline at end of file +} diff --git a/dashboard-ui/index.html b/dashboard-ui/index.html index 8292bd5a79..d1d9cbf7ee 100644 --- a/dashboard-ui/index.html +++ b/dashboard-ui/index.html @@ -18,12 +18,12 @@
-

My Library +

My Library

-

Collections +

Collections

diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html index c9abca968f..8e32c04dc4 100644 --- a/dashboard-ui/itemdetails.html +++ b/dashboard-ui/itemdetails.html @@ -34,6 +34,9 @@

+ +

+

diff --git a/dashboard-ui/scripts/Itemdetailpage.js b/dashboard-ui/scripts/Itemdetailpage.js index 9a8175118e..1fe81667ff 100644 --- a/dashboard-ui/scripts/Itemdetailpage.js +++ b/dashboard-ui/scripts/Itemdetailpage.js @@ -57,7 +57,7 @@ if (!item.MediaStreams || !item.MediaStreams.length) { $('#mediaInfoCollapsible', page).hide(); - }else { + } else { $('#mediaInfoCollapsible', page).show(); } if (!item.Chapters || !item.Chapters.length) { @@ -173,8 +173,8 @@ var overview = item.OverviewHtml || item.Overview; $('#itemOverview', page).html(overview).show(); - $('#itemOverview a').each(function(){ - $(this).attr("target","_blank"); + $('#itemOverview a').each(function () { + $(this).attr("target", "_blank"); }); } else { $('#itemOverview', page).hide(); @@ -242,7 +242,7 @@ html += '  /  '; } - html += '' + item.Genres[i] + ''; + html += '' + item.Genres[i] + ''; } elem.html(html).trigger('create'); @@ -268,7 +268,7 @@ html += '  /  '; } - html += '' + item.Studios[i] + ''; + html += '' + item.Studios[i] + ''; } elem.html(html).trigger('create'); @@ -484,31 +484,31 @@ html += ''; html += '' + type + ''; - html += '' + stream.Codec +''; + html += '' + stream.Codec + ''; if (stream.Language) { hasLanguage = true; - html += '' + stream.Language +''; + html += '' + stream.Language + ''; } else html += ''; if (stream.Type == "Video") { - html += ''+ stream.Width +'/'+ stream.Height +' ('+ stream.AspectRatio +')'; - }else { + html += '' + stream.Width + '/' + stream.Height + ' (' + stream.AspectRatio + ')'; + } else { html += ''; } if (stream.Channels) { - html += ''+ stream.Channels +'ch '+ stream.SampleRate +' khz'; - }else { + html += '' + stream.Channels + 'ch ' + stream.SampleRate + ' khz'; + } else { html += ''; } - html += '' + stream.BitRate +''; + html += '' + stream.BitRate + ''; if (stream.Type == "Video") { var framerate = stream.AverageFrameRate || stream.RealFrameRate; - html += ''+ framerate +''; - }else { + html += '' + framerate + ''; + } else { html += ''; } @@ -564,7 +564,7 @@ html += ''; var imageTags = trailer.ImageTags || {}; - + if (imageTags.Primary) { var imgUrl = ApiClient.getImageUrl(trailer.Id, { @@ -687,7 +687,7 @@ var cast = casts[i]; var role = cast.Role || cast.Type; - html += ''; + html += ''; html += '
'; if (cast.PrimaryImageTag) { @@ -717,29 +717,33 @@ var html = ''; var page = $.mobile.activePage; - if (typeof(item.UserData.Likes) == "undefined") { - html += 'Set Did Not Like'; - html += 'Set Liked'; - } else if (item.UserData.Likes) { - html += 'Set Did Not Like'; - html += 'Liked'; + var userData = item.UserData || {}; + + if (typeof userData.Likes == "undefined") { + html += 'Dislike'; + html += 'Like'; + } else if (userData.Likes) { + html += 'Dislike'; + html += 'Liked'; } else { - html += 'Did Not Like'; - html += 'Set Liked'; + html += 'Dislike'; + html += 'Like'; } - if (item.UserData.IsFavorite) { - html += 'Make Not Favorite'; - }else { - html += 'Make Favorite'; + if (userData.IsFavorite) { + html += 'Remove favorite'; + } else { + html += 'Mark favorite'; } - $('#itemFav', page).html(html); + $('#itemRatings', page).html(html); }, setFavorite: function () { var item = ItemDetailPage.item; + item.UserData = item.UserData || {}; + var setting = !item.UserData.IsFavorite; item.UserData.IsFavorite = setting; @@ -749,8 +753,11 @@ }, setLike: function () { + var item = ItemDetailPage.item; + item.UserData = item.UserData || {}; + item.UserData.Likes = true; ApiClient.updateUserItemRating(Dashboard.getCurrentUserId(), item.Id, true); @@ -759,9 +766,12 @@ }, clearLike: function () { + var item = ItemDetailPage.item; - delete item.UserData.Likes; + item.UserData = item.UserData || {}; + + item.UserData.Likes = undefined; ApiClient.clearUserItemRating(Dashboard.getCurrentUserId(), item.Id); @@ -771,6 +781,8 @@ setDislike: function () { var item = ItemDetailPage.item; + item.UserData = item.UserData || {}; + item.UserData.Likes = false; ApiClient.updateUserItemRating(Dashboard.getCurrentUserId(), item.Id, false); diff --git a/dashboard-ui/scripts/itemlistpage.js b/dashboard-ui/scripts/itemlistpage.js index 9b76b0e8a3..397ca06032 100644 --- a/dashboard-ui/scripts/itemlistpage.js +++ b/dashboard-ui/scripts/itemlistpage.js @@ -18,6 +18,8 @@ query.parentId = parentId; ApiClient.getItem(Dashboard.getCurrentUserId(), parentId).done(ItemListPage.renderTitle); + } else { + $('#itemName', $.mobile.activePage).html("Media Library"); } ItemListPage.refreshItems(query);