re-enable chromecast

This commit is contained in:
Luke Pulverenti 2014-08-17 01:38:13 -04:00
parent 4d679e90a4
commit 3d1ee1233c
15 changed files with 901 additions and 796 deletions

View file

@ -17,7 +17,11 @@
} }
.backdropPage { .backdropPage {
background-color: rgba(15, 15,15, .94) !important; background-color: rgba(15, 15,15, .86) !important;
}
.backdropPage:not(.lightBackdropPage) {
background-color: rgba(15, 15,15, .92) !important;
} }
.backdropContainer { .backdropContainer {
@ -125,7 +129,7 @@
} }
} }
.detailPageContent { .detailPageContent, .detailPageContent>table {
margin: 0 auto; margin: 0 auto;
padding: 0; padding: 0;
border-spacing: 0; border-spacing: 0;
@ -441,6 +445,11 @@ a.itemTag:hover {
box-shadow: 0 0 20px 3px #38c; box-shadow: 0 0 20px 3px #38c;
} }
.itemByNameImageContainer .itemDetailImage {
margin: 0 !important;
max-height: 220px;
}
.parentName { .parentName {
font-size: 14px; font-size: 14px;
display: block; display: block;
@ -457,13 +466,13 @@ a.itemTag:hover {
.itemOverview { .itemOverview {
text-overflow: ellipsis; text-overflow: ellipsis;
max-height: 100px;
overflow-y: auto;
padding-right: .5em;
} }
.desktopOverview { .desktopOverview {
min-width: 500px; min-width: 500px;
max-height: 100px;
overflow-y: auto;
padding-right: 1em;
} }
.mobileOverview { .mobileOverview {
@ -471,6 +480,10 @@ a.itemTag:hover {
padding: 0 1em; padding: 0 1em;
} }
.empty {
margin: 0;
}
.mobileGenres { .mobileGenres {
display: none; display: none;
padding: 0 1em; padding: 0 1em;
@ -608,7 +621,7 @@ a.itemTag:hover {
margin-top: 0; margin-top: 0;
} }
.mobileOverview, .mobileGenres, .mobileDetailButtons { .mobileOverview:not(.hide), .mobileGenres, .mobileDetailButtons {
display: block; display: block;
} }
@ -626,15 +639,11 @@ a.itemTag:hover {
display: block !important; display: block !important;
} }
.primaryDetailPageContent { .primaryDetailPageContent .userDataIcons {
margin: 0 1em; margin-left: 0 !important;
margin-top: 1em;
display: block;
} }
.primaryDetailPageContent .userDataIcons {
margin-left: 0 !important;
margin-top: 1.5em;
display: block;
}
} }
@ -656,13 +665,6 @@ a.itemTag:hover {
} }
} }
/*@media all and (min-width: 1000px) {
.primaryDetailPageContent {
max-width: 850px;
}
}*/
.detailPageParentLink { .detailPageParentLink {
text-decoration: none; text-decoration: none;
} }
@ -956,17 +958,6 @@ a.itemTag:hover {
margin-right: auto; margin-right: auto;
} }
@media all and (min-width: 750px) {
.lnkSibling:not(.hide) {
display: block;
}
.itemBackdrop:not(.noBackdrop) {
border-bottom: 1px solid #111;
}
}
@media all and (min-height: 500px) { @media all and (min-height: 500px) {
.alphabetPicker { .alphabetPicker {
@ -1209,8 +1200,8 @@ a.itemTag:hover {
} }
.itemsListview .playedIndicator { .itemsListview .playedIndicator {
right: 1em; left: 55px;
top: 55%; top: 2px;
background: rgba(82, 181, 75, .8); background: rgba(82, 181, 75, .8);
} }
@ -1266,7 +1257,8 @@ a.itemTag:hover {
} }
.listItem a + a { .listItem a + a {
background-color: #202020 !important; background-color: transparent !important;
z-index: 1000;
} }
.listItem:hover a { .listItem:hover a {

View file

@ -4,7 +4,8 @@
<title></title> <title></title>
</head> </head>
<body> <body>
<div id="itemByNameDetailPage" data-role="page" class="page libraryPage itemDetailPage" data-theme="b">
<div id="itemByNameDetailPage" data-role="page" class="page libraryPage itemDetailPage lightBackdropPage" data-theme="b">
<div id="movieGenreTabs" class="itemTabs" style="display: none;"> <div id="movieGenreTabs" class="itemTabs" style="display: none;">
<div class="libraryViewNav scopedLibraryViewNav"> <div class="libraryViewNav scopedLibraryViewNav">
<a href="movieslatest.html">${TabLatest}</a> <a href="movieslatest.html">${TabLatest}</a>
@ -113,50 +114,48 @@
</div> </div>
</div> </div>
<div id="itemBackdrop" class="itemBackdrop noBackdrop"> <div style="padding: 1em 0;">
<div class="itemBackdropContent"> <table class="detailPageContent primaryDetailPageContent">
<table class="detailPageContent primaryDetailPageContent"> <tr>
<tr> <td style="vertical-align: top; padding: 0 1em 0 0;">
<td style="vertical-align: top; padding: 0 1em 0 0;"> <div id="itemImage" class="itemImageContainer itemByNameImageContainer"></div>
<div id="itemImage" class="itemImageContainer"></div> </td>
</td> <td style="vertical-align: top; padding: 0;">
<td style="vertical-align: top; padding: 0;"> <p style="margin-top:0;"><span class="itemName inlineItemName"></span><span class="itemMiscInfo" style="display: inline;"></span></p>
<p><span class="itemName inlineItemName"></span><span class="itemMiscInfo" style="display: inline;"></span></p> <p>
<p> <span class="itemCommunityRating"></span>
<span class="itemCommunityRating"></span> <span class="userDataIcons"></span>
<span class="userDataIcons"></span> </p>
</p> <p class="itemGenres"></p>
<p class="itemGenres"></p> <p class="itemOverview desktopOverview"></p>
<p class="itemOverview desktopOverview"></p> <p id="itemBirthday"></p>
<p id="itemBirthday"></p> <p id="itemBirthLocation"></p>
<p id="itemBirthLocation"></p> <p id="itemDeathDate"></p>
<p id="itemDeathDate"></p>
<p id="itemLinks"></p> <p id="itemLinks"></p>
<div class="detailButtonsContainer desktopDetailButtons" style="text-align: left;"> <div class="detailButtonsContainer desktopDetailButtons" style="text-align: left;">
<button class="btnPlay hide" type="button" data-icon="play" data-inline="true" data-mini="true">${ButtonPlay}</button> <button class="btnPlay hide" type="button" data-icon="play" data-inline="true" data-mini="true">${ButtonPlay}</button>
<a class="btnEdit hide" data-role="button" data-icon="edit" data-inline="true" data-mini="true" href="#">${ButtonEdit}</a> <a class="btnEdit hide" data-role="button" data-icon="edit" data-inline="true" data-mini="true" href="#">${ButtonEdit}</a>
</div> </div>
</td> </td>
</tr> </tr>
</table> </table>
</div>
<p class="itemOverview mobileOverview"></p>
</div> </div>
<p class="itemOverview mobileOverview"></p>
<div class="detailButtonsContainer mobileDetailButtons"> <div class="detailButtonsContainer mobileDetailButtons">
<button class="btnPlay hide" type="button" data-icon="play" data-inline="true" data-mini="true">${ButtonPlay}</button> <button class="btnPlay hide" type="button" data-icon="play" data-inline="true" data-mini="true">${ButtonPlay}</button>
<a class="btnEdit hide" data-role="button" data-icon="edit" data-inline="true" data-mini="true" href="#">${ButtonEdit}</a> <a class="btnEdit hide" data-role="button" data-icon="edit" data-inline="true" data-mini="true" href="#">${ButtonEdit}</a>
</div> </div>
<div data-role="content"> <div data-role="content" style="padding-top: 0;">
<div id="itemTabs" style="text-align: center; margin: 1em 0;"></div> <div id="itemTabs" style="text-align: center; margin: 0 0 1em;"></div>
<div class="viewSettings"> <div class="viewSettings">
<div class="viewControls"> <div class="viewControls">
</div> </div>
<div class="listTopPaging"> <div class="listTopPaging">
</div> </div>
</div> </div>
<div id="items" class="itemsContainer" style="text-align: center;"> <div id="items" class="itemsContainer">
</div> </div>
</div> </div>
</div> </div>

View file

@ -107,6 +107,41 @@
return val == '1' || (val != '0' && !$.browser.mobile); return val == '1' || (val != '0' && !$.browser.mobile);
} }
function setBackdrops(page, items) {
var images = items.filter(function (i) {
return i.BackdropImageTags.length > 0;
}).map(function (i) {
return {
id: i.Id,
tag: i.BackdropImageTags[0]
};
});
if (images.length) {
$(page).addClass('backdropPage');
var index = getRandom(0, images.length - 1);
var item = images[index];
var screenWidth = $(window).width();
var imgUrl = ApiClient.getScaledImageUrl(item.id, {
type: "Backdrop",
tag: item.tag,
maxWidth: screenWidth,
quality: 80
});
getElement().css('backgroundImage', 'url(\'' + imgUrl + '\')');
} else {
$(page).removeClass('backdropPage');
}
}
$(document).on('pagebeforeshow', ".page", function () { $(document).on('pagebeforeshow', ".page", function () {
var page = this; var page = this;
@ -128,4 +163,9 @@
}); });
window.Backdrops = {
setBackdrops: setBackdrops
};
})(jQuery, document); })(jQuery, document);

File diff suppressed because it is too large Load diff

View file

@ -310,7 +310,7 @@
html += '<div class="editorTile imageEditorTile">'; html += '<div class="editorTile imageEditorTile">';
html += '<div style="height:144px;vertical-align:top;background-repeat:no-repeat;background-size:contain;background-image:url(\'' + LibraryBrowser.getImageUrl(currentItem, image.ImageType, image.ImageIndex, { height: 144 }) + '\');"></div>'; html += '<div style="height:144px;vertical-align:top;background-repeat:no-repeat;background-size:contain;background-image:url(\'' + LibraryBrowser.getImageUrl(currentItem, image.ImageType, image.ImageIndex, { enableImageEnhancers: false, height: 144 }) + '\');"></div>';
html += '<div>'; html += '<div>';

View file

@ -330,7 +330,7 @@ function parseISO8601Date(s, options) {
} }
return new Date(ms); return new Date(ms);
}; }
// jqm.page.params.js - version 0.1 // jqm.page.params.js - version 0.1
// Copyright (c) 2011, Kin Blas // Copyright (c) 2011, Kin Blas

View file

@ -70,6 +70,8 @@
currentItem = item; currentItem = item;
Backdrops.setBackdrops(page, [item]);
renderHeader(page, item, context); renderHeader(page, item, context);
var name = item.Name; var name = item.Name;
@ -97,7 +99,7 @@
var editImagesHref = user.Configuration.IsAdministrator ? 'edititemimages.html' + editQuery : null; var editImagesHref = user.Configuration.IsAdministrator ? 'edititemimages.html' + editQuery : null;
$('#itemImage', page).html(LibraryBrowser.getDetailImageHtml(item, editImagesHref)); $('#itemImage', page).html(LibraryBrowser.getDetailImageHtml(item, editImagesHref, true));
if (user.Configuration.IsAdministrator && item.LocationType !== "Offline") { if (user.Configuration.IsAdministrator && item.LocationType !== "Offline") {
$('.btnEdit', page).show(); $('.btnEdit', page).show();
@ -162,49 +164,49 @@
if (item.MovieCount) { if (item.MovieCount) {
html += '<input type="radio" name="ibnItems" id="radioMovies" class="context-movies" value="on" data-mini="true">'; html += '<input type="radio" name="ibnItems" id="radioMovies" class="context-movies" value="on" data-mini="true">';
html += '<label for="radioMovies">Movies (' + item.MovieCount + ')</label>'; html += '<label for="radioMovies">Movies</label>';
} }
if (item.SeriesCount) { if (item.SeriesCount) {
html += '<input type="radio" name="ibnItems" id="radioShows" class="context-tv" value="on" data-mini="true">'; html += '<input type="radio" name="ibnItems" id="radioShows" class="context-tv" value="on" data-mini="true">';
html += '<label for="radioShows">TV Shows (' + item.SeriesCount + ')</label>'; html += '<label for="radioShows">TV Shows</label>';
} }
if (item.EpisodeCount) { if (item.EpisodeCount) {
html += '<input type="radio" name="ibnItems" id="radioEpisodes" class="context-tv" value="on" data-mini="true">'; html += '<input type="radio" name="ibnItems" id="radioEpisodes" class="context-tv" value="on" data-mini="true">';
html += '<label for="radioEpisodes">Episodes (' + item.EpisodeCount + ')</label>'; html += '<label for="radioEpisodes">Episodes</label>';
} }
if (item.TrailerCount) { if (item.TrailerCount) {
html += '<input type="radio" name="ibnItems" id="radioTrailers" class="context-movies" value="on" data-mini="true">'; html += '<input type="radio" name="ibnItems" id="radioTrailers" class="context-movies" value="on" data-mini="true">';
html += '<label for="radioTrailers">Trailers (' + item.TrailerCount + ')</label>'; html += '<label for="radioTrailers">Trailers</label>';
} }
if (item.GameCount) { if (item.GameCount) {
html += '<input type="radio" name="ibnItems" id="radioGames" class="context-games" value="on" data-mini="true">'; html += '<input type="radio" name="ibnItems" id="radioGames" class="context-games" value="on" data-mini="true">';
html += '<label for="radioGames">Games (' + item.GameCount + ')</label>'; html += '<label for="radioGames">Games</label>';
} }
if (item.AlbumCount) { if (item.AlbumCount) {
html += '<input type="radio" name="ibnItems" id="radioAlbums" class="context-music" value="on" data-mini="true">'; html += '<input type="radio" name="ibnItems" id="radioAlbums" class="context-music" value="on" data-mini="true">';
html += '<label for="radioAlbums">Albums (' + item.AlbumCount + ')</label>'; html += '<label for="radioAlbums">Albums</label>';
} }
if (item.SongCount) { if (item.SongCount) {
html += '<input type="radio" name="ibnItems" id="radioSongs" class="context-music" value="on" data-mini="true">'; html += '<input type="radio" name="ibnItems" id="radioSongs" class="context-music" value="on" data-mini="true">';
html += '<label for="radioSongs">Songs (' + item.SongCount + ')</label>'; html += '<label for="radioSongs">Songs</label>';
} }
if (item.MusicVideoCount) { if (item.MusicVideoCount) {
html += '<input type="radio" name="ibnItems" id="radioMusicVideos" class="context-music" value="on" data-mini="true">'; html += '<input type="radio" name="ibnItems" id="radioMusicVideos" class="context-music" value="on" data-mini="true">';
html += '<label for="radioMusicVideos">Music Videos (' + item.MusicVideoCount + ')</label>'; html += '<label for="radioMusicVideos">Music Videos</label>';
} }
html += '</fieldset>'; html += '</fieldset>';
@ -321,7 +323,7 @@
function renderDetails(page, item, context) { function renderDetails(page, item, context) {
LibraryBrowser.renderDetailPageBackdrop(page, item); //LibraryBrowser.renderDetailPageBackdrop(page, item);
LibraryBrowser.renderOverview($('.itemOverview', page), item); LibraryBrowser.renderOverview($('.itemOverview', page), item);
renderUserDataIcons(page, item); renderUserDataIcons(page, item);
@ -472,22 +474,17 @@
} }
else if (query.IncludeItemTypes == "MusicAlbum") { else if (query.IncludeItemTypes == "MusicAlbum") {
html = LibraryBrowser.getPosterViewHtml({ html = LibraryBrowser.getListViewHtml({
items: result.Items, items: result.Items,
shape: "square", smallIcon: true
context: 'music',
showTitle: true,
showParentTitle: true
}); });
} }
else { else {
html = LibraryBrowser.getPosterViewHtml({ html = LibraryBrowser.getListViewHtml({
items: result.Items, items: result.Items,
shape: "square", smallIcon: true
showTitle: true,
centerText: true
}); });
} }

View file

@ -726,7 +726,9 @@
$('#childrenContent', page).html(LibraryBrowser.getListViewHtml({ $('#childrenContent', page).html(LibraryBrowser.getListViewHtml({
items: result.Items, items: result.Items,
smallIcon: true smallIcon: true,
showIndex: true,
index: 'disc'
})).trigger('create').createCardMenus(); })).trigger('create').createCardMenus();

View file

@ -27,7 +27,7 @@
getDefaultItemsView: function (view, mobileView) { getDefaultItemsView: function (view, mobileView) {
return view; return $.browser.mobile ? mobileView : view;
}, },
@ -578,9 +578,14 @@
}, },
getListViewIndex: function (item, sortBy) { getListViewIndex: function (item, options) {
sortBy = (sortBy || '').toLowerCase(); if (options.index == 'disc') {
return item.ParentIndexNumber == null ? '' : 'Disc ' + item.ParentIndexNumber;
}
var sortBy = (options.sortBy || '').toLowerCase();
var code, name; var code, name;
if (sortBy.indexOf('sortname') == 0) { if (sortBy.indexOf('sortname') == 0) {
@ -666,7 +671,8 @@
var html = ''; var html = '';
if (options.showIndex !== false) { if (options.showIndex !== false) {
var itemGroupTitle = LibraryBrowser.getListViewIndex(item, options.sortBy);
var itemGroupTitle = LibraryBrowser.getListViewIndex(item, options);
if (itemGroupTitle != groupTitle) { if (itemGroupTitle != groupTitle) {
@ -2026,7 +2032,7 @@
}); });
}, },
getDetailImageHtml: function (item, href) { getDetailImageHtml: function (item, href, preferThumb) {
var imageTags = item.ImageTags || {}; var imageTags = item.ImageTags || {};
@ -2040,7 +2046,15 @@
var imageHeight = 280; var imageHeight = 280;
if (imageTags.Primary) { if (preferThumb && imageTags.Thumb) {
url = ApiClient.getScaledImageUrl(item.Id, {
type: "Thumb",
maxHeight: imageHeight,
tag: item.ImageTags.Thumb
});
}
else if (imageTags.Primary) {
url = ApiClient.getScaledImageUrl(item.Id, { url = ApiClient.getScaledImageUrl(item.Id, {
type: "Primary", type: "Primary",
@ -2263,6 +2277,12 @@
$(this).attr("target", "_blank"); $(this).attr("target", "_blank");
}); });
if (overview) {
elem.removeClass('empty');
} else {
elem.addClass('empty');
}
}, },
renderStudios: function (elem, item, context) { renderStudios: function (elem, item, context) {

View file

@ -254,7 +254,8 @@
} else { } else {
$('.btnCast').removeClass('btnDefaultCast').addClass('btnActiveCast'); $('.btnCast').removeClass('btnDefaultCast').addClass('btnActiveCast');
$('.headerSelectedPlayer').html(info.deviceName || info.name);
$('.headerSelectedPlayer').html((info.deviceName || info.name));
} }
} }

View file

@ -396,6 +396,10 @@
start.setHours(0, 0, 0, 0); start.setHours(0, 0, 0, 0);
end.setHours(0, 0, 0, 0); end.setHours(0, 0, 0, 0);
if (start.getTime() >= end.getTime()) {
end.setDate(start.getDate() + 1);
}
start = new Date(Math.max(today, start)); start = new Date(Math.max(today, start));
var html = ''; var html = '';
@ -417,7 +421,10 @@
var val = elem.val(); var val = elem.val();
var date = new Date(); var date = new Date();
date.setTime(parseInt(val));
if (val) {
date.setTime(parseInt(val));
}
changeDate(page, date); changeDate(page, date);
} }

View file

@ -439,7 +439,7 @@
var mirror = (!target.isLocalPlayer && target.supportedCommands.indexOf('DisplayContent') != -1) ? 'true' : 'false'; var mirror = (!target.isLocalPlayer && target.supportedCommands.indexOf('DisplayContent') != -1) ? 'true' : 'false';
html += '<input type="radio" class="radioSelectPlayerTarget" name="radioSelectPlayerTarget" data-mirror="' + mirror + '" data-commands="' + target.supportedCommands.join(',') + '" data-mediatypes="' + target.playableMediaTypes.join(',') + '" data-playername="' + target.playerName + '" data-targetid="' + target.id + '" data-targetname="' + target.name + '" data-devicename="' + target.deviceName + '" id="' + id + '" value="' + target.id + '"' + checkedHtml + '>'; html += '<input type="radio" class="radioSelectPlayerTarget" name="radioSelectPlayerTarget" data-mirror="' + mirror + '" data-commands="' + target.supportedCommands.join(',') + '" data-mediatypes="' + target.playableMediaTypes.join(',') + '" data-playername="' + target.playerName + '" data-targetid="' + target.id + '" data-targetname="' + target.name + '" data-devicename="' + (target.deviceName || '') + '" id="' + id + '" value="' + target.id + '"' + checkedHtml + '>';
html += '<label for="' + id + '" style="font-weight:normal;">' + target.name; html += '<label for="' + id + '" style="font-weight:normal;">' + target.name;
if (target.appName) { if (target.appName) {

View file

@ -7,7 +7,7 @@
if (this.checked) { if (this.checked) {
SupporterPage.addRecurringFields(); SupporterPage.addRecurringFields();
} else { } else {
SupporterPage.removeRecurringFields(); SupporterPage.removeRecurringFields(page);
} }
}); });
}, },
@ -17,7 +17,7 @@
$("<input type='hidden' name='a3' class='pprecurring' />") $("<input type='hidden' name='a3' class='pprecurring' />")
.attr('value', $('#donateAmt', '#supporterPage').val()) .attr('value', $('#donateAmt', '#supporterPage').val())
.appendTo("#payPalForm", '#supporterPage'); .appendTo("#payPalForm", '#supporterPage');
$("<input type='hidden' name='p3' value='6' class='pprecurring' />") $("<input type='hidden' name='p3' value='1' class='pprecurring' />")
.appendTo("#payPalForm", '#supporterPage'); .appendTo("#payPalForm", '#supporterPage');
$("<input type='hidden' name='t3' value='M' class='pprecurring' />") $("<input type='hidden' name='t3' value='M' class='pprecurring' />")
.appendTo("#payPalForm", '#supporterPage'); .appendTo("#payPalForm", '#supporterPage');
@ -33,11 +33,11 @@
}, },
removeRecurringFields: function() { removeRecurringFields: function(page) {
$('.pprecurring', '#supporterPage').remove(); $('.pprecurring', page).remove();
//change command back //change command back
$('#ppCmd', '#supporterPage').val('_xclick'); $('#ppCmd', page).val('_xclick');
}, },

View file

@ -24,9 +24,9 @@
method="post"> method="post">
<label for="donateAmt">${LabelSupportAmount}</label> <label for="donateAmt">${LabelSupportAmount}</label>
<select id="donateAmt" name="amount"> <select id="donateAmt" name="amount">
<option value="15" selected="selected">$15</option> <option value="20" selected="selected">$20</option>
<option value="20">$20</option>
<option value="30">$30</option> <option value="30">$30</option>
<option value="40">$40</option>
<option value="50">$50</option> <option value="50">$50</option>
</select> </select>
<div> <div>

View file

@ -70,6 +70,10 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
return currentUserId; return currentUserId;
}; };
self.accessToken = function() {
return accessToken;
};
self.setCurrentUserId = function (userId, token) { self.setCurrentUserId = function (userId, token) {
currentUserId = userId; currentUserId = userId;