diff --git a/dashboard-ui/channelslatest.html b/dashboard-ui/channelslatest.html index 4359d5d857..ebdead52e6 100644 --- a/dashboard-ui/channelslatest.html +++ b/dashboard-ui/channelslatest.html @@ -12,13 +12,9 @@
- - - - -
-
-
+
+
+
diff --git a/dashboard-ui/css/card.css b/dashboard-ui/css/card.css index a758efddf5..46ec60e204 100644 --- a/dashboard-ui/css/card.css +++ b/dashboard-ui/css/card.css @@ -9,8 +9,57 @@ 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 { - margin: 4px 4px; + margin: 4px; +} + +@media all and (max-width: 800px) { + + .cardBox { + margin: 2px; + } +} + +@media all and (max-width: 600px) { + + .cardBox { + margin: 1px; + } } .visualCardBox { @@ -29,20 +78,24 @@ position: relative; } -.card-16-9 .cardPadder { +.backdropCard .cardPadder { padding-bottom: 56.25%; } -.card-1-1 .cardPadder { +.squareCard .cardPadder { padding-bottom: 100%; } -.card-4-3 .cardPadder { +.letterBoxCard .cardPadder { padding-bottom: 75%; } -.card-3-2 .cardPadder { - padding-bottom: 66.666666666667%; +.portraitCard .cardPadder { + padding-bottom: 150%; +} + +.bannerCard .cardPadder { + padding-bottom: 18.5%; } .cardContent { @@ -59,13 +112,13 @@ box-shadow: 0 0 0 5px #38c; } -.cardBox .cardContent:hover { +.alternateHover:hover .cardContent { -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } -.cardContent:hover .cardImage { +.alternateHover:hover .cardImage { opacity: .5; } @@ -111,12 +164,32 @@ overflow: hidden; text-wrap: none; white-space: nowrap; - padding: 5px 4px 4px; + padding: 5px 4px 2px; text-shadow: none; font-size: 13px; 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 { padding-left: 5px; padding: 0 5px 4px; @@ -141,17 +214,53 @@ background-size: cover; } -.card-1-1 { +.bannerCard { + width: 100%; +} + +.squareCard { width: 50%; } -.card-16-9:not(.manualSize) { +.backdropCard { 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) { - .card-1-1 { + .squareCard { width: 33.3%; } } @@ -159,27 +268,43 @@ @media all and (min-width: 540px) { - .card-16-9:not(.manualSize) { + .portraitCard { + width: 25%; + } +} + + +@media all and (min-width: 640px) { + + .backdropCard { width: 33.3%; } + + .bannerCard { + width: 50%; + } } @media all and (min-width: 800px) { - .card-1-1 { + .squareCard { width: 25%; } + + .portraitCard { + width: 20%; + } } @media all and (min-width: 1000px) { - .card-1-1 { + .squareCard { width: 20%; } - .card-16-9:not(.manualSize) { + .backdropCard { width: 25%; } } @@ -187,7 +312,15 @@ @media all and (min-width: 1200px) { - .card-1-1 { + .squareCard { + width: 16.666666666666666666666666666667%; + } + + .bannerCard { + width: 33.3%; + } + + .portraitCard { width: 16.666666666666666666666666666667%; } } @@ -195,27 +328,54 @@ @media all and (min-width: 1400px) { - .card-1-1 { + .squareCard { width: 14.285714285714285714285714285714%; } - .card-16-9:not(.manualSize) { + .backdropCard { width: 20%; } + + .portraitCard { + width: 14.285714285714285714285714285714%; + } } @media all and (min-width: 1600px) { - .card-1-1 { + .squareCard { width: 12.5%; } - .card-16-9:not(.manualSize) { + .backdropCard { 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 { width: 50%; } @@ -225,4 +385,191 @@ .detailPage169Card { 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%; + } } \ No newline at end of file diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 98b55edb8b..e35ce74687 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -33,7 +33,14 @@ .libraryPage > .ui-content { 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 { @@ -101,10 +108,6 @@ .ehsContent { width: 770px; } - - .squareEhsContent { - width: 760px; - } } @media all and (min-width: 1000px) { @@ -112,10 +115,6 @@ .ehsContent { width: 900px; } - - .squareEhsContent { - width: 900px; - } } @media all and (min-width: 1200px) { @@ -123,10 +122,6 @@ .ehsContent { width: 1000px; } - - .squareEhsContent { - width: 1000px; - } } @media all and (min-width: 1600px) { @@ -134,10 +129,6 @@ .ehsContent { width: 1200px; } - - .squareEhsContent { - width: 1200px; - } } .detailPageContent { @@ -926,17 +917,15 @@ a.itemTag:hover { display: block; text-decoration: none; padding: 1px 0; - color: #bbb !important; } - .alphabetPicker a:hover:not(.selectedCharacter) { - background: #666 !important; - color: #fff !important; + .alphabetPicker a:not(.selectedCharacter) { + color: #bbb !important; } + .selectedCharacter { - color: #fff !important; - background: #4d90fe; + color: #4d90fe !important; } .itemOverlayContent { diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 022e4a3bbb..a1027fcc7d 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -53,19 +53,20 @@ font-weight: 500; src: local('Roboto Medium'), local('Roboto-Medium'), url(fonts/RobotoMedium.woff) format('woff'); } + @font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 700; - src: local('Roboto Bold'), local('Roboto-Bold'), url(fonts/RobotoBold.woff) format('woff'); + font-family: 'Roboto'; + font-style: normal; + font-weight: 700; + src: local('Roboto Bold'), local('Roboto-Bold'), url(fonts/RobotoBold.woff) format('woff'); } * { - text-shadow: none!important; + text-shadow: none !important; } body { - overflow-y: scroll!important; + overflow-y: scroll !important; font-size: 13px; font-family: Roboto, Arial, Helvetica, sans-serif; } @@ -83,18 +84,18 @@ body { } h1, h1 a { - font-weight: 300!important; + font-weight: 300 !important; font-size: 28px; } .libraryPage h1, .libraryPage h1 a { - font-weight: 100!important; + font-weight: 100 !important; font-size: 28px; } .ui-loader h1 { font-family: Roboto; - font-weight: 500!important; + font-weight: 500 !important; font-size: 18px; } @@ -117,7 +118,7 @@ h2 { .ui-btn { font-family: Roboto; - font-weight: 500!important; + font-weight: 500 !important; } .ui-listview li h3 { @@ -129,7 +130,7 @@ h1 a { } .libraryPage h1 a { - color: #fff!important; + color: #fff !important; } h1 a:hover { @@ -243,7 +244,7 @@ h1 .imageLink { } .imageButton[disabled], .imageButton[disabled]:hover { - opacity: .3!important; + opacity: .3 !important; cursor: default; } @@ -268,7 +269,7 @@ h1 .imageLink { } .ulForm { - margin-bottom: 20px!important; + margin-bottom: 20px !important; } .ulForm li:not(.ui-li-divider) { @@ -278,7 +279,7 @@ h1 .imageLink { } .popup .ulForm { - margin-bottom: 0!important; + margin-bottom: 0 !important; } .content-primary { @@ -303,27 +304,27 @@ h1 .imageLink { margin-left: 1em; } -.sidebarLinks a { - display: block; - padding: .6em 20px .6em 20px; - text-decoration: none; - color: #333!important; - text-shadow: none!important; - font-weight: 500!important; - font-size: 14px; - border-radius: 2px; -} - - .sidebarLinks a:hover { - background: #52B54B; - color: #fff!important; + .sidebarLinks a { + display: block; + padding: .6em 20px .6em 20px; + text-decoration: none; + color: #333 !important; + text-shadow: none !important; + font-weight: 500 !important; + font-size: 14px; + border-radius: 2px; } - .sidebarLinks a.selectedSidebarLink { - background: #38c!important; - color: #fff!important; - margin-right: 0; - } + .sidebarLinks a:hover { + background: #52B54B; + color: #fff !important; + } + + .sidebarLinks a.selectedSidebarLink { + background: #38c !important; + color: #fff !important; + margin-right: 0; + } .sidebarDivider { height: 1px; @@ -332,12 +333,12 @@ h1 .imageLink { } .invalidEntry { - background-color: lightpink!important; + background-color: lightpink !important; } /* Tabs (e.g. advanced metadata page) */ .localnav { - margin-bottom: 40px!important; + margin-bottom: 40px !important; } .localnav + form { @@ -345,7 +346,7 @@ h1 .imageLink { } .page > .ui-content { - padding-bottom: 100px; + padding-bottom: 120px; } .dashboardPanelDivider { @@ -358,18 +359,18 @@ h1 .imageLink { padding: .7em .5em .7em 1.25em; display: block; text-decoration: none; - color: #000!important; + color: #000 !important; font-weight: normal !important; } .dashboardPanelLink:hover { background: #52B54B; - color: #fff!important; + color: #fff !important; } .selectedDashboardPanelLink { background: #38c; - color: #fff!important; + color: #fff !important; } .dashboardPanel .ui-panel-inner { @@ -456,19 +457,19 @@ h1 .imageLink { } .mediaFolderLocations { - margin: 1em .25em!important; + margin: 1em .25em !important; } .mediaLocationsHeader { - padding-top: .75em!important; - padding-bottom: .75em!important; + padding-top: .75em !important; + padding-bottom: .75em !important; } .mediaLocationsHeader .ui-btn { position: absolute; right: -6px; - margin-top: 0!important; - margin-bottom: 0!important; + margin-top: 0 !important; + margin-bottom: 0 !important; top: 6px; } @@ -514,12 +515,12 @@ h1 .imageLink { } .posterViewItemWithNoText { - padding-bottom: 0!important; + padding-bottom: 0 !important; } .posterViewItem a { - color: white!important; - font-weight: normal!important; + color: white !important; + font-weight: normal !important; text-decoration: none; } @@ -594,7 +595,7 @@ h1 .imageLink { @media all and (min-width: 1920px) { .posterViewItemText { - height: 25px!important; + height: 25px !important; } .posterViewItem { @@ -649,7 +650,6 @@ h1 .imageLink { bottom: -2px; left: -2px; right: -2px; - /* Above everything, except for the video player and popup overlays */ z-index: 1097; color: #fff; @@ -740,9 +740,10 @@ progress { cursor: pointer; vertical-align: top; } -.imgUserItemRating:last-child { - margin-right: 0; -} + + .imgUserItemRating:last-child { + margin-right: 0; + } .imgUserItemRating:hover { opacity: .5; @@ -839,7 +840,7 @@ progress { } .btnShowStatusMessage { - font-weight: normal!important; + font-weight: normal !important; text-decoration: none; } @@ -851,6 +852,11 @@ progress { width: 50%; } +.activeSession .cardPadder { + padding-bottom: 56.25%; +} + + .sessionNowPlayingContent { background-size: cover; background-repeat: no-repeat; @@ -925,7 +931,7 @@ progress { } .activeDevicesCollapsible .ui-collapsible-content { - padding: .25em!important; + padding: .25em !important; } .activeSession:not(.playingSession) .sessionNowPlayingContent { @@ -981,22 +987,22 @@ progress { /* Firefox */ .transcodingProgress::-moz-progress-bar { 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 */ .transcodingProgress::-webkit-progress-value { 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-linear-gradient( center bottom, rgb(221, 73, 25) 37%, rgb(221, 73, 25) 69% )!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; } /* Polyfill */ .transcodingProgress[aria-valuenow]:before { border-radius: 5px; - 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: -o-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: -o-linear-gradient( center bottom, rgb(221, 73, 25) 37%, rgb(221, 73, 25) 69% ) !important; } @media all and (max-width: 550px) { @@ -1015,4 +1021,4 @@ progress { .activeSession { width: 100%; } -} \ No newline at end of file +} diff --git a/dashboard-ui/favorites.html b/dashboard-ui/favorites.html index 1f6f7bcaad..d9dcd5810f 100644 --- a/dashboard-ui/favorites.html +++ b/dashboard-ui/favorites.html @@ -16,13 +16,9 @@
- - - - -
-
-
+
+
+
diff --git a/dashboard-ui/gamesrecommended.html b/dashboard-ui/gamesrecommended.html index dc10e48c53..90b74516a8 100644 --- a/dashboard-ui/gamesrecommended.html +++ b/dashboard-ui/gamesrecommended.html @@ -13,23 +13,19 @@ ${TabStudios}
- - - - -
-

${HeaderLatestGames}

+
+

${HeaderLatestGames}

-
-
+
+
-
+
+
+
+ diff --git a/dashboard-ui/homelatest.html b/dashboard-ui/homelatest.html index 527c62e54e..f3f0f8bf93 100644 --- a/dashboard-ui/homelatest.html +++ b/dashboard-ui/homelatest.html @@ -16,13 +16,9 @@
- - - - -
-
-
+
+
+
diff --git a/dashboard-ui/index.html b/dashboard-ui/index.html index 9d083808f5..5522a943fe 100644 --- a/dashboard-ui/index.html +++ b/dashboard-ui/index.html @@ -24,13 +24,9 @@

- - - - -
-
-
+
+
+
diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html index 0e4d126c41..4dae69d0f4 100644 --- a/dashboard-ui/itemdetails.html +++ b/dashboard-ui/itemdetails.html @@ -226,12 +226,6 @@
-
- - - - -
- - - -
+
+ + + +
diff --git a/dashboard-ui/livetvsuggested.html b/dashboard-ui/livetvsuggested.html index 4990ce064e..3207646087 100644 --- a/dashboard-ui/livetvsuggested.html +++ b/dashboard-ui/livetvsuggested.html @@ -14,22 +14,18 @@ ${TabSeries}
- - - - -
-
-

${HeaderWhatsOnTV}

-
-
-
-
-

${HeaderUpcomingTV}

-
-
-
-
+
+
+

${HeaderWhatsOnTV}

+
+
+
+
+

${HeaderUpcomingTV}

+
+
+
+
diff --git a/dashboard-ui/movieslatest.html b/dashboard-ui/movieslatest.html index 20a9bae943..43bbc9a56e 100644 --- a/dashboard-ui/movieslatest.html +++ b/dashboard-ui/movieslatest.html @@ -18,16 +18,12 @@
- - - - -
-

${HeaderLatestMovies}

+
+

${HeaderLatestMovies}

-
-
-
+
+
+
diff --git a/dashboard-ui/moviesrecommended.html b/dashboard-ui/moviesrecommended.html index 99390e6b7f..fe821ded53 100644 --- a/dashboard-ui/moviesrecommended.html +++ b/dashboard-ui/moviesrecommended.html @@ -17,25 +17,21 @@
- - - - -
-
+
+
+ +
diff --git a/dashboard-ui/musicrecommended.html b/dashboard-ui/musicrecommended.html index 7392b11e33..ff6b1f3661 100644 --- a/dashboard-ui/musicrecommended.html +++ b/dashboard-ui/musicrecommended.html @@ -15,30 +15,26 @@ ${TabMusicVideos}
- - - - -
-

${HeaderLatestMusic}

+
+

${HeaderLatestMusic}

-
-
+
+
- -
+
+
+
+ diff --git a/dashboard-ui/scripts/channelitems.js b/dashboard-ui/scripts/channelitems.js index d528702d98..3128c408a4 100644 --- a/dashboard-ui/scripts/channelitems.js +++ b/dashboard-ui/scripts/channelitems.js @@ -153,7 +153,7 @@ html += pagingHtml; - $('#items', page).html(html).trigger('create').createPosterItemMenus(); + $('#items', page).html(html).trigger('create').createCardMenus(); $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; diff --git a/dashboard-ui/scripts/channels.js b/dashboard-ui/scripts/channels.js index 21973f11bc..2f85ae450c 100644 --- a/dashboard-ui/scripts/channels.js +++ b/dashboard-ui/scripts/channels.js @@ -30,7 +30,7 @@ preferThumb: true }); - $('#items', page).html(html).trigger('create').createPosterItemMenus(); + $('#items', page).html(html).trigger('create').createCardMenus(); LibraryBrowser.saveQueryValues('channels', query); diff --git a/dashboard-ui/scripts/dashboardpage.js b/dashboard-ui/scripts/dashboardpage.js index eddd493a4b..0f54283e2e 100644 --- a/dashboard-ui/scripts/dashboardpage.js +++ b/dashboard-ui/scripts/dashboardpage.js @@ -239,7 +239,7 @@ 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) { className += ' transcodingSession'; @@ -322,7 +322,7 @@ html += ''; - html += '
'; + html += '
'; html += '
' + DashboardPage.getSessionNowPlayingStreamInfo(session) + '
'; html += '
' + DashboardPage.getSessionNowPlayingTime(session) + '
'; @@ -978,7 +978,7 @@ $(document).on('pagebeforeshow', "#dashboardPage", DashboardPage.onPageShow) showOverlayTimeout = null; } - $('.posterItemOverlayTarget:visible', this).each(function () { + $('.cardOverlayTarget:visible', this).each(function () { 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(); @@ -1005,7 +1005,7 @@ $(document).on('pagebeforeshow', "#dashboardPage", DashboardPage.onPageShow) return; } - var innerElem = $('.posterItemOverlayTarget', elem); + var innerElem = $('.cardOverlayTarget', elem); innerElem.show().each(function () { diff --git a/dashboard-ui/scripts/dashboardsync.js b/dashboard-ui/scripts/dashboardsync.js index 29047887c9..9fd106d5f8 100644 --- a/dashboard-ui/scripts/dashboardsync.js +++ b/dashboard-ui/scripts/dashboardsync.js @@ -14,7 +14,7 @@ var html = ''; - html += "
"; + html += "
"; html += '
'; html += '
'; diff --git a/dashboard-ui/scripts/episodes.js b/dashboard-ui/scripts/episodes.js index a6bbfeba91..a09c6bc47c 100644 --- a/dashboard-ui/scripts/episodes.js +++ b/dashboard-ui/scripts/episodes.js @@ -44,8 +44,6 @@ updateFilterControls(); - var screenWidth = $(window).width(); - if (view == "List") { html = LibraryBrowser.getListViewHtml({ @@ -60,7 +58,7 @@ shape: "backdrop", showTitle: true, showParentTitle: true, - overlayText: screenWidth >= 600, + overlayText: true, selectionPanel: true, lazy: true, context: 'tv' @@ -69,7 +67,7 @@ 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 () { query.StartIndex += query.Limit; diff --git a/dashboard-ui/scripts/favorites.js b/dashboard-ui/scripts/favorites.js index ccb9bbc568..f2223038b1 100644 --- a/dashboard-ui/scripts/favorites.js +++ b/dashboard-ui/scripts/favorites.js @@ -3,11 +3,11 @@ function getSections() { return [ - { name: Globalize.translate('HeaderFavoriteMovies'), types: "Movie", id: "favoriteMovies", shape: 'backdrop', preferThumb: true, showTitle: false }, - { name: Globalize.translate('HeaderFavoriteShows'), types: "Series", id: "favoriteShows", shape: 'backdrop', preferThumb: true, showTitle: false }, - { name: Globalize.translate('HeaderFavoriteEpisodes'), types: "Episode", id: "favoriteEpisode", shape: 'backdrop', preferThumb: false, showTitle: true, showParentTitle: true }, + { name: Globalize.translate('HeaderFavoriteMovies'), types: "Movie", id: "favoriteMovies", shape: 'homePageBackdrop', 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: 'homePageBackdrop', preferThumb: false, showTitle: true, showParentTitle: 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, preferThumb: section.preferThumb, shape: section.shape, - overlayText: section.overlayText !== false && screenWidth >= 600, + overlayText: section.overlayText !== false, context: 'home-favorites', showTitle: section.showTitle, showParentTitle: section.showParentTitle, @@ -62,7 +62,7 @@ html += '
'; } - $(elem).html(html).trigger('create').createPosterItemMenus(); + $(elem).html(html).trigger('create').createCardMenus(); }); } diff --git a/dashboard-ui/scripts/gamegenrepage.js b/dashboard-ui/scripts/gamegenrepage.js index b6e0a22d11..a3f30655e9 100644 --- a/dashboard-ui/scripts/gamegenrepage.js +++ b/dashboard-ui/scripts/gamegenrepage.js @@ -50,7 +50,7 @@ html += pagingHtml; - $('#items', page).html(html).trigger('create').createPosterItemMenus(); + $('#items', page).html(html).trigger('create').createCardMenus(); $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; diff --git a/dashboard-ui/scripts/gamespage.js b/dashboard-ui/scripts/gamespage.js index 0fff3c8e55..3cba5b4dd9 100644 --- a/dashboard-ui/scripts/gamespage.js +++ b/dashboard-ui/scripts/gamespage.js @@ -64,7 +64,7 @@ html += pagingHtml; - $('#items', page).html(html).trigger('create').createPosterItemMenus(); + $('#items', page).html(html).trigger('create').createCardMenus(); $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; diff --git a/dashboard-ui/scripts/gamesrecommendedpage.js b/dashboard-ui/scripts/gamesrecommendedpage.js index ac75b0525e..3cb74e28d0 100644 --- a/dashboard-ui/scripts/gamesrecommendedpage.js +++ b/dashboard-ui/scripts/gamesrecommendedpage.js @@ -24,7 +24,7 @@ shape: 'auto', lazy: true - })).trigger('create').createPosterItemMenus(); + })).trigger('create').createCardMenus(); }); @@ -55,7 +55,7 @@ shape: 'auto', lazy: true - })).trigger('create').createPosterItemMenus(); + })).trigger('create').createCardMenus(); }); diff --git a/dashboard-ui/scripts/gamestudiospage.js b/dashboard-ui/scripts/gamestudiospage.js index 4c168bf197..f763b61bc7 100644 --- a/dashboard-ui/scripts/gamestudiospage.js +++ b/dashboard-ui/scripts/gamestudiospage.js @@ -52,7 +52,7 @@ html += pagingHtml; - $('#items', page).html(html).trigger('create').createPosterItemMenus(); + $('#items', page).html(html).trigger('create').createCardMenus(); $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; diff --git a/dashboard-ui/scripts/gamesystemspage.js b/dashboard-ui/scripts/gamesystemspage.js index a7589d7871..aa6fe5eff1 100644 --- a/dashboard-ui/scripts/gamesystemspage.js +++ b/dashboard-ui/scripts/gamesystemspage.js @@ -41,7 +41,7 @@ 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 () { query.StartIndex += query.Limit; diff --git a/dashboard-ui/scripts/indexpage.js b/dashboard-ui/scripts/indexpage.js index b77043e10e..f85e09900a 100644 --- a/dashboard-ui/scripts/indexpage.js +++ b/dashboard-ui/scripts/indexpage.js @@ -145,7 +145,7 @@ html += LibraryBrowser.getPosterViewHtml({ items: items, preferThumb: true, - shape: 'backdrop', + shape: 'homePageBackdrop', context: 'home', showUnplayedIndicator: false, showChildCountIndicator: true, @@ -154,7 +154,7 @@ html += '
'; } - $(elem).html(html).trigger('create').createPosterItemMenus(); + $(elem).html(html).trigger('create').createCardMenus(); }); } @@ -180,7 +180,7 @@ html += LibraryBrowser.getPosterViewHtml({ items: result.Items, preferThumb: true, - shape: 'autosmall', + shape: 'auto', showTitle: true, centerText: true, lazy: true @@ -188,7 +188,7 @@ html += '
'; } - $(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); }); @@ -263,7 +263,7 @@ html += '
'; } - $(elem).html(html).trigger('create').createPosterItemMenus(); + $(elem).html(html).trigger('create').createCardMenus(); handleLibraryLinkNavigations(elem); }); @@ -296,7 +296,7 @@ html += LibraryBrowser.getPosterViewHtml({ items: result.Items, preferBackdrop: true, - shape: 'backdrop', + shape: 'homePageBackdrop', overlayText: screenWidth >= 600, showTitle: true, showParentTitle: true, @@ -306,7 +306,7 @@ html += '
'; } - $(elem).html(html).trigger('create').createPosterItemMenus(); + $(elem).html(html).trigger('create').createCardMenus(); }); } @@ -379,7 +379,7 @@ } html += LibraryBrowser.getPosterViewHtml({ items: result.Items, - shape: 'auto', + shape: 'autohome', defaultShape: 'square', showTitle: true, centerText: true, @@ -387,7 +387,7 @@ 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({ items: result.Items, - shape: "autosmall", + shape: "autohome", showTitle: true, showParentTitle: true, overlayText: screenWidth >= 600, @@ -425,7 +425,7 @@ lazy: true }); - elem.html(html).trigger('create').createPosterItemMenus(); + elem.html(html).trigger('create').createCardMenus(); }); } @@ -473,13 +473,13 @@ Sections.loadRecentlyAdded(elem, userId); } else if (section == 'librarytiles') { - Sections.loadLibraryTiles(elem, userId, 'backdrop', index); + Sections.loadLibraryTiles(elem, userId, 'homePageBackdrop', index); } else if (section == 'smalllibrarytiles') { - Sections.loadLibraryTiles(elem, userId, 'miniBackdrop', index); + Sections.loadLibraryTiles(elem, userId, 'homePageSmallBackdrop', index); } else if (section == 'smalllibrarytiles-automobile') { - Sections.loadLibraryTiles(elem, userId, 'miniBackdrop', index, true); + Sections.loadLibraryTiles(elem, userId, 'homePageSmallBackdrop', index, true); } else if (section == 'librarybuttons') { Sections.loadlibraryButtons(elem, userId, index); @@ -493,7 +493,7 @@ } else if (section == 'folders') { - Sections.loadLibraryFolders(elem, userId, 'backdrop', index); + Sections.loadLibraryFolders(elem, userId, 'homePageBackdrop', index); } else if (section == 'latestchannelmedia') { Sections.loadLatestChannelMedia(elem, userId); diff --git a/dashboard-ui/scripts/itembynamedetailpage.js b/dashboard-ui/scripts/itembynamedetailpage.js index 6f9a765512..98103c0c79 100644 --- a/dashboard-ui/scripts/itembynamedetailpage.js +++ b/dashboard-ui/scripts/itembynamedetailpage.js @@ -494,7 +494,7 @@ 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 () { diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index d0b6a82aa2..b908be6f4e 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -343,13 +343,6 @@ $('#themeSongsCollapsible', 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") { renderMusicVideos(page, item, user); } else { @@ -507,31 +500,6 @@ 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) { $('.lnkSibling', page).addClass('hide'); @@ -634,7 +602,7 @@ var html = LibraryBrowser.getPosterViewHtml({ items: result.Items, - shape: item.Type == "MusicAlbum" ? "square" : "portrait", + shape: item.Type == "MusicAlbum" ? "detailPageSquare" : "detailPagePortrait", showParentTitle: item.Type == "MusicAlbum", centerText: item.Type != "MusicAlbum", showTitle: item.Type == "MusicAlbum" || item.Type == "Game", @@ -642,7 +610,7 @@ context: context }); - $('#similarContent', page).html(html).createPosterItemMenus(); + $('#similarContent', page).html(html).createCardMenus(); }); } @@ -767,19 +735,21 @@ if (item.Type == "Series") { html = LibraryBrowser.getPosterViewHtml({ items: result.Items, - shape: "portrait", - showTitle: true, + shape: "detailPagePortrait", + showTitle: false, centerText: true, - context: context + context: context, + overlayText: true }); } else if (item.Type == "Season") { html = LibraryBrowser.getPosterViewHtml({ items: result.Items, - shape: "smallBackdrop", + shape: "detailPage169", showTitle: true, displayAsSpecial: item.Type == "Season" && item.IndexNumber, - context: context + context: context, + overlayText: true }); } else if (item.Type == "GameSystem") { @@ -792,7 +762,7 @@ }); } - $('#childrenContent', page).html(html).createPosterItemMenus(); + $('#childrenContent', page).html(html).createCardMenus(); if (item.Type == "BoxSet") { @@ -865,7 +835,7 @@ renderCollectionItemType(page, { name: 'Titles' }, items, user); } - $('.collectionItems', page).trigger('create').createPosterItemMenus(); + $('.collectionItems', page).trigger('create').createCardMenus(); } function renderCollectionItemType(page, type, items, user, context) { @@ -885,7 +855,7 @@ html += '
'; - var shape = type.type == 'MusicAlbum' ? 'square' : 'portrait'; + var shape = type.type == 'MusicAlbum' ? 'detailPageSquare' : 'detailPagePortrait'; html += LibraryBrowser.getPosterViewHtml({ items: items, @@ -1101,7 +1071,7 @@ var onclick = item.PlayAccess == 'Full' ? ' onclick="ItemDetailPage.play(' + chapter.StartPositionTicks + ');"' : ''; - html += ''; + html += ''; html += '
'; html += '
'; @@ -1306,7 +1276,7 @@ var item = items[i]; - var cssClass = "card card-16-9 manualSize detailPage169Card"; + var cssClass = "card detailPage169Card"; var href = "itemdetails.html?id=" + item.Id; diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 90b066351c..04f29739f3 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -1,5 +1,7 @@ var LibraryBrowser = (function (window, document, $, screen, store) { + var pageSizeKey = 'pagesize_v2'; + $(function () { $("body").on("create", function () { $(".lazy").unveil(200); @@ -11,7 +13,7 @@ return { getDefaultPageSize: function () { - var saved = store.getItem('pagesize__'); + var saved = store.getItem(pageSizeKey); if (saved) { return parseInt(saved); @@ -20,12 +22,12 @@ if (window.location.toString().toLowerCase().indexOf('localhost') != -1) { return 100; } - return 20; + return 50; }, getDefaultItemsView: function (view, mobileView) { - return $.browser.mobile ? mobileView : view; + return view; }, @@ -564,7 +566,7 @@ return ''; }, - getUserDataCssClass: function(key) { + getUserDataCssClass: function (key) { return 'libraryItemUserData' + key; }, @@ -750,25 +752,25 @@ var primaryImageAspectRatio; - if (options.shape == 'auto' || options.shape == 'autosmall') { + if (options.shape == 'auto' || options.shape == 'autohome') { primaryImageAspectRatio = LibraryBrowser.getAveragePrimaryImageAspectRatio(items); 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) { options.coverImage = true; - options.shape = 'square'; + options.shape = options.shape == 'auto' ? 'square' : 'homePageSquare'; } else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1.3333334) < .01) { options.coverImage = true; - options.shape = 'square'; + options.shape = options.shape == 'auto' ? 'square' : 'homePageSquare'; } else if (primaryImageAspectRatio && primaryImageAspectRatio > 1.9) { options.shape = 'banner'; options.coverImage = true; } else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 0.6666667) < .2) { - options.shape = 'portrait'; + options.shape = options.shape == 'auto' ? 'portrait' : 'homePagePortrait'; } else { - options.shape = options.defaultShape || 'portrait'; + options.shape = options.defaultShape || (options.shape == 'auto' ? 'portrait' : 'homePagePortrait'); } } @@ -974,17 +976,13 @@ background = defaultBackground; } - var cssClass = "posterItem"; + var cssClass = "card"; if (options.transparent !== false) { - cssClass += " transparentPosterItem"; + cssClass += " transparentCard"; } - if (options.borderless) { - cssClass += " borderlessPosterItem"; - } - - cssClass += ' ' + options.shape + 'PosterItem'; + cssClass += ' ' + options.shape + 'Card'; var mediaSourceCount = item.MediaSourceCount || 1; @@ -995,17 +993,13 @@ } if (options.showChildCountIndicator && item.ChildCount) { - cssClass += ' groupedPosterItem'; + cssClass += ' groupedCard'; if (item.Type == 'Series') { cssClass += ' unplayedGroupings'; } } - if (options.showChildCountIndicator) { - cssClass += ' groupingPosterItem'; - } - var dataAttributes = LibraryBrowser.getItemDataAttributes(item, options); html += ''; @@ -1020,9 +1014,9 @@ style += "background-color:" + background + ";"; } - var imageCssClass = 'posterItemImage'; + var imageCssClass = 'cardImage'; if (options.coverImage) { - imageCssClass += " coveredPosterItemImage"; + imageCssClass += " coveredCardImage"; } var dataSrc = ""; @@ -1032,11 +1026,14 @@ dataSrc = ' data-src="' + imgUrl + '"'; } - var progressHtml = options.showProgress === false || item.IsFolder ? '' : LibraryBrowser.getItemProgressBarHtml((item.Type == 'Recording' ? item : item.UserData)); + html += '
'; + html += '
'; - html += '
'; + html += '
'; + html += '
'; + html += '
'; - html += '
'; + html += '
'; if (item.LocationType == "Offline" || item.LocationType == "Virtual") { if (options.showLocationTypeIndicator !== false) { @@ -1060,87 +1057,109 @@ // Render this pre-enhanced to save on jquery mobile dom manipulation html += ''; - } - if (!options.overlayText) { + var footerText = LibraryBrowser.getCardFooterText(item, options, imgUrl, forceName); + var footerOverlayed = false; - if (progressHtml) { - html += '
'; - html += "
"; - html += progressHtml || " "; - html += "
"; - html += "
"; - } + if (options.overlayText || (forceName && !options.showTitle)) { + html += footerText; + footerOverlayed = true; } + + // cardContent html += '
'; - var name = LibraryBrowser.getPosterViewDisplayName(item, options.displayAsSpecial); + // cardScalable + html += '
'; - if (!imgUrl && !options.showTitle) { - html += "
"; - html += htmlEncode(name); - html += "
"; + if (!options.overlayText && !footerOverlayed) { + html += footerText; } - var overlayText = options.overlayText || (forceName && !options.showTitle); + // cardBox + html += '
'; - if (overlayText) { - html += '
'; - } + //var progressHtml = options.showProgress === false || item.IsFolder ? '' : LibraryBrowser.getItemProgressBarHtml((item.Type == 'Recording' ? item : item.UserData)); - cssClass = options.centerText ? "posterItemText posterItemTextCentered" : "posterItemText"; + //if (!options.overlayText) { - var lines = []; + // if (progressHtml) { + // html += '
'; + // html += "
"; + // html += progressHtml || " "; + // html += "
"; + // html += "
"; + // } + //} + //html += '
'; - if (options.showParentTitle) { + //var name = LibraryBrowser.getPosterViewDisplayName(item, options.displayAsSpecial); - lines.push(item.EpisodeTitle ? item.Name : (item.SeriesName || item.Album || item.AlbumArtist || item.GameSystem || "")); - } + //if (!imgUrl && !options.showTitle) { + // html += "
"; + // html += htmlEncode(name); + // html += "
"; + //} - if (options.showTitle || forceName) { + //var overlayText = options.overlayText || (forceName && !options.showTitle); - lines.push(htmlEncode(name)); - } + //if (overlayText) { + // html += '
'; + //} - if (options.showItemCounts) { + //cssClass = options.centerText ? "posterItemText posterItemTextCentered" : "posterItemText"; - var itemCountHtml = LibraryBrowser.getItemCountsHtml(options, item); + //var lines = []; - lines.push(itemCountHtml); - } + //if (options.showParentTitle) { - if (options.showPremiereDate && item.PremiereDate) { + // lines.push(item.EpisodeTitle ? item.Name : (item.SeriesName || item.Album || item.AlbumArtist || item.GameSystem || "")); + //} - try { + //if (options.showTitle || forceName) { - lines.push(LibraryBrowser.getPremiereDateText(item)); + // lines.push(htmlEncode(name)); + //} - } catch (err) { - lines.push(''); + //if (options.showItemCounts) { - } - } + // var itemCountHtml = LibraryBrowser.getItemCountsHtml(options, item); - if (options.showYear) { + // lines.push(itemCountHtml); + //} - lines.push(item.ProductionYear || ''); - } + //if (options.showPremiereDate && item.PremiereDate) { - html += LibraryBrowser.getPosterItemTextLines(lines, cssClass, !options.overlayText); + // try { - if (options.overlayText) { + // lines.push(LibraryBrowser.getPremiereDateText(item)); - if (progressHtml) { - html += "
"; - html += progressHtml || " "; - html += "
"; - } - } + // } catch (err) { + // lines.push(''); - if (overlayText) { - html += "
"; - } + // } + //} + + //if (options.showYear) { + + // lines.push(item.ProductionYear || ''); + //} + + //html += LibraryBrowser.getPosterItemTextLines(lines, cssClass, !options.overlayText); + + //if (options.overlayText) { + + // if (progressHtml) { + // html += "
"; + // html += progressHtml || " "; + // html += "
"; + // } + //} + + //if (overlayText) { + // html += "
"; + //} html += "
"; @@ -1149,6 +1168,86 @@ return html; }, + getCardFooterText: function (item, options, imgUrl, forceName) { + + var html = ''; + + html += '
'; + + var progressHtml = options.showProgress === false || item.IsFolder ? '' : LibraryBrowser.getItemProgressBarHtml((item.Type == 'Recording' ? item : item.UserData)); + + if (!options.overlayText) { + + if (progressHtml) { + html += "
"; + html += (progressHtml || " "); + html += "
"; + } + } + + var name = LibraryBrowser.getPosterViewDisplayName(item, options.displayAsSpecial); + + if (!imgUrl && !options.showTitle) { + html += "
"; + html += htmlEncode(name); + html += "
"; + } + + var cssClass = options.centerText ? "cardText cardTextCentered" : "cardText"; + + 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 += "
"; + html += progressHtml || " "; + html += "
"; + } + } + + //cardFooter + html += "
"; + + return html; + }, + getPosterItemTextLines: function (lines, cssClass, forceLines) { var html = ''; @@ -1522,7 +1621,7 @@ if (limit && options.updatePageSizeSetting !== false) { try { - store.setItem('pagesize__', limit); + store.setItem(pageSizeKey, limit); } catch (e) { } @@ -1598,7 +1697,7 @@ if (query.Limit && updatePageSizeSetting !== false) { try { - store.setItem('pagesize__', query.Limit); + store.setItem(pageSizeKey, query.Limit); } catch (e) { } diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js index 7bdc436a4c..27f747c64e 100644 --- a/dashboard-ui/scripts/librarylist.js +++ b/dashboard-ui/scripts/librarylist.js @@ -9,7 +9,7 @@ showOverlayTimeout = null; } - $('.posterItemOverlayTarget:visible', this).each(function () { + $('.cardOverlayTarget:visible', this).each(function () { 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(); }); } - function getOverlayHtml(item, currentUser, posterItem, commands) { + function getOverlayHtml(item, currentUser, card, commands) { var html = ''; - html += '
'; + html += '
'; - var isSmallItem = $(posterItem).hasClass('smallBackdropPosterItem') || $(posterItem).hasClass('miniBackdropPosterItem'); - var isMiniItem = $(posterItem).hasClass('miniBackdropPosterItem'); - var isPortrait = $(posterItem).hasClass('portraitPosterItem'); - var isSquare = $(posterItem).hasClass('squarePosterItem'); + var className = card.className.toLowerCase(); + + var isMiniItem = className.indexOf('mini') != -1; + 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 name = LibraryBrowser.getPosterViewDisplayName(item, true); - html += '
'; + html += '
'; var logoHeight = isSmallItem || isMiniItem ? 20 : 26; var maxLogoWidth = isPortrait ? 100 : 200; var imgUrl; @@ -210,7 +212,7 @@ return false; } - function onPosterItemTapHold(e) { + function onCardTapHold(e) { showContextMenu(this); @@ -218,26 +220,26 @@ return false; } - function showContextMenu(posterItem) { + function showContextMenu(card) { $('.tapHoldMenu').popup("close").remove(); - var displayContextItem = posterItem; + var displayContextItem = card; - if ($(posterItem).hasClass('listviewMenuButton')) { - posterItem = $(posterItem).parents('.listItem')[0]; + if ($(card).hasClass('listviewMenuButton')) { + card = $(card).parents('.listItem')[0]; } - var itemId = posterItem.getAttribute('data-itemid'); - var commands = posterItem.getAttribute('data-commands').split(','); - var itemType = posterItem.getAttribute('data-itemtype'); - var mediaType = posterItem.getAttribute('data-mediatype'); - var playbackPositionTicks = parseInt(posterItem.getAttribute('data-positionticks') || '0'); - var playAccess = posterItem.getAttribute('data-playaccess'); - var locationType = posterItem.getAttribute('data-locationtype'); - var isPlaceHolder = posterItem.getAttribute('data-placeholder') == 'true'; + var itemId = card.getAttribute('data-itemid'); + var commands = card.getAttribute('data-commands').split(','); + var itemType = card.getAttribute('data-itemtype'); + var mediaType = card.getAttribute('data-mediatype'); + var playbackPositionTicks = parseInt(card.getAttribute('data-positionticks') || '0'); + var playAccess = card.getAttribute('data-playaccess'); + var locationType = card.getAttribute('data-locationtype'); + var isPlaceHolder = card.getAttribute('data-placeholder') == 'true'; - $(posterItem).addClass('hasContextMenu'); + $(card).addClass('hasContextMenu'); Dashboard.getCurrentUser().done(function (user) { @@ -246,7 +248,7 @@ html += '
    '; html += '
  • ' + Globalize.translate('HeaderMenu') + '
  • '; - var href = posterItem.getAttribute('data-href') || posterItem.href; + var href = card.getAttribute('data-href') || card.href; html += '
  • ' + Globalize.translate('ButtonOpen') + '
  • '; html += '
  • ' + Globalize.translate('ButtonOpenInNewTab') + '
  • '; @@ -288,7 +290,7 @@ var elem = $('.tapHoldMenu').popup({ positionTo: displayContextItem }).trigger('create').popup("open").on("popupafterclose", function () { $(this).off("popupafterclose").remove(); - $(posterItem).removeClass('hasContextMenu'); + $(card).removeClass('hasContextMenu'); }); $('.btnPlay', elem).on('click', onPlayButtonClick); @@ -308,15 +310,15 @@ return false; } - function onGroupedPosterItemClick(e) { + function onGroupedCardClick(e) { var target = $(e.target); - var posterItem = this; - var itemId = posterItem.getAttribute('data-itemid'); - var context = posterItem.getAttribute('data-context'); + var card = this; + var itemId = card.getAttribute('data-itemid'); + var context = card.getAttribute('data-context'); - $(posterItem).addClass('hasContextMenu'); + $(card).addClass('hasContextMenu'); var userId = Dashboard.getCurrentUserId(); @@ -324,14 +326,14 @@ var options = { - Limit: parseInt($('.playedIndicator', posterItem).html() || '10'), + Limit: parseInt($('.playedIndicator', card).html() || '10'), Fields: "PrimaryImageAspectRatio,DateCreated", ParentId: itemId, IsFolder: false, GroupItems: false }; - if ($(posterItem).hasClass('unplayedGroupings')) { + if ($(card).hasClass('unplayedGroupings')) { options.IsPlayed = false; } @@ -357,7 +359,7 @@ html += '
    '; html += '
      '; - var href = posterItem.href || LibraryBrowser.getHref(item, context); + var href = card.href || LibraryBrowser.getHref(item, context); var header = Globalize.translate('HeaderLatestFromChannel').replace('{0}', '' + item.Name + ''); html += '
    • ' + header + '
    • '; @@ -418,7 +420,7 @@ var elem = $('.groupingMenu').popup().trigger('create').popup("open").on("popupafterclose", function () { $(this).off("popupafterclose").remove(); - $(posterItem).removeClass('hasContextMenu'); + $(card).removeClass('hasContextMenu'); }); }); @@ -428,7 +430,7 @@ } - $.fn.createPosterItemMenus = function () { + $.fn.createCardMenus = function () { var preventHover = false; @@ -442,7 +444,7 @@ return; } - var innerElem = $('.posterItemOverlayTarget', elem); + var innerElem = $('.cardOverlayTarget', elem); var id = elem.getAttribute('data-itemid'); var commands = elem.getAttribute('data-commands').split(','); @@ -491,18 +493,18 @@ 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); - $('.groupedPosterItem', this).on('click', onGroupedPosterItemClick); + $('.groupedCard', this).on('click', onGroupedCardClick); - return this.off('.posterItemHoverMenu') - .on('mouseenter.posterItemHoverMenu', elems, onHoverIn) - .on('mouseleave.posterItemHoverMenu', elems, onHoverOut) - .on("touchstart.posterItemHoverMenu", elems, preventTouchHover); + return this.off('.cardHoverMenu') + .on('mouseenter.cardHoverMenu', elems, onHoverIn) + .on('mouseleave.cardHoverMenu', elems, onHoverOut) + .on("touchstart.cardHoverMenu", elems, preventTouchHover); }; function toggleSelections(page) { @@ -539,7 +541,7 @@ var selection = $('.chkItemSelect:checked', page); - return selection.parents('.posterItem') + return selection.parents('.card') .map(function () { return this.getAttribute('data-itemid'); @@ -561,9 +563,9 @@ 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('
      '); @@ -657,32 +659,32 @@ $('.viewTabButton:first', page).trigger('click'); }); - function renderUserDataChanges(posterItem, userData) { + function renderUserDataChanges(card, userData) { if (userData.Played) { - if (!$('.playedIndicator', posterItem).length) { + if (!$('.playedIndicator', card).length) { - $('
      ').insertAfter($('.posterItemOverlayTarget', posterItem)); + $('
      ').insertAfter($('.cardOverlayTarget', card)); } - $('.playedIndicator', posterItem).html('
      '); - $('.posterItemProgress', posterItem).remove(); + $('.playedIndicator', card).html('
      '); + $('.cardProgress', card).remove(); } else if (userData.UnplayedItemCount) { - if (!$('.playedIndicator', posterItem).length) { + if (!$('.playedIndicator', card).length) { - $('
      ').insertAfter($('.posterItemOverlayTarget', posterItem)); + $('
      ').insertAfter($('.cardOverlayTarget', card)); } - $('.playedIndicator', posterItem).html(userData.UnplayedItemCount); + $('.playedIndicator', card).html(userData.UnplayedItemCount); } else { - $('.playedIndicator', posterItem).remove(); + $('.playedIndicator', card).remove(); var progressHtml = LibraryBrowser.getItemProgressBarHtml(userData); - $('.posterItemProgress', posterItem).html(progressHtml); + $('.cardProgress', card).html(progressHtml); } } @@ -694,7 +696,7 @@ this.setAttribute('data-positionticks', (userData.PlaybackPositionTicks || 0)); - if ($(this).hasClass('posterItem')) { + if ($(this).hasClass('card')) { renderUserDataChanges(this, userData); } }); diff --git a/dashboard-ui/scripts/livetvchannels.js b/dashboard-ui/scripts/livetvchannels.js index 8b8a5c7e56..1008164f56 100644 --- a/dashboard-ui/scripts/livetvchannels.js +++ b/dashboard-ui/scripts/livetvchannels.js @@ -41,7 +41,7 @@ html += pagingHtml; - $('#items', page).html(html).trigger('create').createPosterItemMenus(); + $('#items', page).html(html).trigger('create').createCardMenus(); $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; diff --git a/dashboard-ui/scripts/livetvrecordinglist.js b/dashboard-ui/scripts/livetvrecordinglist.js index 40042866c1..0cdc093dba 100644 --- a/dashboard-ui/scripts/livetvrecordinglist.js +++ b/dashboard-ui/scripts/livetvrecordinglist.js @@ -37,7 +37,7 @@ 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 () { query.StartIndex += query.Limit; diff --git a/dashboard-ui/scripts/livetvrecordings.js b/dashboard-ui/scripts/livetvrecordings.js index f331de69cd..9efeefa4f9 100644 --- a/dashboard-ui/scripts/livetvrecordings.js +++ b/dashboard-ui/scripts/livetvrecordings.js @@ -60,7 +60,7 @@ overlayText: screenWidth >= 600, coverImage: true - })).createPosterItemMenus(); + })).createCardMenus(); } function reload(page) { diff --git a/dashboard-ui/scripts/livetvseriestimer.js b/dashboard-ui/scripts/livetvseriestimer.js index 33c3459dbe..8820b2bd6d 100644 --- a/dashboard-ui/scripts/livetvseriestimer.js +++ b/dashboard-ui/scripts/livetvseriestimer.js @@ -130,17 +130,15 @@ function renderRecordings(page, result) { - var screenWidth = $(window).width(); - $('.recordingsTab', page).html(LibraryBrowser.getPosterViewHtml({ items: result.Items, - shape: "autosmall", + shape: "homePageSquare", showTitle: true, - overlayText: screenWidth >= 600, + overlayText: true, coverImage: true - })).createPosterItemMenus(); + })).createCardMenus(); } function renderSchedule(page, result) { diff --git a/dashboard-ui/scripts/livetvsuggested.js b/dashboard-ui/scripts/livetvsuggested.js index c96019c6c3..f7b3409810 100644 --- a/dashboard-ui/scripts/livetvsuggested.js +++ b/dashboard-ui/scripts/livetvsuggested.js @@ -3,7 +3,6 @@ function reload(page) { Dashboard.showLoadingMsg(); - var screenWidth = $(window).width(); apiClient.getLiveTvRecommendedPrograms({ @@ -16,15 +15,15 @@ var html = LibraryBrowser.getPosterViewHtml({ items: result.Items, - shape: "auto", + shape: "homePageSquare", showTitle: true, showParentTitle: true, - overlayText: screenWidth >= 600, + overlayText: true, coverImage: true }); - $('.activeProgramItems', page).html(html).createPosterItemMenus(); + $('.activeProgramItems', page).html(html).createCardMenus(); }); apiClient.getLiveTvRecommendedPrograms({ @@ -39,15 +38,15 @@ var html = LibraryBrowser.getPosterViewHtml({ items: result.Items, - shape: "auto", + shape: "homePageSquare", showTitle: true, showParentTitle: true, - overlayText: screenWidth >= 600, + overlayText: true, coverImage: true }); - $('.upcomingProgramItems', page).html(html).createPosterItemMenus(); + $('.upcomingProgramItems', page).html(html).createCardMenus(); }); } diff --git a/dashboard-ui/scripts/loginpage.js b/dashboard-ui/scripts/loginpage.js index 85a40791c0..3650782673 100644 --- a/dashboard-ui/scripts/loginpage.js +++ b/dashboard-ui/scripts/loginpage.js @@ -126,7 +126,7 @@ for (var i = 0, length = users.length; i < length; i++) { var user = users[i]; - html += '
      '; + html += '
      '; html += '
      '; diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index 7b27d99183..ac59b5b4ca 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -972,6 +972,15 @@ $('.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) { var mediaStreams = mediaSource.MediaStreams || []; @@ -1062,7 +1071,7 @@ // Create video player 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 if (requiresNativeControls) { diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index 9bf439da7e..7570c4622b 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -399,10 +399,7 @@ translateItemsForPlayback(options.items).done(function (items) { - self.playInternal(items[0], options.startPositionTicks, user); - - self.playlist = items; - currentPlaylistIndex = 0; + self.playWithIntros(items, options, user); }); } else { @@ -415,10 +412,7 @@ translateItemsForPlayback(result.Items).done(function (items) { - self.playInternal(items[0], options.startPositionTicks, user); - - self.playlist = items; - currentPlaylistIndex = 0; + self.playWithIntros(items, options, user); }); }); @@ -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 () { return parseInt(store.getItem('preferredVideoBitrate') || '') || 1500000; }; diff --git a/dashboard-ui/scripts/moviecollections.js b/dashboard-ui/scripts/moviecollections.js index 4fbc5fcf50..341f075721 100644 --- a/dashboard-ui/scripts/moviecollections.js +++ b/dashboard-ui/scripts/moviecollections.js @@ -81,7 +81,7 @@ $('.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 () { query.StartIndex += query.Limit; diff --git a/dashboard-ui/scripts/movies.js b/dashboard-ui/scripts/movies.js index 2660072b63..4cd9e4ce75 100644 --- a/dashboard-ui/scripts/movies.js +++ b/dashboard-ui/scripts/movies.js @@ -49,7 +49,8 @@ preferThumb: true, context: 'movies', selectionPanel: true, - lazy: true + lazy: true, + overlayText: true }); $('.itemsContainer', page).removeClass('timelineItemsContainer'); } @@ -81,7 +82,8 @@ showTitle: false, centerText: true, selectionPanel: true, - lazy: true + lazy: true, + overlayText: true }); $('.itemsContainer', page).removeClass('timelineItemsContainer'); } @@ -101,7 +103,7 @@ 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 () { query.StartIndex += query.Limit; diff --git a/dashboard-ui/scripts/movieslatest.js b/dashboard-ui/scripts/movieslatest.js index 8acd9397e9..585a9e66e1 100644 --- a/dashboard-ui/scripts/movieslatest.js +++ b/dashboard-ui/scripts/movieslatest.js @@ -22,9 +22,11 @@ $('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({ items: items, - lazy: true + lazy: true, + shape: 'homePagePortrait', + overlayText: true - })).trigger('create').createPosterItemMenus(); + })).trigger('create').createCardMenus(); }); }); diff --git a/dashboard-ui/scripts/moviesrecommended.js b/dashboard-ui/scripts/moviesrecommended.js index e92152f7f0..a538971fc5 100644 --- a/dashboard-ui/scripts/moviesrecommended.js +++ b/dashboard-ui/scripts/moviesrecommended.js @@ -29,7 +29,9 @@ html += '
      '; html += LibraryBrowser.getPosterViewHtml({ items: recommendation.Items, - lazy: true + lazy: true, + shape: 'homePagePortrait', + overlayText: true }); html += '
      '; @@ -68,12 +70,12 @@ $('#resumableItems', page).html(LibraryBrowser.getPosterViewHtml({ items: result.Items, preferBackdrop: true, - shape: 'backdrop', - overlayText: screenWidth >= 600, + shape: 'homePageBackdrop', + overlayText: true, showTitle: true, lazy: true - })).trigger('create').createPosterItemMenus(); + })).trigger('create').createCardMenus(); }); @@ -97,7 +99,7 @@ var html = recommendations.map(getRecommendationHtml).join(''); $('.noItemsMessage', page).hide(); - $('.recommendations', page).html(html).trigger('create').createPosterItemMenus(); + $('.recommendations', page).html(html).trigger('create').createCardMenus(); }); }); diff --git a/dashboard-ui/scripts/movietrailers.js b/dashboard-ui/scripts/movietrailers.js index f977b0fd05..2d355cce6d 100644 --- a/dashboard-ui/scripts/movietrailers.js +++ b/dashboard-ui/scripts/movietrailers.js @@ -44,7 +44,7 @@ html += pagingHtml; - $('#items', page).html(html).trigger('create').createPosterItemMenus(); + $('#items', page).html(html).trigger('create').createCardMenus(); $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; diff --git a/dashboard-ui/scripts/musicalbumartists.js b/dashboard-ui/scripts/musicalbumartists.js index 87478e93cc..9b9e827c95 100644 --- a/dashboard-ui/scripts/musicalbumartists.js +++ b/dashboard-ui/scripts/musicalbumartists.js @@ -62,7 +62,7 @@ html += pagingHtml; - $('#items', page).html(html).trigger('create').createPosterItemMenus(); + $('#items', page).html(html).trigger('create').createCardMenus(); $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; diff --git a/dashboard-ui/scripts/musicalbums.js b/dashboard-ui/scripts/musicalbums.js index 22ec2aa949..cbe6dc44b3 100644 --- a/dashboard-ui/scripts/musicalbums.js +++ b/dashboard-ui/scripts/musicalbums.js @@ -76,7 +76,7 @@ html += pagingHtml; - $('#items', page).html(html).trigger('create').createPosterItemMenus(); + $('#items', page).html(html).trigger('create').createCardMenus(); $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; diff --git a/dashboard-ui/scripts/musicartists.js b/dashboard-ui/scripts/musicartists.js index 6daaccd5e5..35bf6bab12 100644 --- a/dashboard-ui/scripts/musicartists.js +++ b/dashboard-ui/scripts/musicartists.js @@ -62,7 +62,7 @@ html += pagingHtml; - $('#items', page).html(html).trigger('create').createPosterItemMenus(); + $('#items', page).html(html).trigger('create').createCardMenus(); $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; diff --git a/dashboard-ui/scripts/musicgenres.js b/dashboard-ui/scripts/musicgenres.js index 98eb8bbc7f..6f77075b86 100644 --- a/dashboard-ui/scripts/musicgenres.js +++ b/dashboard-ui/scripts/musicgenres.js @@ -51,7 +51,7 @@ html += pagingHtml; - $('#items', page).html(html).trigger('create').createPosterItemMenus(); + $('#items', page).html(html).trigger('create').createCardMenus(); $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; diff --git a/dashboard-ui/scripts/musicrecommended.js b/dashboard-ui/scripts/musicrecommended.js index f3b511b9f5..d5cfda6c74 100644 --- a/dashboard-ui/scripts/musicrecommended.js +++ b/dashboard-ui/scripts/musicrecommended.js @@ -22,10 +22,10 @@ items: items, showUnplayedIndicator: false, showChildCountIndicator: true, - shape: "square", + shape: "homePageSquare", showTitle: true, showParentTitle: true - })).createPosterItemMenus(); + })).createCardMenus(); }); @@ -52,10 +52,10 @@ $('#recentlyPlayedSongs', page).html(LibraryBrowser.getPosterViewHtml({ items: result.Items, showUnplayedIndicator: false, - shape: "square", + shape: "homePageSquare", showTitle: true, showParentTitle: true - })).createPosterItemMenus(); + })).createCardMenus(); }); @@ -82,10 +82,10 @@ $('#topPlayedSongs', page).html(LibraryBrowser.getPosterViewHtml({ items: result.Items, showUnplayedIndicator: false, - shape: "square", + shape: "homePageSquare", showTitle: true, showParentTitle: true - })).createPosterItemMenus(); + })).createCardMenus(); }); diff --git a/dashboard-ui/scripts/plugincatalogpage.js b/dashboard-ui/scripts/plugincatalogpage.js index f84d7791f8..01e78e884b 100644 --- a/dashboard-ui/scripts/plugincatalogpage.js +++ b/dashboard-ui/scripts/plugincatalogpage.js @@ -59,7 +59,7 @@ var href = plugin.externalUrl ? plugin.externalUrl : "addplugin.html?name=" + encodeURIComponent(plugin.name) + "&guid=" + plugin.guid; var target = plugin.externalUrl ? ' target="_blank"' : ''; - html += "
      "; + html += "
      "; html += '
      '; html += '
      '; diff --git a/dashboard-ui/scripts/tvgenres.js b/dashboard-ui/scripts/tvgenres.js index 5d423ac1c5..6301e25060 100644 --- a/dashboard-ui/scripts/tvgenres.js +++ b/dashboard-ui/scripts/tvgenres.js @@ -53,7 +53,7 @@ html += pagingHtml; - $('#items', page).html(html).trigger('create').createPosterItemMenus(); + $('#items', page).html(html).trigger('create').createCardMenus(); $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; diff --git a/dashboard-ui/scripts/tvlatest.js b/dashboard-ui/scripts/tvlatest.js index 2c4092c9c9..a7150b1313 100644 --- a/dashboard-ui/scripts/tvlatest.js +++ b/dashboard-ui/scripts/tvlatest.js @@ -22,7 +22,7 @@ $('#latestEpisodes', page).html(LibraryBrowser.getPosterViewHtml({ items: items, - shape: "backdrop", + shape: "homePageBackdrop", preferThumb: true, inheritThumb: false, showParentTitle: false, @@ -31,7 +31,7 @@ overlayText: screenWidth >= 600, lazy: true - })).trigger('create').createPosterItemMenus(); + })).trigger('create').createCardMenus(); }); }); diff --git a/dashboard-ui/scripts/tvpeople.js b/dashboard-ui/scripts/tvpeople.js index e020e062ff..4c4b9d78af 100644 --- a/dashboard-ui/scripts/tvpeople.js +++ b/dashboard-ui/scripts/tvpeople.js @@ -54,7 +54,7 @@ html += pagingHtml; - $('#items', page).html(html).trigger('create').createPosterItemMenus(); + $('#items', page).html(html).trigger('create').createCardMenus(); $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; diff --git a/dashboard-ui/scripts/tvrecommended.js b/dashboard-ui/scripts/tvrecommended.js index ace92963fc..df07254972 100644 --- a/dashboard-ui/scripts/tvrecommended.js +++ b/dashboard-ui/scripts/tvrecommended.js @@ -35,8 +35,6 @@ function loadNextUp(page, context) { - var screenWidth = $(window).width(); - var query = { Limit: 24, @@ -71,14 +69,14 @@ $('#nextUpItems', page).html(LibraryBrowser.getPosterViewHtml({ items: result.Items, - shape: "backdrop", + shape: "homePageBackdrop", showTitle: true, showParentTitle: true, - overlayText: screenWidth >= 600, + overlayText: true, context: context, lazy: true - })).trigger('create').createPosterItemMenus(); + })).trigger('create').createCardMenus(); }); } @@ -114,14 +112,14 @@ $('#resumableItems', page).html(LibraryBrowser.getPosterViewHtml({ items: result.Items, - shape: "backdrop", + shape: "homePageBackdrop", showTitle: true, showParentTitle: true, - overlayText: screenWidth >= 600, + overlayText: true, lazy: true, context: 'tv' - })).trigger('create').createPosterItemMenus(); + })).trigger('create').createCardMenus(); }); } diff --git a/dashboard-ui/scripts/tvshows.js b/dashboard-ui/scripts/tvshows.js index 91805d2ab0..06a39a7fd0 100644 --- a/dashboard-ui/scripts/tvshows.js +++ b/dashboard-ui/scripts/tvshows.js @@ -89,7 +89,7 @@ html += pagingHtml; - $('#items', page).html(html).trigger('create').createPosterItemMenus(); + $('#items', page).html(html).trigger('create').createCardMenus(); $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; diff --git a/dashboard-ui/scripts/tvstudios.js b/dashboard-ui/scripts/tvstudios.js index b1e31d092b..67ab6ab738 100644 --- a/dashboard-ui/scripts/tvstudios.js +++ b/dashboard-ui/scripts/tvstudios.js @@ -53,7 +53,7 @@ html += pagingHtml; - $('#items', page).html(html).trigger('create').createPosterItemMenus(); + $('#items', page).html(html).trigger('create').createCardMenus(); $('.btnNextPage', page).on('click', function () { query.StartIndex += query.Limit; diff --git a/dashboard-ui/scripts/tvupcoming.js b/dashboard-ui/scripts/tvupcoming.js index f2b12cf01e..0fe7330073 100644 --- a/dashboard-ui/scripts/tvupcoming.js +++ b/dashboard-ui/scripts/tvupcoming.js @@ -39,7 +39,7 @@ $('#upcomingItems', page).html(LibraryBrowser.getPosterViewHtml({ items: items, showLocationTypeIndicator: false, - shape: "backdrop", + shape: "homePageBackdrop", showTitle: true, showPremiereDate: true, showPremiereDateIndex: true, @@ -47,7 +47,7 @@ context: context || 'home-upcoming', lazy: true, - })).trigger('create').createPosterItemMenus(); + })).trigger('create').createCardMenus(); }); }); diff --git a/dashboard-ui/tvrecommended.html b/dashboard-ui/tvrecommended.html index 3f9f5b02c7..4183d1c8d0 100644 --- a/dashboard-ui/tvrecommended.html +++ b/dashboard-ui/tvrecommended.html @@ -25,27 +25,23 @@

      - - - - -
      +
      -
      -
      +

      ${HeaderNextUp}

      +
      + +
      +
      + +
      diff --git a/dashboard-ui/tvupcoming.html b/dashboard-ui/tvupcoming.html index ba4dbb61e4..e0a701c395 100644 --- a/dashboard-ui/tvupcoming.html +++ b/dashboard-ui/tvupcoming.html @@ -23,18 +23,14 @@ ${TabNetworks}
      - - - - -
      -
      -
      - -
      +
      +
      +
      + +