1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

improve poster sizing

This commit is contained in:
Luke Pulverenti 2014-08-01 22:34:45 -04:00
parent 48ea645cf9
commit cd1e583fa7
58 changed files with 931 additions and 549 deletions

View file

@ -12,13 +12,9 @@
</div> </div>
<div data-role="content"> <div data-role="content">
<table class="ehsContent"> <div class="ehsContent">
<tr>
<td>
<div class="items"></div> <div class="items"></div>
</td> </div>
</tr>
</table>
</div> </div>
</div> </div>
</body> </body>

View file

@ -9,8 +9,57 @@
position: relative; position: relative;
} }
.card, .card a {
text-decoration: none;
font-weight: 400 !important;
}
.cardOverlayTarget {
position: absolute;
right: 0;
left: 0;
bottom: 0;
background-color: rgba(0, 0, 0, .85);
z-index: 999;
display: none;
}
.cardOverlayInner {
padding: 11px 12px 10px;
}
.cardOverlayInner button:last-child {
margin-right: 0 !important;
}
.cardOverlayInner p {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.smallBackdropPosterItem .cardOverlayInner > div {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.cardBox { .cardBox {
margin: 4px 4px; margin: 4px;
}
@media all and (max-width: 800px) {
.cardBox {
margin: 2px;
}
}
@media all and (max-width: 600px) {
.cardBox {
margin: 1px;
}
} }
.visualCardBox { .visualCardBox {
@ -29,20 +78,24 @@
position: relative; position: relative;
} }
.card-16-9 .cardPadder { .backdropCard .cardPadder {
padding-bottom: 56.25%; padding-bottom: 56.25%;
} }
.card-1-1 .cardPadder { .squareCard .cardPadder {
padding-bottom: 100%; padding-bottom: 100%;
} }
.card-4-3 .cardPadder { .letterBoxCard .cardPadder {
padding-bottom: 75%; padding-bottom: 75%;
} }
.card-3-2 .cardPadder { .portraitCard .cardPadder {
padding-bottom: 66.666666666667%; padding-bottom: 150%;
}
.bannerCard .cardPadder {
padding-bottom: 18.5%;
} }
.cardContent { .cardContent {
@ -59,13 +112,13 @@
box-shadow: 0 0 0 5px #38c; box-shadow: 0 0 0 5px #38c;
} }
.cardBox .cardContent:hover { .alternateHover:hover .cardContent {
-moz-box-shadow: none; -moz-box-shadow: none;
-webkit-box-shadow: none; -webkit-box-shadow: none;
box-shadow: none; box-shadow: none;
} }
.cardContent:hover .cardImage { .alternateHover:hover .cardImage {
opacity: .5; opacity: .5;
} }
@ -111,12 +164,32 @@
overflow: hidden; overflow: hidden;
text-wrap: none; text-wrap: none;
white-space: nowrap; white-space: nowrap;
padding: 5px 4px 4px; padding: 5px 4px 2px;
text-shadow: none; text-shadow: none;
font-size: 13px; font-size: 13px;
font-weight: 400; font-weight: 400;
} }
.cardOverlayInner {
color: #fff;
}
.cardTextCentered {
text-align: center;
}
.cardDefaultText {
position: absolute;
top: 30%;
left: 0;
right: 0;
text-align: center;
}
.libraryPage .cardDefaultText, .libraryPage .cardText {
color: #fff;
}
.cardContent .cardText { .cardContent .cardText {
padding-left: 5px; padding-left: 5px;
padding: 0 5px 4px; padding: 0 5px 4px;
@ -141,17 +214,53 @@
background-size: cover; background-size: cover;
} }
.card-1-1 { .bannerCard {
width: 100%;
}
.squareCard {
width: 50%; width: 50%;
} }
.card-16-9:not(.manualSize) { .backdropCard {
width: 50%; width: 50%;
} }
.portraitCard {
width: 33.3%;
}
.cardProgress {
line-height: 7px;
}
.cardProgress .itemProgressBar {
height: 6px;
width: 100%;
opacity: .8;
}
.miniCardProgress {
/* Make sure it's on top of the fade gradient '*/
z-index: 1000;
}
.miniCardProgress .itemProgressBar {
height: 6px;
opacity: 1;
}
@media all and (max-width: 1200px) {
.portraitCard .cardOverlayInner {
padding-left: 7px;
padding-right: 7px;
}
}
@media all and (min-width: 500px) { @media all and (min-width: 500px) {
.card-1-1 { .squareCard {
width: 33.3%; width: 33.3%;
} }
} }
@ -159,27 +268,43 @@
@media all and (min-width: 540px) { @media all and (min-width: 540px) {
.card-16-9:not(.manualSize) { .portraitCard {
width: 25%;
}
}
@media all and (min-width: 640px) {
.backdropCard {
width: 33.3%; width: 33.3%;
} }
.bannerCard {
width: 50%;
}
} }
@media all and (min-width: 800px) { @media all and (min-width: 800px) {
.card-1-1 { .squareCard {
width: 25%; width: 25%;
} }
.portraitCard {
width: 20%;
}
} }
@media all and (min-width: 1000px) { @media all and (min-width: 1000px) {
.card-1-1 { .squareCard {
width: 20%; width: 20%;
} }
.card-16-9:not(.manualSize) { .backdropCard {
width: 25%; width: 25%;
} }
} }
@ -187,7 +312,15 @@
@media all and (min-width: 1200px) { @media all and (min-width: 1200px) {
.card-1-1 { .squareCard {
width: 16.666666666666666666666666666667%;
}
.bannerCard {
width: 33.3%;
}
.portraitCard {
width: 16.666666666666666666666666666667%; width: 16.666666666666666666666666666667%;
} }
} }
@ -195,27 +328,54 @@
@media all and (min-width: 1400px) { @media all and (min-width: 1400px) {
.card-1-1 { .squareCard {
width: 14.285714285714285714285714285714%; width: 14.285714285714285714285714285714%;
} }
.card-16-9:not(.manualSize) { .backdropCard {
width: 20%; width: 20%;
} }
.portraitCard {
width: 14.285714285714285714285714285714%;
}
} }
@media all and (min-width: 1600px) { @media all and (min-width: 1600px) {
.card-1-1 { .squareCard {
width: 12.5%; width: 12.5%;
} }
.card-16-9:not(.manualSize) { .backdropCard {
width: 16.666666666666666666666666666667%; width: 16.666666666666666666666666666667%;
} }
.bannerCard {
width: 25%;
}
.portraitCard {
width: 10%;
}
} }
@media all and (min-width: 1920px) {
.portraitCard {
width: 9.0909090909090909090909090909091%;
}
}
/** detailPage169 */
.detailPage169Card .cardPadder {
padding-bottom: 56.25%;
}
.detailPage169Card { .detailPage169Card {
width: 50%; width: 50%;
} }
@ -226,3 +386,190 @@
width: 33.3%; width: 33.3%;
} }
} }
/** detailPagePortrait */
.detailPagePortraitCard .cardPadder {
padding-bottom: 150%;
}
.detailPagePortraitCard {
width: 33.3%;
}
@media all and (min-width: 540px) {
.detailPagePortraitCard {
width: 25%;
}
}
@media all and (min-width: 800px) {
.detailPagePortraitCard {
width: 20%;
}
}
/** detailPageSquare */
.detailPageSquareCard .cardPadder {
padding-bottom: 100%;
}
.detailPageSquareCard {
width: 50%;
}
@media all and (min-width: 540px) {
.detailPageSquareCard {
width: 33.33%;
}
}
@media all and (min-width: 800px) {
.detailPageSquareCard {
width: 25%;
}
}
/** homePageBackdropCard */
.homePageBackdropCard .cardPadder {
padding-bottom: 56.25%;
}
.homePageBackdropCard {
width: 50%;
}
@media all and (min-width: 540px) {
.homePageBackdropCard {
width: 33.3%;
}
}
@media all and (min-width: 1600px) {
.homePageBackdropCard {
width: 25%;
}
}
/** homePageSquareCard */
.homePageSquareCard .cardPadder {
padding-bottom: 100%;
}
.homePageSquareCard {
width: 50%;
}
@media all and (min-width: 540px) {
.homePageSquareCard {
width: 33.33%;
}
}
@media all and (min-width: 800px) {
.homePageSquareCard {
width: 25%;
}
}
@media all and (min-width: 1200px) {
.homePageSquareCard {
width: 16.666666666666666666666666666667%;
}
}
/** homePagePortraitCard */
.homePagePortraitCard .cardPadder {
padding-bottom: 150%;
}
.homePagePortraitCard {
width: 33.3%;
}
@media all and (min-width: 540px) {
.homePagePortraitCard {
width: 25%;
}
}
@media all and (min-width: 800px) {
.homePagePortraitCard {
width: 20%;
}
}
@media all and (min-width: 1000px) {
.homePagePortraitCard {
width: 16.666666666666666666666666666667%;
}
}
@media all and (min-width: 1200px) {
.homePagePortraitCard {
width: 14.285714285714285714285714285714%;
}
}
/** homePageSmallBackdropCard */
.homePageSmallBackdropCard .cardPadder {
padding-bottom: 56.25%;
}
.homePageSmallBackdropCard {
width: 50%;
}
@media all and (min-width: 540px) {
.homePageSmallBackdropCard {
width: 33.3%;
}
}
@media all and (min-width: 600px) {
.homePageSmallBackdropCard {
width: 25%;
}
}
@media all and (min-width: 700px) {
.homePageSmallBackdropCard {
width: 20%;
}
}
@media all and (min-width: 1000px) {
.homePageSmallBackdropCard {
width: 16.666666666666666666666666666667%;
}
}

View file

@ -33,7 +33,14 @@
.libraryPage > .ui-content { .libraryPage > .ui-content {
padding-top: 10px; padding-top: 10px;
padding-bottom: 120px; }
@media all and (max-width: 1200px) {
.libraryPage > .ui-content {
padding-left: .4em !important;
padding-right: .4em !important;
}
} }
.libraryPage .currentUsername { .libraryPage .currentUsername {
@ -101,10 +108,6 @@
.ehsContent { .ehsContent {
width: 770px; width: 770px;
} }
.squareEhsContent {
width: 760px;
}
} }
@media all and (min-width: 1000px) { @media all and (min-width: 1000px) {
@ -112,10 +115,6 @@
.ehsContent { .ehsContent {
width: 900px; width: 900px;
} }
.squareEhsContent {
width: 900px;
}
} }
@media all and (min-width: 1200px) { @media all and (min-width: 1200px) {
@ -123,10 +122,6 @@
.ehsContent { .ehsContent {
width: 1000px; width: 1000px;
} }
.squareEhsContent {
width: 1000px;
}
} }
@media all and (min-width: 1600px) { @media all and (min-width: 1600px) {
@ -134,10 +129,6 @@
.ehsContent { .ehsContent {
width: 1200px; width: 1200px;
} }
.squareEhsContent {
width: 1200px;
}
} }
.detailPageContent { .detailPageContent {
@ -926,17 +917,15 @@ a.itemTag:hover {
display: block; display: block;
text-decoration: none; text-decoration: none;
padding: 1px 0; padding: 1px 0;
}
.alphabetPicker a:not(.selectedCharacter) {
color: #bbb !important; color: #bbb !important;
} }
.alphabetPicker a:hover:not(.selectedCharacter) {
background: #666 !important;
color: #fff !important;
}
.selectedCharacter { .selectedCharacter {
color: #fff !important; color: #4d90fe !important;
background: #4d90fe;
} }
.itemOverlayContent { .itemOverlayContent {

View file

@ -53,6 +53,7 @@
font-weight: 500; font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(fonts/RobotoMedium.woff) format('woff'); src: local('Roboto Medium'), local('Roboto-Medium'), url(fonts/RobotoMedium.woff) format('woff');
} }
@font-face { @font-face {
font-family: 'Roboto'; font-family: 'Roboto';
font-style: normal; font-style: normal;
@ -61,11 +62,11 @@
} }
* { * {
text-shadow: none!important; text-shadow: none !important;
} }
body { body {
overflow-y: scroll!important; overflow-y: scroll !important;
font-size: 13px; font-size: 13px;
font-family: Roboto, Arial, Helvetica, sans-serif; font-family: Roboto, Arial, Helvetica, sans-serif;
} }
@ -83,18 +84,18 @@ body {
} }
h1, h1 a { h1, h1 a {
font-weight: 300!important; font-weight: 300 !important;
font-size: 28px; font-size: 28px;
} }
.libraryPage h1, .libraryPage h1 a { .libraryPage h1, .libraryPage h1 a {
font-weight: 100!important; font-weight: 100 !important;
font-size: 28px; font-size: 28px;
} }
.ui-loader h1 { .ui-loader h1 {
font-family: Roboto; font-family: Roboto;
font-weight: 500!important; font-weight: 500 !important;
font-size: 18px; font-size: 18px;
} }
@ -117,7 +118,7 @@ h2 {
.ui-btn { .ui-btn {
font-family: Roboto; font-family: Roboto;
font-weight: 500!important; font-weight: 500 !important;
} }
.ui-listview li h3 { .ui-listview li h3 {
@ -129,7 +130,7 @@ h1 a {
} }
.libraryPage h1 a { .libraryPage h1 a {
color: #fff!important; color: #fff !important;
} }
h1 a:hover { h1 a:hover {
@ -243,7 +244,7 @@ h1 .imageLink {
} }
.imageButton[disabled], .imageButton[disabled]:hover { .imageButton[disabled], .imageButton[disabled]:hover {
opacity: .3!important; opacity: .3 !important;
cursor: default; cursor: default;
} }
@ -268,7 +269,7 @@ h1 .imageLink {
} }
.ulForm { .ulForm {
margin-bottom: 20px!important; margin-bottom: 20px !important;
} }
.ulForm li:not(.ui-li-divider) { .ulForm li:not(.ui-li-divider) {
@ -278,7 +279,7 @@ h1 .imageLink {
} }
.popup .ulForm { .popup .ulForm {
margin-bottom: 0!important; margin-bottom: 0 !important;
} }
.content-primary { .content-primary {
@ -303,25 +304,25 @@ h1 .imageLink {
margin-left: 1em; margin-left: 1em;
} }
.sidebarLinks a { .sidebarLinks a {
display: block; display: block;
padding: .6em 20px .6em 20px; padding: .6em 20px .6em 20px;
text-decoration: none; text-decoration: none;
color: #333!important; color: #333 !important;
text-shadow: none!important; text-shadow: none !important;
font-weight: 500!important; font-weight: 500 !important;
font-size: 14px; font-size: 14px;
border-radius: 2px; border-radius: 2px;
} }
.sidebarLinks a:hover { .sidebarLinks a:hover {
background: #52B54B; background: #52B54B;
color: #fff!important; color: #fff !important;
} }
.sidebarLinks a.selectedSidebarLink { .sidebarLinks a.selectedSidebarLink {
background: #38c!important; background: #38c !important;
color: #fff!important; color: #fff !important;
margin-right: 0; margin-right: 0;
} }
@ -332,12 +333,12 @@ h1 .imageLink {
} }
.invalidEntry { .invalidEntry {
background-color: lightpink!important; background-color: lightpink !important;
} }
/* Tabs (e.g. advanced metadata page) */ /* Tabs (e.g. advanced metadata page) */
.localnav { .localnav {
margin-bottom: 40px!important; margin-bottom: 40px !important;
} }
.localnav + form { .localnav + form {
@ -345,7 +346,7 @@ h1 .imageLink {
} }
.page > .ui-content { .page > .ui-content {
padding-bottom: 100px; padding-bottom: 120px;
} }
.dashboardPanelDivider { .dashboardPanelDivider {
@ -358,18 +359,18 @@ h1 .imageLink {
padding: .7em .5em .7em 1.25em; padding: .7em .5em .7em 1.25em;
display: block; display: block;
text-decoration: none; text-decoration: none;
color: #000!important; color: #000 !important;
font-weight: normal !important; font-weight: normal !important;
} }
.dashboardPanelLink:hover { .dashboardPanelLink:hover {
background: #52B54B; background: #52B54B;
color: #fff!important; color: #fff !important;
} }
.selectedDashboardPanelLink { .selectedDashboardPanelLink {
background: #38c; background: #38c;
color: #fff!important; color: #fff !important;
} }
.dashboardPanel .ui-panel-inner { .dashboardPanel .ui-panel-inner {
@ -456,19 +457,19 @@ h1 .imageLink {
} }
.mediaFolderLocations { .mediaFolderLocations {
margin: 1em .25em!important; margin: 1em .25em !important;
} }
.mediaLocationsHeader { .mediaLocationsHeader {
padding-top: .75em!important; padding-top: .75em !important;
padding-bottom: .75em!important; padding-bottom: .75em !important;
} }
.mediaLocationsHeader .ui-btn { .mediaLocationsHeader .ui-btn {
position: absolute; position: absolute;
right: -6px; right: -6px;
margin-top: 0!important; margin-top: 0 !important;
margin-bottom: 0!important; margin-bottom: 0 !important;
top: 6px; top: 6px;
} }
@ -514,12 +515,12 @@ h1 .imageLink {
} }
.posterViewItemWithNoText { .posterViewItemWithNoText {
padding-bottom: 0!important; padding-bottom: 0 !important;
} }
.posterViewItem a { .posterViewItem a {
color: white!important; color: white !important;
font-weight: normal!important; font-weight: normal !important;
text-decoration: none; text-decoration: none;
} }
@ -594,7 +595,7 @@ h1 .imageLink {
@media all and (min-width: 1920px) { @media all and (min-width: 1920px) {
.posterViewItemText { .posterViewItemText {
height: 25px!important; height: 25px !important;
} }
.posterViewItem { .posterViewItem {
@ -649,7 +650,6 @@ h1 .imageLink {
bottom: -2px; bottom: -2px;
left: -2px; left: -2px;
right: -2px; right: -2px;
/* Above everything, except for the video player and popup overlays */ /* Above everything, except for the video player and popup overlays */
z-index: 1097; z-index: 1097;
color: #fff; color: #fff;
@ -740,9 +740,10 @@ progress {
cursor: pointer; cursor: pointer;
vertical-align: top; vertical-align: top;
} }
.imgUserItemRating:last-child {
.imgUserItemRating:last-child {
margin-right: 0; margin-right: 0;
} }
.imgUserItemRating:hover { .imgUserItemRating:hover {
opacity: .5; opacity: .5;
@ -839,7 +840,7 @@ progress {
} }
.btnShowStatusMessage { .btnShowStatusMessage {
font-weight: normal!important; font-weight: normal !important;
text-decoration: none; text-decoration: none;
} }
@ -851,6 +852,11 @@ progress {
width: 50%; width: 50%;
} }
.activeSession .cardPadder {
padding-bottom: 56.25%;
}
.sessionNowPlayingContent { .sessionNowPlayingContent {
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
@ -925,7 +931,7 @@ progress {
} }
.activeDevicesCollapsible .ui-collapsible-content { .activeDevicesCollapsible .ui-collapsible-content {
padding: .25em!important; padding: .25em !important;
} }
.activeSession:not(.playingSession) .sessionNowPlayingContent { .activeSession:not(.playingSession) .sessionNowPlayingContent {
@ -981,22 +987,22 @@ progress {
/* Firefox */ /* Firefox */
.transcodingProgress::-moz-progress-bar { .transcodingProgress::-moz-progress-bar {
border-radius: 5px; border-radius: 5px;
background-image: -moz-linear-gradient( center bottom, rgb(221, 73, 25) 37%, rgb(221, 73, 25) 69% )!important; background-image: -moz-linear-gradient( center bottom, rgb(221, 73, 25) 37%, rgb(221, 73, 25) 69% ) !important;
} }
/* Chrome */ /* Chrome */
.transcodingProgress::-webkit-progress-value { .transcodingProgress::-webkit-progress-value {
border-radius: 5px; border-radius: 5px;
background-image: -webkit-gradient( linear, left bottom, left top, color-stop(0, rgb(221, 73, 25)), color-stop(1, rgb(221, 73, 25)) )!important; background-image: -webkit-gradient( linear, left bottom, left top, color-stop(0, rgb(221, 73, 25)), color-stop(1, rgb(221, 73, 25)) ) !important;
background-image: -webkit-linear-gradient( center bottom, rgb(221, 73, 25) 37%, rgb(221, 73, 25) 69% )!important; background-image: -webkit-linear-gradient( center bottom, rgb(221, 73, 25) 37%, rgb(221, 73, 25) 69% ) !important;
} }
/* Polyfill */ /* Polyfill */
.transcodingProgress[aria-valuenow]:before { .transcodingProgress[aria-valuenow]:before {
border-radius: 5px; border-radius: 5px;
background-image: -moz-linear-gradient( center bottom, rgb(221, 73, 25) 37%, rgb(221, 73, 25) 69% )!important; background-image: -moz-linear-gradient( center bottom, rgb(221, 73, 25) 37%, rgb(221, 73, 25) 69% ) !important;
background-image: -ms-linear-gradient( center bottom, rgb(221, 73, 25) 37%, rgb(221, 73, 25) 69% )!important; background-image: -ms-linear-gradient( center bottom, rgb(221, 73, 25) 37%, rgb(221, 73, 25) 69% ) !important;
background-image: -o-linear-gradient( center bottom, rgb(221, 73, 25) 37%, rgb(221, 73, 25) 69% )!important; background-image: -o-linear-gradient( center bottom, rgb(221, 73, 25) 37%, rgb(221, 73, 25) 69% ) !important;
} }
@media all and (max-width: 550px) { @media all and (max-width: 550px) {

View file

@ -16,13 +16,9 @@
<div data-role="content"> <div data-role="content">
<table class="ehsContent"> <div class="ehsContent">
<tr>
<td>
<div class="sections"></div> <div class="sections"></div>
</td> </div>
</tr>
</table>
</div> </div>
</div> </div>
</body> </body>

View file

@ -13,9 +13,7 @@
<a href="gamestudios.html">${TabStudios}</a> <a href="gamestudios.html">${TabStudios}</a>
</div> </div>
<div data-role="content"> <div data-role="content">
<table class="ehsContent"> <div class="ehsContent">
<tr>
<td>
<h1 class="listHeader">${HeaderLatestGames}</h1> <h1 class="listHeader">${HeaderLatestGames}</h1>
<div id="recentlyAddedItems"> <div id="recentlyAddedItems">
@ -27,9 +25,7 @@
<div id="recentlyPlayedItems"> <div id="recentlyPlayedItems">
</div> </div>
</div> </div>
</td> </div>
</tr>
</table>
</div> </div>
</div> </div>
</body> </body>

View file

@ -16,13 +16,9 @@
<div data-role="content"> <div data-role="content">
<table class="ehsContent"> <div class="ehsContent">
<tr>
<td>
<div class="sections"></div> <div class="sections"></div>
</td> </div>
</tr>
</table>
</div> </div>
</div> </div>
</body> </body>

View file

@ -24,13 +24,9 @@
</p> </p>
</div> </div>
<table class="ehsContent homeEhsContent"> <div class="ehsContent homeEhsContent">
<tr>
<td>
<div class="sections"></div> <div class="sections"></div>
</td> </div>
</tr>
</table>
</div> </div>
</div> </div>
</body> </body>

View file

@ -226,12 +226,6 @@
</div> </div>
<div id="musicVideosContent" class="detailSectionContent smallItemsContainer"></div> <div id="musicVideosContent" class="detailSectionContent smallItemsContainer"></div>
</div> </div>
<div id="soundtracksCollapsible" style="display: none;" class="detailSection">
<div id="soundtracksHeader" class="detailSectionHeader">
${HeaderSoundtracks}
</div>
<div id="soundtracksContent" class="detailSectionContent"></div>
</div>
<div id="similarCollapsible" style="display: none;" class="detailSection"> <div id="similarCollapsible" style="display: none;" class="detailSection">
<div class="detailSectionHeader"> <div class="detailSectionHeader">
</div> </div>

View file

@ -14,9 +14,7 @@
<a href="livetvseriestimers.html">${TabSeries}</a> <a href="livetvseriestimers.html">${TabSeries}</a>
</div> </div>
<div data-role="content"> <div data-role="content">
<table class="ehsContent"> <div class="ehsContent">
<tr>
<td>
<div id="activeRecordings" style="display: none;"> <div id="activeRecordings" style="display: none;">
<h1 class="listHeader">${HeaderActiveRecordings}</h1> <h1 class="listHeader">${HeaderActiveRecordings}</h1>
<div class="recordingItems"></div> <div class="recordingItems"></div>
@ -31,9 +29,7 @@
<h1 class="listHeader"><a href="livetvrecordinglist.html">${HeaderAllRecordings}<img src="css/images/rightarrow.png" class="headerArrowImage" /></a></h1> <h1 class="listHeader"><a href="livetvrecordinglist.html">${HeaderAllRecordings}<img src="css/images/rightarrow.png" class="headerArrowImage" /></a></h1>
<div id="recordingGroupItems"></div> <div id="recordingGroupItems"></div>
</div> </div>
</td> </div>
</tr>
</table>
</div> </div>
</div> </div>
</body> </body>

View file

@ -14,9 +14,7 @@
<a href="livetvseriestimers.html">${TabSeries}</a> <a href="livetvseriestimers.html">${TabSeries}</a>
</div> </div>
<div data-role="content"> <div data-role="content">
<table class="ehsContent"> <div class="ehsContent">
<tr>
<td>
<div id="activePrograms"> <div id="activePrograms">
<h1 class="listHeader">${HeaderWhatsOnTV}</h1> <h1 class="listHeader">${HeaderWhatsOnTV}</h1>
<div class="activeProgramItems"></div> <div class="activeProgramItems"></div>
@ -27,9 +25,7 @@
<div class="upcomingProgramItems"></div> <div class="upcomingProgramItems"></div>
<br /> <br />
</div> </div>
</td> </div>
</tr>
</table>
</div> </div>
</div> </div>
</body> </body>

View file

@ -18,16 +18,12 @@
<div data-role="content"> <div data-role="content">
<table class="ehsContent portraitEhsContent"> <div class="ehsContent portraitEhsContent">
<tr>
<td>
<h1 class="listHeader">${HeaderLatestMovies}</h1> <h1 class="listHeader">${HeaderLatestMovies}</h1>
<div id="recentlyAddedItems"> <div id="recentlyAddedItems">
</div> </div>
</td> </div>
</tr>
</table>
</div> </div>
</div> </div>
</body> </body>

View file

@ -17,9 +17,7 @@
</div> </div>
<div data-role="content"> <div data-role="content">
<table class="ehsContent"> <div class="ehsContent">
<tr>
<td>
<div id="resumableSection" style="display: none;"> <div id="resumableSection" style="display: none;">
<h1 class="listHeader">${HeaderResume}</h1> <h1 class="listHeader">${HeaderResume}</h1>
@ -33,9 +31,7 @@
<br /> <br />
<p>${MessageNoMovieSuggestionsAvailable}</p> <p>${MessageNoMovieSuggestionsAvailable}</p>
</div> </div>
</td> </div>
</tr>
</table>
</div> </div>
</div> </div>
</body> </body>

View file

@ -15,9 +15,7 @@
<a href="musicvideos.html">${TabMusicVideos}</a> <a href="musicvideos.html">${TabMusicVideos}</a>
</div> </div>
<div data-role="content"> <div data-role="content">
<table class="ehsContent squareEhsContent"> <div class="ehsContent squareEhsContent">
<tr>
<td>
<h1 class="listHeader">${HeaderLatestMusic}</h1> <h1 class="listHeader">${HeaderLatestMusic}</h1>
<div id="recentlyAddedSongs"> <div id="recentlyAddedSongs">
@ -36,9 +34,7 @@
<div id="topPlayedSongs"> <div id="topPlayedSongs">
</div> </div>
</div> </div>
</td> </div>
</tr>
</table>
</div> </div>
</div> </div>
</body> </body>

View file

@ -153,7 +153,7 @@
html += pagingHtml; html += pagingHtml;
$('#items', page).html(html).trigger('create').createPosterItemMenus(); $('#items', page).html(html).trigger('create').createCardMenus();
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -30,7 +30,7 @@
preferThumb: true preferThumb: true
}); });
$('#items', page).html(html).trigger('create').createPosterItemMenus(); $('#items', page).html(html).trigger('create').createCardMenus();
LibraryBrowser.saveQueryValues('channels', query); LibraryBrowser.saveQueryValues('channels', query);

View file

@ -239,7 +239,7 @@
var nowPlayingItem = session.NowPlayingItem; var nowPlayingItem = session.NowPlayingItem;
var className = nowPlayingItem ? 'card card-16-9 activeSession manualSize' : 'card card-16-9 activeSession manualSize'; var className = nowPlayingItem ? 'card activeSession' : 'card activeSession';
if (session.TranscodingInfo && session.TranscodingInfo.CompletionPercentage) { if (session.TranscodingInfo && session.TranscodingInfo.CompletionPercentage) {
className += ' transcodingSession'; className += ' transcodingSession';
@ -322,7 +322,7 @@
html += '</div>'; html += '</div>';
html += '<div class="posterItemOverlayTarget">'; html += '<div class="cardOverlayTarget">';
html += '<div class="sessionNowPlayingStreamInfo">' + DashboardPage.getSessionNowPlayingStreamInfo(session) + '</div>'; html += '<div class="sessionNowPlayingStreamInfo">' + DashboardPage.getSessionNowPlayingStreamInfo(session) + '</div>';
html += '<div class="sessionNowPlayingTime">' + DashboardPage.getSessionNowPlayingTime(session) + '</div>'; html += '<div class="sessionNowPlayingTime">' + DashboardPage.getSessionNowPlayingTime(session) + '</div>';
@ -978,7 +978,7 @@ $(document).on('pagebeforeshow', "#dashboardPage", DashboardPage.onPageShow)
showOverlayTimeout = null; showOverlayTimeout = null;
} }
$('.posterItemOverlayTarget:visible', this).each(function () { $('.cardOverlayTarget:visible', this).each(function () {
var elem = this; var elem = this;
@ -990,7 +990,7 @@ $(document).on('pagebeforeshow', "#dashboardPage", DashboardPage.onPageShow)
}); });
$('.posterItemOverlayTarget:visible', this).stop().animate({ "height": "0" }, function () { $('.cardOverlayTarget:visible', this).stop().animate({ "height": "0" }, function () {
$(this).hide(); $(this).hide();
@ -1005,7 +1005,7 @@ $(document).on('pagebeforeshow', "#dashboardPage", DashboardPage.onPageShow)
return; return;
} }
var innerElem = $('.posterItemOverlayTarget', elem); var innerElem = $('.cardOverlayTarget', elem);
innerElem.show().each(function () { innerElem.show().each(function () {

View file

@ -14,7 +14,7 @@
var html = ''; var html = '';
html += "<div class='card card-1-1'>"; html += "<div class='card squareCard'>";
html += '<div class="cardBox visualCardBox">'; html += '<div class="cardBox visualCardBox">';
html += '<div class="cardScalable">'; html += '<div class="cardScalable">';

View file

@ -44,8 +44,6 @@
updateFilterControls(); updateFilterControls();
var screenWidth = $(window).width();
if (view == "List") { if (view == "List") {
html = LibraryBrowser.getListViewHtml({ html = LibraryBrowser.getListViewHtml({
@ -60,7 +58,7 @@
shape: "backdrop", shape: "backdrop",
showTitle: true, showTitle: true,
showParentTitle: true, showParentTitle: true,
overlayText: screenWidth >= 600, overlayText: true,
selectionPanel: true, selectionPanel: true,
lazy: true, lazy: true,
context: 'tv' context: 'tv'
@ -69,7 +67,7 @@
html += pagingHtml; html += pagingHtml;
$('.itemsContainer', page).html(html).trigger('create').createPosterItemMenus().trigger('itemsrendered'); $('.itemsContainer', page).html(html).trigger('create').createCardMenus().trigger('itemsrendered');
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -3,11 +3,11 @@
function getSections() { function getSections() {
return [ return [
{ name: Globalize.translate('HeaderFavoriteMovies'), types: "Movie", id: "favoriteMovies", shape: 'backdrop', preferThumb: true, showTitle: false }, { name: Globalize.translate('HeaderFavoriteMovies'), types: "Movie", id: "favoriteMovies", shape: 'homePageBackdrop', preferThumb: true, showTitle: false },
{ name: Globalize.translate('HeaderFavoriteShows'), types: "Series", id: "favoriteShows", shape: 'backdrop', preferThumb: true, showTitle: false }, { name: Globalize.translate('HeaderFavoriteShows'), types: "Series", id: "favoriteShows", shape: 'homePageBackdrop', preferThumb: true, showTitle: false },
{ name: Globalize.translate('HeaderFavoriteEpisodes'), types: "Episode", id: "favoriteEpisode", shape: 'backdrop', preferThumb: false, showTitle: true, showParentTitle: true }, { name: Globalize.translate('HeaderFavoriteEpisodes'), types: "Episode", id: "favoriteEpisode", shape: 'homePageBackdrop', preferThumb: false, showTitle: true, showParentTitle: true },
{ name: Globalize.translate('HeaderFavoriteGames'), types: "Game", id: "favoriteGames", shape: 'auto', preferThumb: false, showTitle: true }, { name: Globalize.translate('HeaderFavoriteGames'), types: "Game", id: "favoriteGames", shape: 'auto', preferThumb: false, showTitle: true },
{ name: Globalize.translate('HeaderFavoriteAlbums'), types: "MusicAlbum", id: "favoriteAlbums", shape: 'square', preferThumb: false, showTitle: true, overlayText: false, showParentTitle: true } { name: Globalize.translate('HeaderFavoriteAlbums'), types: "MusicAlbum", id: "favoriteAlbums", shape: 'homePageSquare', preferThumb: false, showTitle: true, overlayText: false, showParentTitle: true }
]; ];
} }
@ -44,7 +44,7 @@
items: result.Items, items: result.Items,
preferThumb: section.preferThumb, preferThumb: section.preferThumb,
shape: section.shape, shape: section.shape,
overlayText: section.overlayText !== false && screenWidth >= 600, overlayText: section.overlayText !== false,
context: 'home-favorites', context: 'home-favorites',
showTitle: section.showTitle, showTitle: section.showTitle,
showParentTitle: section.showParentTitle, showParentTitle: section.showParentTitle,
@ -62,7 +62,7 @@
html += '</div>'; html += '</div>';
} }
$(elem).html(html).trigger('create').createPosterItemMenus(); $(elem).html(html).trigger('create').createCardMenus();
}); });
} }

View file

@ -50,7 +50,7 @@
html += pagingHtml; html += pagingHtml;
$('#items', page).html(html).trigger('create').createPosterItemMenus(); $('#items', page).html(html).trigger('create').createCardMenus();
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -64,7 +64,7 @@
html += pagingHtml; html += pagingHtml;
$('#items', page).html(html).trigger('create').createPosterItemMenus(); $('#items', page).html(html).trigger('create').createCardMenus();
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -24,7 +24,7 @@
shape: 'auto', shape: 'auto',
lazy: true lazy: true
})).trigger('create').createPosterItemMenus(); })).trigger('create').createCardMenus();
}); });
@ -55,7 +55,7 @@
shape: 'auto', shape: 'auto',
lazy: true lazy: true
})).trigger('create').createPosterItemMenus(); })).trigger('create').createCardMenus();
}); });

View file

@ -52,7 +52,7 @@
html += pagingHtml; html += pagingHtml;
$('#items', page).html(html).trigger('create').createPosterItemMenus(); $('#items', page).html(html).trigger('create').createCardMenus();
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -41,7 +41,7 @@
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount); html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
$('#items', page).html(html).trigger('create').createPosterItemMenus(); $('#items', page).html(html).trigger('create').createCardMenus();
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -145,7 +145,7 @@
html += LibraryBrowser.getPosterViewHtml({ html += LibraryBrowser.getPosterViewHtml({
items: items, items: items,
preferThumb: true, preferThumb: true,
shape: 'backdrop', shape: 'homePageBackdrop',
context: 'home', context: 'home',
showUnplayedIndicator: false, showUnplayedIndicator: false,
showChildCountIndicator: true, showChildCountIndicator: true,
@ -154,7 +154,7 @@
html += '</div>'; html += '</div>';
} }
$(elem).html(html).trigger('create').createPosterItemMenus(); $(elem).html(html).trigger('create').createCardMenus();
}); });
} }
@ -180,7 +180,7 @@
html += LibraryBrowser.getPosterViewHtml({ html += LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
preferThumb: true, preferThumb: true,
shape: 'autosmall', shape: 'auto',
showTitle: true, showTitle: true,
centerText: true, centerText: true,
lazy: true lazy: true
@ -188,7 +188,7 @@
html += '</div>'; html += '</div>';
} }
$(elem).html(html).trigger('create').createPosterItemMenus(); $(elem).html(html).trigger('create').createCardMenus();
}); });
} }
@ -227,7 +227,7 @@
} }
$(elem).html(html).trigger('create').createPosterItemMenus(); $(elem).html(html).trigger('create').createCardMenus();
handleLibraryLinkNavigations(elem); handleLibraryLinkNavigations(elem);
}); });
@ -263,7 +263,7 @@
html += '</div>'; html += '</div>';
} }
$(elem).html(html).trigger('create').createPosterItemMenus(); $(elem).html(html).trigger('create').createCardMenus();
handleLibraryLinkNavigations(elem); handleLibraryLinkNavigations(elem);
}); });
@ -296,7 +296,7 @@
html += LibraryBrowser.getPosterViewHtml({ html += LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
preferBackdrop: true, preferBackdrop: true,
shape: 'backdrop', shape: 'homePageBackdrop',
overlayText: screenWidth >= 600, overlayText: screenWidth >= 600,
showTitle: true, showTitle: true,
showParentTitle: true, showParentTitle: true,
@ -306,7 +306,7 @@
html += '</div>'; html += '</div>';
} }
$(elem).html(html).trigger('create').createPosterItemMenus(); $(elem).html(html).trigger('create').createCardMenus();
}); });
} }
@ -379,7 +379,7 @@
} }
html += LibraryBrowser.getPosterViewHtml({ html += LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
shape: 'auto', shape: 'autohome',
defaultShape: 'square', defaultShape: 'square',
showTitle: true, showTitle: true,
centerText: true, centerText: true,
@ -387,7 +387,7 @@
lazy: true lazy: true
}); });
$('#channel' + channel.Id + '', page).html(html).trigger('create').createPosterItemMenus(); $('#channel' + channel.Id + '', page).html(html).trigger('create').createCardMenus();
}); });
} }
@ -417,7 +417,7 @@
html += LibraryBrowser.getPosterViewHtml({ html += LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
shape: "autosmall", shape: "autohome",
showTitle: true, showTitle: true,
showParentTitle: true, showParentTitle: true,
overlayText: screenWidth >= 600, overlayText: screenWidth >= 600,
@ -425,7 +425,7 @@
lazy: true lazy: true
}); });
elem.html(html).trigger('create').createPosterItemMenus(); elem.html(html).trigger('create').createCardMenus();
}); });
} }
@ -473,13 +473,13 @@
Sections.loadRecentlyAdded(elem, userId); Sections.loadRecentlyAdded(elem, userId);
} }
else if (section == 'librarytiles') { else if (section == 'librarytiles') {
Sections.loadLibraryTiles(elem, userId, 'backdrop', index); Sections.loadLibraryTiles(elem, userId, 'homePageBackdrop', index);
} }
else if (section == 'smalllibrarytiles') { else if (section == 'smalllibrarytiles') {
Sections.loadLibraryTiles(elem, userId, 'miniBackdrop', index); Sections.loadLibraryTiles(elem, userId, 'homePageSmallBackdrop', index);
} }
else if (section == 'smalllibrarytiles-automobile') { else if (section == 'smalllibrarytiles-automobile') {
Sections.loadLibraryTiles(elem, userId, 'miniBackdrop', index, true); Sections.loadLibraryTiles(elem, userId, 'homePageSmallBackdrop', index, true);
} }
else if (section == 'librarybuttons') { else if (section == 'librarybuttons') {
Sections.loadlibraryButtons(elem, userId, index); Sections.loadlibraryButtons(elem, userId, index);
@ -493,7 +493,7 @@
} }
else if (section == 'folders') { else if (section == 'folders') {
Sections.loadLibraryFolders(elem, userId, 'backdrop', index); Sections.loadLibraryFolders(elem, userId, 'homePageBackdrop', index);
} else if (section == 'latestchannelmedia') { } else if (section == 'latestchannelmedia') {
Sections.loadLatestChannelMedia(elem, userId); Sections.loadLatestChannelMedia(elem, userId);

View file

@ -494,7 +494,7 @@
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount); html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
$('#items', page).html(html).trigger('create').createPosterItemMenus(); $('#items', page).html(html).trigger('create').createCardMenus();
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {

View file

@ -343,13 +343,6 @@
$('#themeSongsCollapsible', page).hide(); $('#themeSongsCollapsible', page).hide();
$('#themeVideosCollapsible', page).hide(); $('#themeVideosCollapsible', page).hide();
if (!item.SoundtrackIds || !item.SoundtrackIds.length) {
$('#soundtracksCollapsible', page).hide();
} else {
$('#soundtracksCollapsible', page).show();
renderSoundtracks(page, item);
}
if (item.Type == "MusicAlbum") { if (item.Type == "MusicAlbum") {
renderMusicVideos(page, item, user); renderMusicVideos(page, item, user);
} else { } else {
@ -507,31 +500,6 @@
return html; return html;
} }
function renderSoundtracks(page, item) {
if (item.Type == "MusicAlbum") {
$('#soundtracksHeader', page).html("This album is the soundtrack for ...");
} else {
$('#soundtracksHeader', page).html("Soundtrack(s)");
}
ApiClient.getItems(Dashboard.getCurrentUserId(), {
Ids: item.SoundtrackIds.join(","),
ItemFields: "PrimaryImageAspectRatio,ItemCounts,AudioInfo",
SortBy: "SortName"
}).done(function (result) {
var html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: item.Type == "MusicAlbum" ? "portrait" : "square"
});
$('#soundtracksContent', page).html(html);
});
}
function renderSiblingLinks(page, item, context) { function renderSiblingLinks(page, item, context) {
$('.lnkSibling', page).addClass('hide'); $('.lnkSibling', page).addClass('hide');
@ -634,7 +602,7 @@
var html = LibraryBrowser.getPosterViewHtml({ var html = LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
shape: item.Type == "MusicAlbum" ? "square" : "portrait", shape: item.Type == "MusicAlbum" ? "detailPageSquare" : "detailPagePortrait",
showParentTitle: item.Type == "MusicAlbum", showParentTitle: item.Type == "MusicAlbum",
centerText: item.Type != "MusicAlbum", centerText: item.Type != "MusicAlbum",
showTitle: item.Type == "MusicAlbum" || item.Type == "Game", showTitle: item.Type == "MusicAlbum" || item.Type == "Game",
@ -642,7 +610,7 @@
context: context context: context
}); });
$('#similarContent', page).html(html).createPosterItemMenus(); $('#similarContent', page).html(html).createCardMenus();
}); });
} }
@ -767,19 +735,21 @@
if (item.Type == "Series") { if (item.Type == "Series") {
html = LibraryBrowser.getPosterViewHtml({ html = LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
shape: "portrait", shape: "detailPagePortrait",
showTitle: true, showTitle: false,
centerText: true, centerText: true,
context: context context: context,
overlayText: true
}); });
} }
else if (item.Type == "Season") { else if (item.Type == "Season") {
html = LibraryBrowser.getPosterViewHtml({ html = LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
shape: "smallBackdrop", shape: "detailPage169",
showTitle: true, showTitle: true,
displayAsSpecial: item.Type == "Season" && item.IndexNumber, displayAsSpecial: item.Type == "Season" && item.IndexNumber,
context: context context: context,
overlayText: true
}); });
} }
else if (item.Type == "GameSystem") { else if (item.Type == "GameSystem") {
@ -792,7 +762,7 @@
}); });
} }
$('#childrenContent', page).html(html).createPosterItemMenus(); $('#childrenContent', page).html(html).createCardMenus();
if (item.Type == "BoxSet") { if (item.Type == "BoxSet") {
@ -865,7 +835,7 @@
renderCollectionItemType(page, { name: 'Titles' }, items, user); renderCollectionItemType(page, { name: 'Titles' }, items, user);
} }
$('.collectionItems', page).trigger('create').createPosterItemMenus(); $('.collectionItems', page).trigger('create').createCardMenus();
} }
function renderCollectionItemType(page, type, items, user, context) { function renderCollectionItemType(page, type, items, user, context) {
@ -885,7 +855,7 @@
html += '<div class="detailSectionContent">'; html += '<div class="detailSectionContent">';
var shape = type.type == 'MusicAlbum' ? 'square' : 'portrait'; var shape = type.type == 'MusicAlbum' ? 'detailPageSquare' : 'detailPagePortrait';
html += LibraryBrowser.getPosterViewHtml({ html += LibraryBrowser.getPosterViewHtml({
items: items, items: items,
@ -1101,7 +1071,7 @@
var onclick = item.PlayAccess == 'Full' ? ' onclick="ItemDetailPage.play(' + chapter.StartPositionTicks + ');"' : ''; var onclick = item.PlayAccess == 'Full' ? ' onclick="ItemDetailPage.play(' + chapter.StartPositionTicks + ');"' : '';
html += '<a class="card card-16-9 manualSize detailPage169Card" href="#play-Chapter-' + i + '"' + onclick + '>'; html += '<a class="card detailPage169Card" href="#play-Chapter-' + i + '"' + onclick + '>';
html += '<div class="cardBox">'; html += '<div class="cardBox">';
html += '<div class="cardScalable">'; html += '<div class="cardScalable">';
@ -1306,7 +1276,7 @@
var item = items[i]; var item = items[i];
var cssClass = "card card-16-9 manualSize detailPage169Card"; var cssClass = "card detailPage169Card";
var href = "itemdetails.html?id=" + item.Id; var href = "itemdetails.html?id=" + item.Id;

View file

@ -1,5 +1,7 @@
var LibraryBrowser = (function (window, document, $, screen, store) { var LibraryBrowser = (function (window, document, $, screen, store) {
var pageSizeKey = 'pagesize_v2';
$(function () { $(function () {
$("body").on("create", function () { $("body").on("create", function () {
$(".lazy").unveil(200); $(".lazy").unveil(200);
@ -11,7 +13,7 @@
return { return {
getDefaultPageSize: function () { getDefaultPageSize: function () {
var saved = store.getItem('pagesize__'); var saved = store.getItem(pageSizeKey);
if (saved) { if (saved) {
return parseInt(saved); return parseInt(saved);
@ -20,12 +22,12 @@
if (window.location.toString().toLowerCase().indexOf('localhost') != -1) { if (window.location.toString().toLowerCase().indexOf('localhost') != -1) {
return 100; return 100;
} }
return 20; return 50;
}, },
getDefaultItemsView: function (view, mobileView) { getDefaultItemsView: function (view, mobileView) {
return $.browser.mobile ? mobileView : view; return view;
}, },
@ -564,7 +566,7 @@
return ''; return '';
}, },
getUserDataCssClass: function(key) { getUserDataCssClass: function (key) {
return 'libraryItemUserData' + key; return 'libraryItemUserData' + key;
}, },
@ -750,25 +752,25 @@
var primaryImageAspectRatio; var primaryImageAspectRatio;
if (options.shape == 'auto' || options.shape == 'autosmall') { if (options.shape == 'auto' || options.shape == 'autohome') {
primaryImageAspectRatio = LibraryBrowser.getAveragePrimaryImageAspectRatio(items); primaryImageAspectRatio = LibraryBrowser.getAveragePrimaryImageAspectRatio(items);
if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1.777777778) < .3) { if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1.777777778) < .3) {
options.shape = options.shape == 'auto' ? 'backdrop' : 'smallBackdrop'; options.shape = options.shape == 'auto' ? 'backdrop' : 'homePageBackdrop';
} else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1) < .33) { } else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1) < .33) {
options.coverImage = true; options.coverImage = true;
options.shape = 'square'; options.shape = options.shape == 'auto' ? 'square' : 'homePageSquare';
} else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1.3333334) < .01) { } else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1.3333334) < .01) {
options.coverImage = true; options.coverImage = true;
options.shape = 'square'; options.shape = options.shape == 'auto' ? 'square' : 'homePageSquare';
} else if (primaryImageAspectRatio && primaryImageAspectRatio > 1.9) { } else if (primaryImageAspectRatio && primaryImageAspectRatio > 1.9) {
options.shape = 'banner'; options.shape = 'banner';
options.coverImage = true; options.coverImage = true;
} else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 0.6666667) < .2) { } else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 0.6666667) < .2) {
options.shape = 'portrait'; options.shape = options.shape == 'auto' ? 'portrait' : 'homePagePortrait';
} else { } else {
options.shape = options.defaultShape || 'portrait'; options.shape = options.defaultShape || (options.shape == 'auto' ? 'portrait' : 'homePagePortrait');
} }
} }
@ -974,17 +976,13 @@
background = defaultBackground; background = defaultBackground;
} }
var cssClass = "posterItem"; var cssClass = "card";
if (options.transparent !== false) { if (options.transparent !== false) {
cssClass += " transparentPosterItem"; cssClass += " transparentCard";
} }
if (options.borderless) { cssClass += ' ' + options.shape + 'Card';
cssClass += " borderlessPosterItem";
}
cssClass += ' ' + options.shape + 'PosterItem';
var mediaSourceCount = item.MediaSourceCount || 1; var mediaSourceCount = item.MediaSourceCount || 1;
@ -995,17 +993,13 @@
} }
if (options.showChildCountIndicator && item.ChildCount) { if (options.showChildCountIndicator && item.ChildCount) {
cssClass += ' groupedPosterItem'; cssClass += ' groupedCard';
if (item.Type == 'Series') { if (item.Type == 'Series') {
cssClass += ' unplayedGroupings'; cssClass += ' unplayedGroupings';
} }
} }
if (options.showChildCountIndicator) {
cssClass += ' groupingPosterItem';
}
var dataAttributes = LibraryBrowser.getItemDataAttributes(item, options); var dataAttributes = LibraryBrowser.getItemDataAttributes(item, options);
html += '<a' + dataAttributes + ' class="' + cssClass + '" href="' + href + '">'; html += '<a' + dataAttributes + ' class="' + cssClass + '" href="' + href + '">';
@ -1020,9 +1014,9 @@
style += "background-color:" + background + ";"; style += "background-color:" + background + ";";
} }
var imageCssClass = 'posterItemImage'; var imageCssClass = 'cardImage';
if (options.coverImage) { if (options.coverImage) {
imageCssClass += " coveredPosterItemImage"; imageCssClass += " coveredCardImage";
} }
var dataSrc = ""; var dataSrc = "";
@ -1032,11 +1026,14 @@
dataSrc = ' data-src="' + imgUrl + '"'; dataSrc = ' data-src="' + imgUrl + '"';
} }
var progressHtml = options.showProgress === false || item.IsFolder ? '' : LibraryBrowser.getItemProgressBarHtml((item.Type == 'Recording' ? item : item.UserData)); html += '<div class="cardBox">';
html += '<div class="cardScalable">';
html += '<div class="' + imageCssClass + '" style="' + style + '"' + dataSrc + '>'; html += '<div class="cardPadder"></div>';
html += '<div class="cardContent">';
html += '<div class="' + imageCssClass + '" style="' + style + '"' + dataSrc + '></div>';
html += '<div class="posterItemOverlayTarget"></div>'; html += '<div class="cardOverlayTarget"></div>';
if (item.LocationType == "Offline" || item.LocationType == "Virtual") { if (item.LocationType == "Offline" || item.LocationType == "Virtual") {
if (options.showLocationTypeIndicator !== false) { if (options.showLocationTypeIndicator !== false) {
@ -1060,36 +1057,143 @@
// Render this pre-enhanced to save on jquery mobile dom manipulation // Render this pre-enhanced to save on jquery mobile dom manipulation
html += '<div class="itemSelectionPanel" onclick="return false;" style="display:none;"><div class="ui-checkbox ui-mini"><label class="ui-btn ui-corner-all ui-btn-inherit ui-btn-icon-left ui-checkbox-off" for="' + chkItemSelectId + '">Select</label><input id="' + chkItemSelectId + '" type="checkbox" class="chkItemSelect" data-enhanced="true" /></div></div>'; html += '<div class="itemSelectionPanel" onclick="return false;" style="display:none;"><div class="ui-checkbox ui-mini"><label class="ui-btn ui-corner-all ui-btn-inherit ui-btn-icon-left ui-checkbox-off" for="' + chkItemSelectId + '">Select</label><input id="' + chkItemSelectId + '" type="checkbox" class="chkItemSelect" data-enhanced="true" /></div></div>';
}
var footerText = LibraryBrowser.getCardFooterText(item, options, imgUrl, forceName);
var footerOverlayed = false;
if (options.overlayText || (forceName && !options.showTitle)) {
html += footerText;
footerOverlayed = true;
}
// cardContent
html += '</div>';
// cardScalable
html += '</div>';
if (!options.overlayText && !footerOverlayed) {
html += footerText;
}
// cardBox
html += '</div>';
//var progressHtml = options.showProgress === false || item.IsFolder ? '' : LibraryBrowser.getItemProgressBarHtml((item.Type == 'Recording' ? item : item.UserData));
//if (!options.overlayText) {
// if (progressHtml) {
// html += '<div class="posterItemTextOverlay">';
// html += "<div class='posterItemProgress miniPosterItemProgress'>";
// html += progressHtml || "&nbsp;";
// html += "</div>";
// html += "</div>";
// }
//}
//html += '</div>';
//var name = LibraryBrowser.getPosterViewDisplayName(item, options.displayAsSpecial);
//if (!imgUrl && !options.showTitle) {
// html += "<div class='posterItemDefaultText'>";
// html += htmlEncode(name);
// html += "</div>";
//}
//var overlayText = options.overlayText || (forceName && !options.showTitle);
//if (overlayText) {
// html += '<div class="posterItemTextOverlay">';
//}
//cssClass = options.centerText ? "posterItemText posterItemTextCentered" : "posterItemText";
//var lines = [];
//if (options.showParentTitle) {
// lines.push(item.EpisodeTitle ? item.Name : (item.SeriesName || item.Album || item.AlbumArtist || item.GameSystem || ""));
//}
//if (options.showTitle || forceName) {
// lines.push(htmlEncode(name));
//}
//if (options.showItemCounts) {
// var itemCountHtml = LibraryBrowser.getItemCountsHtml(options, item);
// lines.push(itemCountHtml);
//}
//if (options.showPremiereDate && item.PremiereDate) {
// try {
// lines.push(LibraryBrowser.getPremiereDateText(item));
// } catch (err) {
// lines.push('');
// }
//}
//if (options.showYear) {
// lines.push(item.ProductionYear || '');
//}
//html += LibraryBrowser.getPosterItemTextLines(lines, cssClass, !options.overlayText);
//if (options.overlayText) {
// if (progressHtml) {
// html += "<div class='posterItemText posterItemProgress'>";
// html += progressHtml || "&nbsp;";
// html += "</div>";
// }
//}
//if (overlayText) {
// html += "</div>";
//}
html += "</a>";
} }
return html;
},
getCardFooterText: function (item, options, imgUrl, forceName) {
var html = '';
html += '<div class="cardFooter">';
var progressHtml = options.showProgress === false || item.IsFolder ? '' : LibraryBrowser.getItemProgressBarHtml((item.Type == 'Recording' ? item : item.UserData));
if (!options.overlayText) { if (!options.overlayText) {
if (progressHtml) { if (progressHtml) {
html += '<div class="posterItemTextOverlay">'; html += "<div class='cardProgress miniCardProgress'>";
html += "<div class='posterItemProgress miniPosterItemProgress'>"; html += (progressHtml || "&nbsp;");
html += progressHtml || "&nbsp;";
html += "</div>";
html += "</div>"; html += "</div>";
} }
} }
html += '</div>';
var name = LibraryBrowser.getPosterViewDisplayName(item, options.displayAsSpecial); var name = LibraryBrowser.getPosterViewDisplayName(item, options.displayAsSpecial);
if (!imgUrl && !options.showTitle) { if (!imgUrl && !options.showTitle) {
html += "<div class='posterItemDefaultText'>"; html += "<div class='cardDefaultText'>";
html += htmlEncode(name); html += htmlEncode(name);
html += "</div>"; html += "</div>";
} }
var overlayText = options.overlayText || (forceName && !options.showTitle); var cssClass = options.centerText ? "cardText cardTextCentered" : "cardText";
if (overlayText) {
html += '<div class="posterItemTextOverlay">';
}
cssClass = options.centerText ? "posterItemText posterItemTextCentered" : "posterItemText";
var lines = []; var lines = [];
@ -1132,19 +1236,14 @@
if (options.overlayText) { if (options.overlayText) {
if (progressHtml) { if (progressHtml) {
html += "<div class='posterItemText posterItemProgress'>"; html += "<div class='cardText cardProgress'>";
html += progressHtml || "&nbsp;"; html += progressHtml || "&nbsp;";
html += "</div>"; html += "</div>";
} }
} }
if (overlayText) { //cardFooter
html += "</div>"; html += "</div>";
}
html += "</a>";
}
return html; return html;
}, },
@ -1522,7 +1621,7 @@
if (limit && options.updatePageSizeSetting !== false) { if (limit && options.updatePageSizeSetting !== false) {
try { try {
store.setItem('pagesize__', limit); store.setItem(pageSizeKey, limit);
} catch (e) { } catch (e) {
} }
@ -1598,7 +1697,7 @@
if (query.Limit && updatePageSizeSetting !== false) { if (query.Limit && updatePageSizeSetting !== false) {
try { try {
store.setItem('pagesize__', query.Limit); store.setItem(pageSizeKey, query.Limit);
} catch (e) { } catch (e) {
} }

View file

@ -9,7 +9,7 @@
showOverlayTimeout = null; showOverlayTimeout = null;
} }
$('.posterItemOverlayTarget:visible', this).each(function () { $('.cardOverlayTarget:visible', this).each(function () {
var elem = this; var elem = this;
@ -21,28 +21,30 @@
}); });
$('.posterItemOverlayTarget:visible', this).stop().animate({ "height": "0" }, function () { $('.cardOverlayTarget:visible', this).stop().animate({ "height": "0" }, function () {
$(this).hide(); $(this).hide();
}); });
} }
function getOverlayHtml(item, currentUser, posterItem, commands) { function getOverlayHtml(item, currentUser, card, commands) {
var html = ''; var html = '';
html += '<div class="posterItemOverlayInner">'; html += '<div class="cardOverlayInner">';
var isSmallItem = $(posterItem).hasClass('smallBackdropPosterItem') || $(posterItem).hasClass('miniBackdropPosterItem'); var className = card.className.toLowerCase();
var isMiniItem = $(posterItem).hasClass('miniBackdropPosterItem');
var isPortrait = $(posterItem).hasClass('portraitPosterItem'); var isMiniItem = className.indexOf('mini') != -1;
var isSquare = $(posterItem).hasClass('squarePosterItem'); var isSmallItem = isMiniItem || className.indexOf('small') != -1;
var isPortrait = className.indexOf('portrait') != -1;
var isSquare = className.indexOf('square') != -1;
var parentName = isSmallItem || isMiniItem || isPortrait ? null : item.SeriesName; var parentName = isSmallItem || isMiniItem || isPortrait ? null : item.SeriesName;
var name = LibraryBrowser.getPosterViewDisplayName(item, true); var name = LibraryBrowser.getPosterViewDisplayName(item, true);
html += '<div style="font-weight:bold;margin-bottom:1em;">'; html += '<div style="margin-bottom:1em;">';
var logoHeight = isSmallItem || isMiniItem ? 20 : 26; var logoHeight = isSmallItem || isMiniItem ? 20 : 26;
var maxLogoWidth = isPortrait ? 100 : 200; var maxLogoWidth = isPortrait ? 100 : 200;
var imgUrl; var imgUrl;
@ -210,7 +212,7 @@
return false; return false;
} }
function onPosterItemTapHold(e) { function onCardTapHold(e) {
showContextMenu(this); showContextMenu(this);
@ -218,26 +220,26 @@
return false; return false;
} }
function showContextMenu(posterItem) { function showContextMenu(card) {
$('.tapHoldMenu').popup("close").remove(); $('.tapHoldMenu').popup("close").remove();
var displayContextItem = posterItem; var displayContextItem = card;
if ($(posterItem).hasClass('listviewMenuButton')) { if ($(card).hasClass('listviewMenuButton')) {
posterItem = $(posterItem).parents('.listItem')[0]; card = $(card).parents('.listItem')[0];
} }
var itemId = posterItem.getAttribute('data-itemid'); var itemId = card.getAttribute('data-itemid');
var commands = posterItem.getAttribute('data-commands').split(','); var commands = card.getAttribute('data-commands').split(',');
var itemType = posterItem.getAttribute('data-itemtype'); var itemType = card.getAttribute('data-itemtype');
var mediaType = posterItem.getAttribute('data-mediatype'); var mediaType = card.getAttribute('data-mediatype');
var playbackPositionTicks = parseInt(posterItem.getAttribute('data-positionticks') || '0'); var playbackPositionTicks = parseInt(card.getAttribute('data-positionticks') || '0');
var playAccess = posterItem.getAttribute('data-playaccess'); var playAccess = card.getAttribute('data-playaccess');
var locationType = posterItem.getAttribute('data-locationtype'); var locationType = card.getAttribute('data-locationtype');
var isPlaceHolder = posterItem.getAttribute('data-placeholder') == 'true'; var isPlaceHolder = card.getAttribute('data-placeholder') == 'true';
$(posterItem).addClass('hasContextMenu'); $(card).addClass('hasContextMenu');
Dashboard.getCurrentUser().done(function (user) { Dashboard.getCurrentUser().done(function (user) {
@ -246,7 +248,7 @@
html += '<ul data-role="listview" style="min-width: 240px;">'; html += '<ul data-role="listview" style="min-width: 240px;">';
html += '<li data-role="list-divider">' + Globalize.translate('HeaderMenu') + '</li>'; html += '<li data-role="list-divider">' + Globalize.translate('HeaderMenu') + '</li>';
var href = posterItem.getAttribute('data-href') || posterItem.href; var href = card.getAttribute('data-href') || card.href;
html += '<li><a href="' + href + '">' + Globalize.translate('ButtonOpen') + '</a></li>'; html += '<li><a href="' + href + '">' + Globalize.translate('ButtonOpen') + '</a></li>';
html += '<li><a href="' + href + '" target="_blank">' + Globalize.translate('ButtonOpenInNewTab') + '</a></li>'; html += '<li><a href="' + href + '" target="_blank">' + Globalize.translate('ButtonOpenInNewTab') + '</a></li>';
@ -288,7 +290,7 @@
var elem = $('.tapHoldMenu').popup({ positionTo: displayContextItem }).trigger('create').popup("open").on("popupafterclose", function () { var elem = $('.tapHoldMenu').popup({ positionTo: displayContextItem }).trigger('create').popup("open").on("popupafterclose", function () {
$(this).off("popupafterclose").remove(); $(this).off("popupafterclose").remove();
$(posterItem).removeClass('hasContextMenu'); $(card).removeClass('hasContextMenu');
}); });
$('.btnPlay', elem).on('click', onPlayButtonClick); $('.btnPlay', elem).on('click', onPlayButtonClick);
@ -308,15 +310,15 @@
return false; return false;
} }
function onGroupedPosterItemClick(e) { function onGroupedCardClick(e) {
var target = $(e.target); var target = $(e.target);
var posterItem = this; var card = this;
var itemId = posterItem.getAttribute('data-itemid'); var itemId = card.getAttribute('data-itemid');
var context = posterItem.getAttribute('data-context'); var context = card.getAttribute('data-context');
$(posterItem).addClass('hasContextMenu'); $(card).addClass('hasContextMenu');
var userId = Dashboard.getCurrentUserId(); var userId = Dashboard.getCurrentUserId();
@ -324,14 +326,14 @@
var options = { var options = {
Limit: parseInt($('.playedIndicator', posterItem).html() || '10'), Limit: parseInt($('.playedIndicator', card).html() || '10'),
Fields: "PrimaryImageAspectRatio,DateCreated", Fields: "PrimaryImageAspectRatio,DateCreated",
ParentId: itemId, ParentId: itemId,
IsFolder: false, IsFolder: false,
GroupItems: false GroupItems: false
}; };
if ($(posterItem).hasClass('unplayedGroupings')) { if ($(card).hasClass('unplayedGroupings')) {
options.IsPlayed = false; options.IsPlayed = false;
} }
@ -357,7 +359,7 @@
html += '<div>'; html += '<div>';
html += '<ul data-role="listview">'; html += '<ul data-role="listview">';
var href = posterItem.href || LibraryBrowser.getHref(item, context); var href = card.href || LibraryBrowser.getHref(item, context);
var header = Globalize.translate('HeaderLatestFromChannel').replace('{0}', '<a href="' + href + '">' + item.Name + '</a>'); var header = Globalize.translate('HeaderLatestFromChannel').replace('{0}', '<a href="' + href + '">' + item.Name + '</a>');
html += '<li data-role="list-divider">' + header + '</li>'; html += '<li data-role="list-divider">' + header + '</li>';
@ -418,7 +420,7 @@
var elem = $('.groupingMenu').popup().trigger('create').popup("open").on("popupafterclose", function () { var elem = $('.groupingMenu').popup().trigger('create').popup("open").on("popupafterclose", function () {
$(this).off("popupafterclose").remove(); $(this).off("popupafterclose").remove();
$(posterItem).removeClass('hasContextMenu'); $(card).removeClass('hasContextMenu');
}); });
}); });
@ -428,7 +430,7 @@
} }
$.fn.createPosterItemMenus = function () { $.fn.createCardMenus = function () {
var preventHover = false; var preventHover = false;
@ -442,7 +444,7 @@
return; return;
} }
var innerElem = $('.posterItemOverlayTarget', elem); var innerElem = $('.cardOverlayTarget', elem);
var id = elem.getAttribute('data-itemid'); var id = elem.getAttribute('data-itemid');
var commands = elem.getAttribute('data-commands').split(','); var commands = elem.getAttribute('data-commands').split(',');
@ -491,18 +493,18 @@
preventHover = true; preventHover = true;
} }
var elems = '.backdropPosterItem,.smallBackdropPosterItem,.portraitPosterItem,.squarePosterItem,.miniBackdropPosterItem'; var elems = '.card:not(.bannerCard)';
$('.posterItem', this).on('contextmenu.posterItemMenu', onPosterItemTapHold); $('.card', this).on('contextmenu.cardMenu', onCardTapHold);
$('.listviewMenuButton', this).on('click', onListViewMenuButtonClick); $('.listviewMenuButton', this).on('click', onListViewMenuButtonClick);
$('.groupedPosterItem', this).on('click', onGroupedPosterItemClick); $('.groupedCard', this).on('click', onGroupedCardClick);
return this.off('.posterItemHoverMenu') return this.off('.cardHoverMenu')
.on('mouseenter.posterItemHoverMenu', elems, onHoverIn) .on('mouseenter.cardHoverMenu', elems, onHoverIn)
.on('mouseleave.posterItemHoverMenu', elems, onHoverOut) .on('mouseleave.cardHoverMenu', elems, onHoverOut)
.on("touchstart.posterItemHoverMenu", elems, preventTouchHover); .on("touchstart.cardHoverMenu", elems, preventTouchHover);
}; };
function toggleSelections(page) { function toggleSelections(page) {
@ -539,7 +541,7 @@
var selection = $('.chkItemSelect:checked', page); var selection = $('.chkItemSelect:checked', page);
return selection.parents('.posterItem') return selection.parents('.card')
.map(function () { .map(function () {
return this.getAttribute('data-itemid'); return this.getAttribute('data-itemid');
@ -561,9 +563,9 @@
return; return;
} }
var names = $('.chkItemSelect:checked', page).parents('.posterItem').get().reverse().map(function (e) { var names = $('.chkItemSelect:checked', page).parents('.card').get().reverse().map(function (e) {
return $('.posterItemText', e).html(); return $('.cardText', e).html();
}).join('<br/>'); }).join('<br/>');
@ -657,32 +659,32 @@
$('.viewTabButton:first', page).trigger('click'); $('.viewTabButton:first', page).trigger('click');
}); });
function renderUserDataChanges(posterItem, userData) { function renderUserDataChanges(card, userData) {
if (userData.Played) { if (userData.Played) {
if (!$('.playedIndicator', posterItem).length) { if (!$('.playedIndicator', card).length) {
$('<div class="playedIndicator"></div>').insertAfter($('.posterItemOverlayTarget', posterItem)); $('<div class="playedIndicator"></div>').insertAfter($('.cardOverlayTarget', card));
} }
$('.playedIndicator', posterItem).html('<div class="ui-icon-check ui-btn-icon-notext"></div>'); $('.playedIndicator', card).html('<div class="ui-icon-check ui-btn-icon-notext"></div>');
$('.posterItemProgress', posterItem).remove(); $('.cardProgress', card).remove();
} }
else if (userData.UnplayedItemCount) { else if (userData.UnplayedItemCount) {
if (!$('.playedIndicator', posterItem).length) { if (!$('.playedIndicator', card).length) {
$('<div class="playedIndicator"></div>').insertAfter($('.posterItemOverlayTarget', posterItem)); $('<div class="playedIndicator"></div>').insertAfter($('.cardOverlayTarget', card));
} }
$('.playedIndicator', posterItem).html(userData.UnplayedItemCount); $('.playedIndicator', card).html(userData.UnplayedItemCount);
} }
else { else {
$('.playedIndicator', posterItem).remove(); $('.playedIndicator', card).remove();
var progressHtml = LibraryBrowser.getItemProgressBarHtml(userData); var progressHtml = LibraryBrowser.getItemProgressBarHtml(userData);
$('.posterItemProgress', posterItem).html(progressHtml); $('.cardProgress', card).html(progressHtml);
} }
} }
@ -694,7 +696,7 @@
this.setAttribute('data-positionticks', (userData.PlaybackPositionTicks || 0)); this.setAttribute('data-positionticks', (userData.PlaybackPositionTicks || 0));
if ($(this).hasClass('posterItem')) { if ($(this).hasClass('card')) {
renderUserDataChanges(this, userData); renderUserDataChanges(this, userData);
} }
}); });

View file

@ -41,7 +41,7 @@
html += pagingHtml; html += pagingHtml;
$('#items', page).html(html).trigger('create').createPosterItemMenus(); $('#items', page).html(html).trigger('create').createCardMenus();
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -37,7 +37,7 @@
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount); html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
$('#items', page).html(html).trigger('create').createPosterItemMenus(); $('#items', page).html(html).trigger('create').createCardMenus();
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -60,7 +60,7 @@
overlayText: screenWidth >= 600, overlayText: screenWidth >= 600,
coverImage: true coverImage: true
})).createPosterItemMenus(); })).createCardMenus();
} }
function reload(page) { function reload(page) {

View file

@ -130,17 +130,15 @@
function renderRecordings(page, result) { function renderRecordings(page, result) {
var screenWidth = $(window).width();
$('.recordingsTab', page).html(LibraryBrowser.getPosterViewHtml({ $('.recordingsTab', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
shape: "autosmall", shape: "homePageSquare",
showTitle: true, showTitle: true,
overlayText: screenWidth >= 600, overlayText: true,
coverImage: true coverImage: true
})).createPosterItemMenus(); })).createCardMenus();
} }
function renderSchedule(page, result) { function renderSchedule(page, result) {

View file

@ -3,7 +3,6 @@
function reload(page) { function reload(page) {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();
var screenWidth = $(window).width();
apiClient.getLiveTvRecommendedPrograms({ apiClient.getLiveTvRecommendedPrograms({
@ -16,15 +15,15 @@
var html = LibraryBrowser.getPosterViewHtml({ var html = LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
shape: "auto", shape: "homePageSquare",
showTitle: true, showTitle: true,
showParentTitle: true, showParentTitle: true,
overlayText: screenWidth >= 600, overlayText: true,
coverImage: true coverImage: true
}); });
$('.activeProgramItems', page).html(html).createPosterItemMenus(); $('.activeProgramItems', page).html(html).createCardMenus();
}); });
apiClient.getLiveTvRecommendedPrograms({ apiClient.getLiveTvRecommendedPrograms({
@ -39,15 +38,15 @@
var html = LibraryBrowser.getPosterViewHtml({ var html = LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
shape: "auto", shape: "homePageSquare",
showTitle: true, showTitle: true,
showParentTitle: true, showParentTitle: true,
overlayText: screenWidth >= 600, overlayText: true,
coverImage: true coverImage: true
}); });
$('.upcomingProgramItems', page).html(html).createPosterItemMenus(); $('.upcomingProgramItems', page).html(html).createCardMenus();
}); });
} }

View file

@ -126,7 +126,7 @@
for (var i = 0, length = users.length; i < length; i++) { for (var i = 0, length = users.length; i < length; i++) {
var user = users[i]; var user = users[i];
html += '<div class="card card-1-1"><div class="cardBox visualCardBox">'; html += '<div class="card squareCard alternateHover"><div class="cardBox visualCardBox">';
html += '<div class="cardScalable">'; html += '<div class="cardScalable">';

View file

@ -972,6 +972,15 @@
$('.itemVideo').off('mousemove.videoplayer keydown.videoplayer scroll.videoplayer'); $('.itemVideo').off('mousemove.videoplayer keydown.videoplayer scroll.videoplayer');
} }
self.canAutoPlayVideo = function () {
if ($.browser.msie || $.browser.mobile) {
return false;
}
return true;
};
self.playVideo = function (item, mediaSource, startPosition) { self.playVideo = function (item, mediaSource, startPosition) {
var mediaStreams = mediaSource.MediaStreams || []; var mediaStreams = mediaSource.MediaStreams || [];
@ -1062,7 +1071,7 @@
// Create video player // Create video player
var html = ''; var html = '';
var requiresNativeControls = $.browser.msie || $.browser.mobile; var requiresNativeControls = !self.canAutoPlayVideo();
// Can't autoplay in these browsers so we need to use the full controls // Can't autoplay in these browsers so we need to use the full controls
if (requiresNativeControls) { if (requiresNativeControls) {

View file

@ -399,10 +399,7 @@
translateItemsForPlayback(options.items).done(function (items) { translateItemsForPlayback(options.items).done(function (items) {
self.playInternal(items[0], options.startPositionTicks, user); self.playWithIntros(items, options, user);
self.playlist = items;
currentPlaylistIndex = 0;
}); });
} else { } else {
@ -415,10 +412,7 @@
translateItemsForPlayback(result.Items).done(function (items) { translateItemsForPlayback(result.Items).done(function (items) {
self.playInternal(items[0], options.startPositionTicks, user); self.playWithIntros(items, options, user);
self.playlist = items;
currentPlaylistIndex = 0;
}); });
}); });
@ -428,6 +422,27 @@
}; };
self.playWithIntros = function (items, options, user) {
var firstItem = items[0];
if (options.startPositionTicks || firstItem.MediaType !== 'Video' || !self.canAutoPlayVideo()) {
self.playInternal(firstItem, options.startPositionTicks, user);
self.playlist = items;
currentPlaylistIndex = 0;
}
ApiClient.getJSON(ApiClient.getUrl('Users/' + user.Id + '/Items/' + firstItem.Id + '/Intros')).done(function (intros) {
items = intros.Items.concat(items);
self.playInternal(items[0], options.startPositionTicks, user);
self.playlist = items;
currentPlaylistIndex = 0;
});
};
self.getBitrateSetting = function () { self.getBitrateSetting = function () {
return parseInt(store.getItem('preferredVideoBitrate') || '') || 1500000; return parseInt(store.getItem('preferredVideoBitrate') || '') || 1500000;
}; };

View file

@ -81,7 +81,7 @@
$('.noItemsMessage', page).show(); $('.noItemsMessage', page).show();
} }
$('.itemsContainer', page).html(html).trigger('create').createPosterItemMenus().trigger('itemsrendered'); $('.itemsContainer', page).html(html).trigger('create').createCardMenus().trigger('itemsrendered');
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -49,7 +49,8 @@
preferThumb: true, preferThumb: true,
context: 'movies', context: 'movies',
selectionPanel: true, selectionPanel: true,
lazy: true lazy: true,
overlayText: true
}); });
$('.itemsContainer', page).removeClass('timelineItemsContainer'); $('.itemsContainer', page).removeClass('timelineItemsContainer');
} }
@ -81,7 +82,8 @@
showTitle: false, showTitle: false,
centerText: true, centerText: true,
selectionPanel: true, selectionPanel: true,
lazy: true lazy: true,
overlayText: true
}); });
$('.itemsContainer', page).removeClass('timelineItemsContainer'); $('.itemsContainer', page).removeClass('timelineItemsContainer');
} }
@ -101,7 +103,7 @@
html += pagingHtml; html += pagingHtml;
$('.itemsContainer', page).html(html).trigger('create').createPosterItemMenus().trigger('itemsrendered'); $('.itemsContainer', page).html(html).trigger('create').createCardMenus().trigger('itemsrendered');
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -22,9 +22,11 @@
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({ $('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
items: items, items: items,
lazy: true lazy: true,
shape: 'homePagePortrait',
overlayText: true
})).trigger('create').createPosterItemMenus(); })).trigger('create').createCardMenus();
}); });
}); });

View file

@ -29,7 +29,9 @@
html += '<div>'; html += '<div>';
html += LibraryBrowser.getPosterViewHtml({ html += LibraryBrowser.getPosterViewHtml({
items: recommendation.Items, items: recommendation.Items,
lazy: true lazy: true,
shape: 'homePagePortrait',
overlayText: true
}); });
html += '</div>'; html += '</div>';
@ -68,12 +70,12 @@
$('#resumableItems', page).html(LibraryBrowser.getPosterViewHtml({ $('#resumableItems', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
preferBackdrop: true, preferBackdrop: true,
shape: 'backdrop', shape: 'homePageBackdrop',
overlayText: screenWidth >= 600, overlayText: true,
showTitle: true, showTitle: true,
lazy: true lazy: true
})).trigger('create').createPosterItemMenus(); })).trigger('create').createCardMenus();
}); });
@ -97,7 +99,7 @@
var html = recommendations.map(getRecommendationHtml).join(''); var html = recommendations.map(getRecommendationHtml).join('');
$('.noItemsMessage', page).hide(); $('.noItemsMessage', page).hide();
$('.recommendations', page).html(html).trigger('create').createPosterItemMenus(); $('.recommendations', page).html(html).trigger('create').createCardMenus();
}); });
}); });

View file

@ -44,7 +44,7 @@
html += pagingHtml; html += pagingHtml;
$('#items', page).html(html).trigger('create').createPosterItemMenus(); $('#items', page).html(html).trigger('create').createCardMenus();
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -62,7 +62,7 @@
html += pagingHtml; html += pagingHtml;
$('#items', page).html(html).trigger('create').createPosterItemMenus(); $('#items', page).html(html).trigger('create').createCardMenus();
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -76,7 +76,7 @@
html += pagingHtml; html += pagingHtml;
$('#items', page).html(html).trigger('create').createPosterItemMenus(); $('#items', page).html(html).trigger('create').createCardMenus();
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -62,7 +62,7 @@
html += pagingHtml; html += pagingHtml;
$('#items', page).html(html).trigger('create').createPosterItemMenus(); $('#items', page).html(html).trigger('create').createCardMenus();
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -51,7 +51,7 @@
html += pagingHtml; html += pagingHtml;
$('#items', page).html(html).trigger('create').createPosterItemMenus(); $('#items', page).html(html).trigger('create').createCardMenus();
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -22,10 +22,10 @@
items: items, items: items,
showUnplayedIndicator: false, showUnplayedIndicator: false,
showChildCountIndicator: true, showChildCountIndicator: true,
shape: "square", shape: "homePageSquare",
showTitle: true, showTitle: true,
showParentTitle: true showParentTitle: true
})).createPosterItemMenus(); })).createCardMenus();
}); });
@ -52,10 +52,10 @@
$('#recentlyPlayedSongs', page).html(LibraryBrowser.getPosterViewHtml({ $('#recentlyPlayedSongs', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
showUnplayedIndicator: false, showUnplayedIndicator: false,
shape: "square", shape: "homePageSquare",
showTitle: true, showTitle: true,
showParentTitle: true showParentTitle: true
})).createPosterItemMenus(); })).createCardMenus();
}); });
@ -82,10 +82,10 @@
$('#topPlayedSongs', page).html(LibraryBrowser.getPosterViewHtml({ $('#topPlayedSongs', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
showUnplayedIndicator: false, showUnplayedIndicator: false,
shape: "square", shape: "homePageSquare",
showTitle: true, showTitle: true,
showParentTitle: true showParentTitle: true
})).createPosterItemMenus(); })).createCardMenus();
}); });

View file

@ -59,7 +59,7 @@
var href = plugin.externalUrl ? plugin.externalUrl : "addplugin.html?name=" + encodeURIComponent(plugin.name) + "&guid=" + plugin.guid; var href = plugin.externalUrl ? plugin.externalUrl : "addplugin.html?name=" + encodeURIComponent(plugin.name) + "&guid=" + plugin.guid;
var target = plugin.externalUrl ? ' target="_blank"' : ''; var target = plugin.externalUrl ? ' target="_blank"' : '';
html += "<div class='card card-16-9'>"; html += "<div class='card backdropCard alternateHover'>";
html += '<div class="cardBox visualCardBox">'; html += '<div class="cardBox visualCardBox">';
html += '<div class="cardScalable">'; html += '<div class="cardScalable">';

View file

@ -53,7 +53,7 @@
html += pagingHtml; html += pagingHtml;
$('#items', page).html(html).trigger('create').createPosterItemMenus(); $('#items', page).html(html).trigger('create').createCardMenus();
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -22,7 +22,7 @@
$('#latestEpisodes', page).html(LibraryBrowser.getPosterViewHtml({ $('#latestEpisodes', page).html(LibraryBrowser.getPosterViewHtml({
items: items, items: items,
shape: "backdrop", shape: "homePageBackdrop",
preferThumb: true, preferThumb: true,
inheritThumb: false, inheritThumb: false,
showParentTitle: false, showParentTitle: false,
@ -31,7 +31,7 @@
overlayText: screenWidth >= 600, overlayText: screenWidth >= 600,
lazy: true lazy: true
})).trigger('create').createPosterItemMenus(); })).trigger('create').createCardMenus();
}); });
}); });

View file

@ -54,7 +54,7 @@
html += pagingHtml; html += pagingHtml;
$('#items', page).html(html).trigger('create').createPosterItemMenus(); $('#items', page).html(html).trigger('create').createCardMenus();
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -35,8 +35,6 @@
function loadNextUp(page, context) { function loadNextUp(page, context) {
var screenWidth = $(window).width();
var query = { var query = {
Limit: 24, Limit: 24,
@ -71,14 +69,14 @@
$('#nextUpItems', page).html(LibraryBrowser.getPosterViewHtml({ $('#nextUpItems', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
shape: "backdrop", shape: "homePageBackdrop",
showTitle: true, showTitle: true,
showParentTitle: true, showParentTitle: true,
overlayText: screenWidth >= 600, overlayText: true,
context: context, context: context,
lazy: true lazy: true
})).trigger('create').createPosterItemMenus(); })).trigger('create').createCardMenus();
}); });
} }
@ -114,14 +112,14 @@
$('#resumableItems', page).html(LibraryBrowser.getPosterViewHtml({ $('#resumableItems', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
shape: "backdrop", shape: "homePageBackdrop",
showTitle: true, showTitle: true,
showParentTitle: true, showParentTitle: true,
overlayText: screenWidth >= 600, overlayText: true,
lazy: true, lazy: true,
context: 'tv' context: 'tv'
})).trigger('create').createPosterItemMenus(); })).trigger('create').createCardMenus();
}); });
} }

View file

@ -89,7 +89,7 @@
html += pagingHtml; html += pagingHtml;
$('#items', page).html(html).trigger('create').createPosterItemMenus(); $('#items', page).html(html).trigger('create').createCardMenus();
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -53,7 +53,7 @@
html += pagingHtml; html += pagingHtml;
$('#items', page).html(html).trigger('create').createPosterItemMenus(); $('#items', page).html(html).trigger('create').createCardMenus();
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -39,7 +39,7 @@
$('#upcomingItems', page).html(LibraryBrowser.getPosterViewHtml({ $('#upcomingItems', page).html(LibraryBrowser.getPosterViewHtml({
items: items, items: items,
showLocationTypeIndicator: false, showLocationTypeIndicator: false,
shape: "backdrop", shape: "homePageBackdrop",
showTitle: true, showTitle: true,
showPremiereDate: true, showPremiereDate: true,
showPremiereDateIndex: true, showPremiereDateIndex: true,
@ -47,7 +47,7 @@
context: context || 'home-upcoming', context: context || 'home-upcoming',
lazy: true, lazy: true,
})).trigger('create').createPosterItemMenus(); })).trigger('create').createCardMenus();
}); });
}); });

View file

@ -25,9 +25,7 @@
</div> </div>
<br /> <br />
<div data-role="content"> <div data-role="content">
<table class="ehsContent"> <div class="ehsContent">
<tr>
<td>
<div class="scopedContent"> <div class="scopedContent">
<div id="resumableSection" style="display: none;"> <div id="resumableSection" style="display: none;">
@ -43,9 +41,7 @@
<div id="nextUpItems"> <div id="nextUpItems">
</div> </div>
<p class="noNextUpItems" style="display: none;">${NoNextUpItemsMessage}</p> <p class="noNextUpItems" style="display: none;">${NoNextUpItemsMessage}</p>
</td> </div>
</tr>
</table>
</div> </div>
</div> </div>
</body> </body>

View file

@ -23,18 +23,14 @@
<a href="tvstudios.html">${TabNetworks}</a> <a href="tvstudios.html">${TabNetworks}</a>
</div> </div>
<div data-role="content"> <div data-role="content">
<table class="ehsContent"> <div class="ehsContent">
<tr>
<td>
<div id="upcomingItems"> <div id="upcomingItems">
</div> </div>
<div class="noItemsMessage" style="display: none;"> <div class="noItemsMessage" style="display: none;">
<p>${MessageNothingHere}</p> <p>${MessageNothingHere}</p>
<p><a href="metadata.html">${MessagePleaseEnsureInternetMetadata}</a></p> <p><a href="metadata.html">${MessagePleaseEnsureInternetMetadata}</a></p>
</div> </div>
</td> </div>
</tr>
</table>
</div> </div>
</div> </div>
</body> </body>