';
@@ -2645,7 +2645,7 @@
var elem = this;
- $(this).animate({ "height": "0" }, function () {
+ $(this).animate({ "height": "0" }, "fast", function () {
$(elem).hide();
@@ -2659,47 +2659,136 @@
});
}
-
- function getOverlayHtml(item) {
+
+ function getOverlayHtml(item, currentUser, posterItem) {
var html = '';
html += '
';
- html += '
';
- html += LibraryBrowser.getPosterViewDisplayName(item, true);
+ var isSmallItem = $(posterItem).hasClass('smallBackdropPosterItem');
+ var isPortrait = $(posterItem).hasClass('portraitPosterItem');
+
+ var parentName = isSmallItem || isPortrait ? null : item.SeriesName;
+ var name = LibraryBrowser.getPosterViewDisplayName(item, true);
+
+ html += '
';
+ var logoHeight = isPortrait || isSmallItem ? 20 : 22;
+ var maxLogoWidth = isPortrait ? 100 : 200;
+ var imgUrl;
+
+ if (parentName && item.ParentLogoItemId) {
+
+ imgUrl = ApiClient.getImageUrl(item.ParentLogoItemId, {
+ height: logoHeight * 2,
+ type: 'logo',
+ tag: item.ParentLogoImageTag
+ });
+
+ html += '
';
+
+ }
+ else if (item.ImageTags.Logo) {
+
+ imgUrl = LibraryBrowser.getImageUrl(item, 'Logo', 0, {
+ height: logoHeight * 2,
+ });
+
+ html += '
';
+ }
+ else {
+ html += parentName || name;
+ }
html += '
';
- //html += '
';
- //html += LibraryBrowser.getMiscInfoHtml(item);
- //html += '
';
+ if (parentName) {
+ html += '
';
+ html += name;
+ html += '
';
+ } else if (!isSmallItem) {
+ html += '
';
+ html += LibraryBrowser.getMiscInfoHtml(item);
+ html += '
';
+ }
- html += '
';
+ html += '
';
html += '';
- html += '
';
-
- html += '
';
- html += '';
- html += LibraryBrowser.getUserDataIconsHtml(item);
+ html += LibraryBrowser.getRatingHtml(item, false);
html += ' ';
+
+ if (isPortrait) {
+ html += '';
+ html += LibraryBrowser.getUserDataIconsHtml(item);
+ html += ' ';
+ } else {
+ html += '';
+ html += LibraryBrowser.getUserDataIconsHtml(item);
+ html += ' ';
+ }
html += '
';
//html += '
';
//html += (item.OverviewHtml || item.Overview || '');
//html += '
';
- html += '
Play ';
- html += '
Play ';
- html += '
Play ';
- html += '
Play ';
+ html += '
';
+
+ var buttonMargin = isPortrait ? "margin:0 7px 0 0;" : "margin:0 10px 0 0;";
+
+ var buttonCount = 0;
+
+ if (MediaPlayer.canPlay(item)) {
+ html += 'Play ';
+ buttonCount++;
+ }
+
+ if (item.LocalTrailerCount) {
+ html += 'Play Trailer ';
+ buttonCount++;
+ }
+
+ if (currentUser.Configuration.IsAdministrator) {
+ html += 'Edit ';
+ buttonCount++;
+ }
+
+ if (!isPortrait || buttonCount < 3) {
+ html += 'Send to Device ';
+ }
+
+ html += '
';
html += '
';
return html;
}
+ function onTrailerButtonClick() {
+
+ var id = this.getAttribute('data-itemid');
+
+ ApiClient.getLocalTrailers(Dashboard.getCurrentUserId(), id).done(function (trailers) {
+ MediaPlayer.play(trailers);
+ });
+
+ return false;
+ }
+
+ function onRemoteControlButtonClick() {
+
+ var id = this.getAttribute('data-itemid');
+
+ ApiClient.getItem(Dashboard.getCurrentUserId(), id).done(function (item) {
+
+ RemoteControl.showMenuForItem({
+ item: item
+ });
+
+ });
+
+ return false;
+ }
+
$.fn.createPosterItemHoverMenu = function () {
function onShowTimerExpired(elem) {
@@ -2707,16 +2796,25 @@
var innerElem = $('.posterItemOverlayTarget', elem);
var id = elem.getAttribute('data-itemid');
- ApiClient.getItem(Dashboard.getCurrentUserId(), id).done(function (item) {
+ var promise1 = ApiClient.getItem(Dashboard.getCurrentUserId(), id);
+ var promise2 = Dashboard.getCurrentUser();
- innerElem.html(getOverlayHtml(item)).trigger('create');
+ $.when(promise1, promise2).done(function (response1, response2) {
+
+ var item = response1[0];
+ var user = response2[0];
+
+ innerElem.html(getOverlayHtml(item, user, elem)).trigger('create');
+
+ $('.btnPlayTrailer', innerElem).on('click', onTrailerButtonClick);
+ $('.btnRemoteControl', innerElem).on('click', onRemoteControlButtonClick);
});
innerElem.show().each(function () {
this.style.height = 0;
- }).animate({ "height": "100%" });
+ }).animate({ "height": "100%" }, "fast");
}
function onHoverIn() {
@@ -2732,7 +2830,7 @@
onShowTimerExpired(elem);
- }, 600);
+ }, 800);
}
// https://hacks.mozilla.org/2013/04/detecting-touch-its-the-why-not-the-how/
@@ -2742,8 +2840,8 @@
running on touch-capable device */
return this;
}
- return this;
- return this.on('mouseenter', '.posterItem', onHoverIn).on('mouseleave', '.posterItem', onHoverOut);
+
+ return this.on('mouseenter', '.backdropPosterItem,.smallBackdropPosterItem,.portraitPosterItem', onHoverIn).on('mouseleave', '.backdropPosterItem,.smallBackdropPosterItem,.portraitPosterItem', onHoverOut);
};
})(jQuery, document, window);
\ No newline at end of file
diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js
index 9e75a7821..3cb17610d 100644
--- a/dashboard-ui/scripts/mediaplayer.js
+++ b/dashboard-ui/scripts/mediaplayer.js
@@ -993,6 +993,9 @@
self.canPlay = function (item) {
+ if (item.LocationType == "Virtual") {
+ return false;
+ }
if (item.Type == "MusicAlbum" || item.Type == "MusicArtist" || item.Type == "MusicGenre") {
return true;
}
diff --git a/dashboard-ui/scripts/remotecontrol.js b/dashboard-ui/scripts/remotecontrol.js
index 5355a54c0..b5e529164 100644
--- a/dashboard-ui/scripts/remotecontrol.js
+++ b/dashboard-ui/scripts/remotecontrol.js
@@ -64,12 +64,12 @@
var item = options.item;
- var html = '
';
+ var html = '
';
html += '
Close ';
html += '
';
- html += '
Remote Control
';
+ html += '
Send to Device
';
html += '
';
html += '
';
@@ -385,7 +385,6 @@
function renderPlayFromOptions(elem, item) {
var html = '';
- var html = '';
html += '
Play from scene ';
@@ -455,33 +454,31 @@
var html = '';
html += '
';
- html += '
Select command ';
+ html += '
Send: ';
html += '
';
- if (item.LocationType == 'Virtual') {
- html += 'Browse';
- } else {
- html += ' Play';
- }
+ var mediaLabel = item.MediaType || 'Media';
+
+ html += ' ' + mediaLabel + '';
if (item.Chapters && item.Chapters.length) {
- html += ' Play from scene';
+ html += ' Scene';
}
if (item.LocalTrailerCount) {
- html += ' Play trailer';
+ html += ' Trailer';
}
if (item.SpecialFeatureCount) {
- html += ' Play special feature';
+ html += ' Special feature';
}
if (options.themeSongs) {
- html += ' Play theme song';
+ html += ' Theme song';
}
if (options.themeVideos) {
- html += ' Play theme video';
+ html += ' Theme video';
}
html += ' ';
@@ -632,7 +629,7 @@
function showMenu(sessions, options) {
- var html = '
';
+ var html = '
';
html += '
Close ';
diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js
index cb9805113..858af04fd 100644
--- a/dashboard-ui/scripts/site.js
+++ b/dashboard-ui/scripts/site.js
@@ -1355,12 +1355,12 @@ $(function () {
footerHtml += '
Scenes ';
footerHtml += '
';
- footerHtml += '
Channels ';
- footerHtml += '
';
-
footerHtml += '
Fullscreen ';
- footerHtml += '
Cast ';
+ footerHtml += '
TV Channels ';
+ footerHtml += '
';
+
+ footerHtml += '
Send to Device ';
footerHtml += '
';