1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
Conflicts:
	MediaBrowser.Server.Implementations/Localization/Server/server.json
This commit is contained in:
Tavares André 2015-05-07 19:12:56 +02:00
commit ceab54fdbc
85 changed files with 3049 additions and 892 deletions

View file

@ -7,7 +7,7 @@
<div id="channelItemsPage" data-role="page" class="page libraryPage channelsPage" data-contextname="${HeaderChannels}">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="channelslatest.html">${TabLatest}</a>
<a href="channelslatest.html" class="latestChannelItemsTab">${TabLatest}</a>
<a href="channels.html" class="ui-btn-active">${TabChannels}</a>
</div>

View file

@ -7,7 +7,7 @@
<div id="channelsPage" data-role="page" class="page libraryPage channelsPage" data-contextname="${HeaderChannels}">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="channelslatest.html">${TabLatest}</a>
<a href="channelslatest.html" class="latestChannelItemsTab">${TabLatest}</a>
<a href="#" class="ui-btn-active">${TabChannels}</a>
</div>

View file

@ -7,7 +7,7 @@
<div id="channelsLatestPage" data-role="page" class="page libraryPage channelsPage" data-contextname="${HeaderChannels}">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="#" class="ui-btn-active">${TabLatest}</a>
<a href="#" class="ui-btn-active latestChannelItemsTab">${TabLatest}</a>
<a href="channels.html">${TabChannels}</a>
</div>

View file

@ -12,8 +12,8 @@
<a href="movietrailers.html">${TabTrailers}</a>
<a href="#" class="ui-btn-active">${TabCollections}</a>
<a href="moviegenres.html">${TabGenres}</a>
<a href="moviepeople.html">${TabPeople}</a>
<a href="moviestudios.html">${TabStudios}</a>
<a href="moviepeople.html" class="moviePeopleTab">${TabPeople}</a>
<a href="moviestudios.html" class="movieStudiosTab">${TabStudios}</a>
</div>
<div class="libraryViewNav scopedLibraryViewNav collectionTabs">

View file

@ -4,12 +4,11 @@
<title>${TitleSignIn}</title>
</head>
<body class="serverlessPage">
<div class="backdropContainer" style="background-image:url(css/images/splash.jpg);top:0;"></div>
<div id="connectLoginPage" data-role="page" class="page standalonePage connectLoginPage lightBackdropPage backdropPage staticBackdropPage" data-theme="b" style="background-color: rgba(0, 0,0, .9)!important;">
<div id="connectLoginPage" data-role="page" class="page standalonePage connectLoginPage" data-theme="b">
<div data-role="content">
<form class="connectLoginForm" style="text-align: center; margin: 0 auto;">
<form class="connectLoginForm" style="text-align: center; margin: 0 auto;display:none;">
<h1 style="text-align: left;">${HeaderSignInWithConnect}</h1>
<br />
@ -24,21 +23,84 @@
<input type="password" id="txtManualPassword" required="required" />
</div>
<button type="submit" data-icon="check">
<button class="btn btnActionAccent" data-role="none" type="submit">
<span>
${ButtonSignIn}
</span>
<i class="fa fa-check"></i>
</button>
<p>
<p class="forgotPassword" style="display:none;">
<a href="http://emby.media/community/index.php?app=core&module=global&section=lostpass" target="_blank">${ButtonForgotPassword}</a>
</p>
<div class="skip">
<br />
<button class="btn btnDarkAccent btnSkipConnect" data-role="none" type="button">
<span>
${ButtonSkip}
</span>
<i class="fa fa-close"></i>
</button>
<div class="fieldDescription">${TextConnectToServerManually}</div>
</div>
<div class="newUsers" style="display:none;">
<br />
<h2 style="text-align: left;">${HeaderNewUsers}</h2>
<a data-role="button" data-icon="action" href="http://emby.media/community/index.php?app=core&module=global&section=register" target="_blank">${ButtonSignUp}</a>
</div>
</form>
<form class="manualServerForm" style="text-align: center; margin: 0 auto;display:none;">
<h1 style="text-align: left;">${HeaderConnectToServer}</h1>
<br />
<div>
<label for="txtServerHost" style="text-align: left;">${LabelServerHost}</label>
<input type="text" id="txtServerHost" required="required" />
<div class="fieldDescription" style="text-align:left;">${LabelServerHostHelp}</div>
</div>
<br />
<div>
<label for="txtServerPort" style="text-align: left;">${LabelServerPort}</label>
<input type="number" id="txtServerPort" step="1" min="0" />
</div>
<br /><br />
<button class="btn btnActionAccent" data-role="none" type="submit">
<span>
${ButtonConnect}
</span>
<i class="fa fa-check"></i>
</button>
<a class="btn btnDarkAccent" href="#" data-rel="back">
<span>
${ButtonCancel}
</span>
<i class="fa fa-close"></i>
</a>
</form>
<div class="welcomeContainer readOnlyContent" style="text-align: center; margin: 0 auto;display:none;">
<div style="text-align: left;">
<h1>${HeaderWelcomeToEmby}</h1>
<p style="margin:2em 0;">${EmbyIntroMessage}</p>
<p style="margin:2em 0;" class="embyIntroDownloadMessage"></p>
<a class="btn btnActionAccent btnIconRight" href="connectlogin.html?mode=connect">
<span>
${ButtonNext}
</span>
<i class="fa fa-arrow-right"></i>
</a>
</div>
</div>
</div>
<script type="text/javascript">
$('.connectLoginForm').off('submit', ConnectLoginPage.onSubmit).on('submit', ConnectLoginPage.onSubmit);
$('.manualServerForm').off('submit', ConnectLoginPage.onManualServerSubmit).on('submit', ConnectLoginPage.onManualServerSubmit);
</script>
</div>
</body>

View file

@ -39,16 +39,18 @@
text-overflow: ellipsis;
}
.smallBackdropPosterItem .cardOverlayInner > div {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
.buttonCard:hover .cardBox {
opacity: .6;
}
.cardBox {
margin: 1px;
}
.largeCardMargin .cardBox {
margin: 8px;
}
/*@media all and (max-width: 600px) {
.cardBox {
@ -110,6 +112,10 @@
padding-bottom: 100%;
}
.smallSquareCard .cardPadder {
padding-bottom: 100%;
}
.letterBoxCard .cardPadder {
padding-bottom: 75%;
}
@ -118,6 +124,10 @@
padding-bottom: 150%;
}
.smallPortraitCard .cardPadder {
padding-bottom: 150%;
}
.bannerCard .cardPadder {
padding-bottom: 18.5%;
}
@ -174,7 +184,6 @@
text-wrap: none;
white-space: nowrap;
padding: 5px 4px 2px;
text-shadow: none;
font-weight: 400;
line-height: 1.4;
}
@ -204,6 +213,16 @@
color: #ddd;
}
/*.cardBox:not(.visualCardBox) .outerCardFooter .cardText {
font-size: 14px;
background: rgba(51, 51, 51,.6);
padding: 5px;
}*/
.cardBox:not(.visualCardBox) .outerCardFooter .cardText:last-child {
margin-bottom: 2em;
}
@media all and (max-width: 600px) {
.packageReviewText {
@ -219,6 +238,11 @@
height: 100%;
}
.cardImage canvas {
width: 100%;
height: 100%;
}
.coveredCardImage {
background-size: cover;
}
@ -235,6 +259,10 @@
width: 50%;
}
.smallSquareCard {
width: 33.3334%;
}
.backdropCard {
width: 50%;
}
@ -247,6 +275,10 @@
width: 33.3%;
}
.smallPortraitCard {
width: 25%;
}
.cardProgress {
line-height: 7px;
}
@ -270,13 +302,24 @@
.squareCard {
width: 33.3%;
}
.smallSquareCard {
width: 25%;
}
}
@media all and (min-width: 400px) {
.smallBackdropCard {
width: 33.3%;
}
}
@media all and (min-width: 540px) {
.smallBackdropCard {
width: 33.3%;
width: 25%;
}
}
@ -286,6 +329,10 @@
.portraitCard {
width: 25%;
}
.smallPortraitCard {
width: 20%;
}
}
@media all and (min-width: 700px) {
@ -309,7 +356,11 @@
}
.smallBackdropCard {
width: 25%;
width: 20%;
}
.smallSquareCard {
width: 20%;
}
}
@ -323,6 +374,10 @@
.smallBackdropCard {
width: 20%;
}
.smallPortraitCard {
width: 16.666666666666666666666666666667%;
}
}
@ -347,6 +402,14 @@
.smallBackdropCard {
width: 16.666666666666666666666666666667%;
}
.smallSquareCard {
width: 16.666666666666666666666666666667%;
}
.smallPortraitCard {
width: 14.285714285714285714285714285714%;
}
}
@ -363,6 +426,10 @@
.smallBackdropCard {
width: 14.285714285714285714285714285714%;
}
.smallPortraitCard {
width: 12.5%;
}
}
@ -508,14 +575,14 @@
}
}
@media all and (min-width: 1400px) {
@media all and (min-width: 1100px) {
.homePageSmallBackdropCard {
width: 20%;
}
}
@media all and (min-width: 1920px) {
@media all and (min-width: 1440px) {
.homePageSmallBackdropCard {
width: 14.285714285714285714285714285714%;

View file

@ -9,7 +9,6 @@
text-align: left;
width: 100%;
margin: 0 auto;
text-shadow: none!important;
}
.stretchedDetailTable {

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

View file

@ -30,7 +30,7 @@
.backdropContainer {
position: fixed;
top: 50px;
top: 0;
right: 0;
left: 0;
bottom: 0;
@ -95,6 +95,13 @@
}
}
@media all and (min-width: 800px) {
.hiddenSectionOnNonMobile {
display: none;
}
}
.firstListHeader + .sectionHeaderButton {
top: 3px;
}
@ -773,7 +780,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
}
}
@media all and (max-height: 600px), (max-width: 600px) {
@media all and (max-height: 540px), (max-width: 540px) {
.itemBackdrop:not(.noBackdrop) {
height: 280px;
@ -1470,3 +1477,31 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
padding-left: 1em;
}
}
.latestChannelItemsDisabled .latestChannelItemsTab {
display: none !important;
}
.studioTabDisabled .tvStudiosTab, .studioTabDisabled .movieStudiosTab {
display: none !important;
}
.peopleTabDisabled .tvPeopleTab, .peopleTabDisabled .moviePeopleTab {
display: none !important;
}
.tvEpisodesTabDisabled .tvEpisodesTab {
display: none !important;
}
.musicSongsTabDisabled .musicSongsTab {
display: none !important;
}
.musicArtistsTabDisabled .musicArtistsTab {
display: none !important;
}
.homeLatestTabDisabled .homeLatestTab {
display: none !important;
}

View file

@ -3,7 +3,7 @@
}
.libraryPage:not(.metadataEditorPage):not(.noSecondaryNavPage) {
padding-top: 98px !important;
padding-top: 99px !important;
}
.libraryMenuDivider {
@ -124,7 +124,7 @@
}
.libraryViewNav {
height: 48px;
height: 49px;
overflow: hidden;
position: fixed;
right: 0;
@ -132,7 +132,7 @@
top: 50px;
z-index: 999;
text-align: center;
font-size: 15px;
font-size: 14px;
white-space: nowrap;
padding: 0 0 0;
overflow-x: scroll;
@ -142,7 +142,7 @@
}
.viewMenuBar {
background-color: #000;
background-color: #111;
}
.libraryViewNav {
@ -188,7 +188,7 @@
.librarySidebarLinks a {
font-weight: 300 !important;
padding: .7em 20px .7em 0;
padding: .8em 20px .8em 0;
}
.librarySidebarLinks a:hover {
@ -224,12 +224,12 @@
.libraryViewNav a {
display: inline-block;
padding: 12px 0 9px;
color: #ddd !important;
color: rgba(255,255,255,.8) !important;
text-decoration: none;
margin: 0 0;
position: relative;
font-weight: normal;
border-bottom: 4px solid transparent;
border-bottom: 5px solid transparent;
}
.libraryViewNav a:not(.ui-btn-active):hover {

View file

@ -1,4 +1,8 @@

.tvGuideHeader.headroom--unpinned {
-webkit-transform: translateY(-98px);
transform: translateY(-98px);
}
.tvProgramSectionHeader {
margin: 0;
}
@ -90,7 +94,7 @@
}
.tvProgram:hover, .tvProgram:hover .tvProgramInfo {
background-color: #4d90fe;
background-color: #444;
}
.timerCircle {
@ -215,7 +219,7 @@
}
.channelHeaderCell:hover {
background-color: #38c;
background-color: #444;
}
.channelList {
@ -254,7 +258,7 @@
}
.programCellInner:hover {
background-color: #38c;
background-color: #444;
}
.timeslotCellInner {

View file

@ -202,11 +202,16 @@ button.btn:not(.btn-inline), button.btn-large:not(.btn-inline) {
vertical-align: middle;
}
.btn:not(.btn-inline):not(.btnNoText) i {
.btn:not(.btn-inline):not(.btnNoText):not(.btnIconRight) i {
position: absolute;
left: 10px;
}
.btnIconRight:not(.btn-inline):not(.btnNoText) i {
position: absolute;
right: 10px;
}
.btn-large i {
position: absolute;
left: 24px;

View file

@ -36,7 +36,7 @@
}
.videoControls {
padding: 0 .5em;
padding: .5em .5em;
background-color: rgba(0, 0, 0, .8);
position: fixed;
left: 0;
@ -47,7 +47,7 @@
}
.videoTopControls {
padding: .7em 1em;
padding: 1em;
background-color: rgba(0, 0, 0, .5);
position: absolute;
left: 0;
@ -61,10 +61,6 @@
vertical-align: top;
}
.videoControls .currentTime {
margin-top: 25px;
}
#slider-tooltip {
z-index: 99999;
position: absolute;
@ -84,7 +80,7 @@
z-index: 99999;
}
#videoPlayer .nowPlayingInfo img {
#videoPlayer .nowPlayingImage img {
height: auto !important;
max-width: 100px;
max-height: 200px;
@ -135,11 +131,11 @@
#mediaPlayer .ui-slider-track, .nowPlayingBar .ui-slider-track, .nowPlayingPage .ui-slider-track {
border-color: #2ad !important;
height: 2px!important;
height: 2px !important;
}
#videoPlayer .inactive {
display: none!important;
display: none !important;
}
.idlePlayer video {
@ -149,6 +145,7 @@
#mediaPlayer .sliderContainer {
position: relative;
top: 5px;
vertical-align: middle;
}
/****************************************/
@ -190,10 +187,11 @@
@media all and (max-width: 555px) {
#mediaPlayer .videoControls .previousTrackButton, #mediaPlayer .videoControls .nextTrackButton {
display: none!important;
display: none !important;
}
.videoTopControlsLogo {
display: none!important;
display: none !important;
}
}
@ -204,7 +202,7 @@
}
@media all and (min-width: 1300px) {
#videoPlayer .nowPlayingInfo img {
#videoPlayer .nowPlayingImage img {
height: auto !important;
max-width: 150px;
max-height: 300px;

View file

@ -1,16 +1,25 @@
/* Now playing bar */
.nowPlayingBar {
padding: 6px 0 14px 0;
padding: 16px 0 16px 0;
border-top: 2px solid green;
text-align: center;
}
.nowPlayingBarImage {
vertical-align: bottom;
.mediaButton {
vertical-align: top;
}
.mediaButton {
vertical-align: top;
vertical-align: middle;
font-size: 30px;
color: #e8e8e8 !important;
margin: 0 10px;
min-width: 30px;
text-align: center;
}
.videoTopControls .mediaButton {
font-size: 26px;
}
#mediaElement {
@ -23,12 +32,20 @@
font-weight: normal;
position: relative;
top: -7px;
margin: 0 10px 0 3px;
max-width: 200px;
margin: 0 0 0 3px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
vertical-align: middle;
text-align: left;
font-size: 15px;
max-width: 200px;
}
@media (min-width: 800px) {
.nowPlayingText {
margin-right: 30px;
}
}
.nowPlayingDoubleText {
@ -37,10 +54,11 @@
.nowPlayingImage {
display: inline-block;
vertical-align: middle;
}
.nowPlayingImage img {
height: 40px;
height: 50px;
margin-right: .5em;
vertical-align: bottom;
}
@ -51,17 +69,12 @@
.currentTime {
display: inline-block;
position: relative;
top: -10px;
vertical-align: middle;
max-width: 110px;
margin-right: 2em;
font-weight: normal;
}
.nowPlayingBar .currentTime {
top: -15px;
}
.mediaSlider {
position: relative;
top: -10px;
@ -78,7 +91,8 @@
}
.nowPlayingBar .sliderContainer {
margin-top: 14px;
margin-top: 10px;
vertical-align: middle;
}
.volumeSliderContainer {
@ -98,7 +112,7 @@
}
.volumeButton {
margin-right: .5em!important;
margin-right: .5em !important;
}
::-ms-thumb {
@ -131,7 +145,7 @@ input[type="range"]::-ms-fill-upper {
margin-bottom: 0;
}
.nowPlayingBar .mediaButton:not(#playButton):not(#pauseButton):not(.remoteControlButton) {
.nowPlayingBar .mediaButton:not(.unpauseButton):not(.pauseButton):not(.remoteControlButton):not(.stopButton) {
display: none;
}
@ -139,7 +153,7 @@ input[type="range"]::-ms-fill-upper {
float: right;
}
.nowPlayingBar #playButton, .nowPlayingBar #pauseButton {
.nowPlayingBar .unpauseButton, .nowPlayingBar .pauseButton, .nowPlayingBar .stopButton {
float: right;
}
@ -148,7 +162,7 @@ input[type="range"]::-ms-fill-upper {
}
.nowPlayingBar {
padding: 10px 5px 10px 0;
padding: 10px 5px 10px 10px;
text-align: left;
}
}

View file

@ -42,6 +42,12 @@
white-space: nowrap;
}
.smallBackdropPosterItem .cardOverlayInner > div {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.chapterPosterItem {
width: 240px!important;
cursor: pointer;

View file

@ -162,6 +162,30 @@ h1 a:hover {
margin: -10px 0 0 -10px;
}
/**
* Note: I have omitted any vendor-prefixes for clarity.
* Adding them is left as an exercise for the reader.
*/
.headroom {
-webkit-transition: transform 200ms linear;
transition: transform 200ms linear;
}
.headroom--pinned {
-webkit-transform: translateY(0%);
transform: translateY(0%);
}
.headroom--unpinned {
-webkit-transform: translateY(-100%);
transform: translateY(-100%);
}
.libraryViewNav.headroom--unpinned {
-webkit-transform: translateY(-200%);
transform: translateY(-200%);
}
.largePanel {
width: 270px;
}
@ -361,7 +385,6 @@ h1 .imageLink {
padding: .6em 20px .6em 0;
text-decoration: none;
color: inherit !important;
text-shadow: none !important;
font-weight: 500 !important;
font-size: 14px;
vertical-align: middle;
@ -597,11 +620,10 @@ h1 .imageLink {
z-index: 1097;
color: #fff;
border: 0 !important;
background-color: #111;
background-color: rgba(26,26,26,.9);
}
.footerNotification {
text-shadow: none;
padding: .75em 1em;
margin: 0;
font-weight: normal;
@ -1096,3 +1118,38 @@ h1 + .accentButton {
.disabledUserBanner {
margin: 0 0 2em;
}
.modalLoading {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: rgba(0, 0, 0, .3);
/* One less than jqm loading spinner, so we can combine them */
z-index: 9999998;
}
.nativeApp * {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-touch-callout: none;
-moz-touch-callout: none;
-ms-touch-callout: none;
touch-callout: none;
-webkit-user-drag: none;
-moz-user-drag: none;
-ms-user-drag: none;
user-drag: none;
}
.nativeApp input {
-webkit-user-select: auto !important;
-khtml-user-select: auto !important;
-moz-user-select: auto !important;
-ms-user-select: auto !important;
user-select: auto !important;
}

View file

@ -383,7 +383,6 @@
.posterItem {
margin: 5px 5px;
text-shadow: none;
font-weight: normal !important;
display: inline-block;
position: relative;
@ -403,147 +402,5 @@
text-wrap: none;
white-space: nowrap;
padding: 5px 4px 4px;
text-shadow: none;
font-weight: 400;
}
.posterItemImage {
background-size: contain;
background-repeat: no-repeat;
background-position: center bottom;
background-color: #000;
position: relative;
}
.myLibraryPosterItem {
width: 42%;
min-width: 50px;
}
.myLibraryPosterItem .posterItemImage {
height: 34px;
background-position: 9px center;
background-size: 14px 14px;
background-color: rgba(51, 136, 204, 0.7);
background-color: rgba(82, 181, 75, 0.7);
}
.myLibraryPosterItem .posterItemText {
top: 0;
left: 0;
line-height: 34px;
text-align: left;
padding: 0 0 0 12px;
position: absolute;
}
.myLibraryPosterItem i {
margin-right: 10px;
}
.moviesPosterItem .posterItemImage, .trailersPosterItem .posterItemImage {
background-color: rgba(176, 94, 81, 0.7);
}
.musicPosterItem .posterItemImage {
background-color: rgba(217, 145, 67, 0.7);
}
.tvshowsPosterItem .posterItemImage {
background-color: rgba(77, 88, 164, 0.7);
}
.gamesPosterItem .posterItemImage {
background-color: rgba(183, 202, 72, 0.7);
}
.channelsPosterItem .posterItemImage {
background-color: rgba(51, 136, 204, 0.7);
}
.livetvPosterItem .posterItemImage {
background-color: rgba(255, 233, 127, 0.7);
}
.homevideosPosterItem .posterItemImage {
background-color: rgba(110, 52, 32, 0.7);
}
.photosPosterItem .posterItemImage {
background-color: rgba(127, 0, 0, 0.7);
}
.musicvideosPosterItem .posterItemImage {
background-color: rgba(143, 54, 168, 0.7);
}
@media all and (min-width: 600px) {
.myLibraryPosterItem {
width: 31%;
/* Specify a min width just in case the container doesn't have a width */
min-width: 160px;
}
}
@media all and (min-width: 800px) {
.myLibraryPosterItem {
width: 32%;
/* Specify a min width just in case the container doesn't have a width */
min-width: 160px;
}
}
@media all and (min-width: 1000px) {
.myLibraryPosterItem {
width: 23.5%;
/* Specify a min width just in case the container doesn't have a width */
min-width: 220px;
}
}
@media all and (min-width: 1200px) {
.myLibraryPosterItem {
width: 24.0%;
}
}
@media all and (min-width: 1440px) {
.myLibraryPosterItem {
width: 19.0%;
/* Specify a min width just in case the container doesn't have a width */
min-width: 220px;
}
}
@media all and (min-width: 1600px) {
.myLibraryPosterItem {
width: 15.5%;
}
}
@media all and (min-width: 1700px) {
.myLibraryPosterItem {
width: 16%;
}
}
@media all and (min-width: 2000px) {
.myLibraryPosterItem {
width: 13.5%;
}
}
@media all and (min-width: 2300px) {
.myLibraryPosterItem {
width: 13.8%;
}
}

View file

@ -13,8 +13,8 @@
<a href="tvshows.html">${TabShows}</a>
<a href="#" class="ui-btn-active">${TabEpisodes}</a>
<a href="tvgenres.html">${TabGenres}</a>
<a href="tvpeople.html">${TabPeople}</a>
<a href="tvstudios.html">${TabNetworks}</a>
<a href="tvpeople.html" class="tvPeopleTab">${TabPeople}</a>
<a href="tvstudios.html" class="tvStudiosTab">${TabNetworks}</a>
</div>
<div class="alphabetPicker">

View file

@ -8,7 +8,7 @@
<div class="libraryViewNav scopedLibraryViewNav">
<a href="index.html">${TabHome}</a>
<a href="homelatest.html">${TabLatest}</a>
<a href="homelatest.html" class="homeLatestTab">${TabLatest}</a>
<a href="tvrecommended.html">${TabNextUp}</a>
<a href="favorites.html" class="ui-btn-active">${TabFavorites}</a>
<a href="tvupcoming.html">${TabUpcoming}</a>

View file

@ -4,7 +4,7 @@
<title>${TitleForgotPassword}</title>
</head>
<body>
<div data-role="page" class="page standalonePage forgotPasswordPage">
<div data-role="page" class="page standalonePage forgotPasswordPage" data-theme="b">
<div data-role="content">
@ -22,7 +22,7 @@
<br />
<p>
<button type="submit" data-icon="check" data-theme="b">
<button type="submit" data-icon="check">
${ButtonSubmit}
</button>
</p>

View file

@ -4,7 +4,7 @@
<title>${TitlePasswordReset}</title>
</head>
<body>
<div data-role="page" class="page standalonePage forgotPasswordPage">
<div data-role="page" class="page standalonePage forgotPasswordPage" data-theme="b">
<div data-role="content">
@ -19,7 +19,7 @@
<br />
<p>
<button type="submit" data-icon="check" data-theme="b">
<button type="submit" data-icon="check">
${ButtonSubmit}
</button>
</p>

View file

@ -8,7 +8,7 @@
<div class="libraryViewNav scopedLibraryViewNav">
<a href="#" class="ui-btn-active">${TabHome}</a>
<a href="homelatest.html">${TabLatest}</a>
<a href="homelatest.html" class="homeLatestTab">${TabLatest}</a>
<a href="tvrecommended.html">${TabNextUp}</a>
<a href="favorites.html">${TabFavorites}</a>
<a href="tvupcoming.html">${TabUpcoming}</a>

View file

@ -13,8 +13,8 @@
<a href="movietrailers.html">${TabTrailers}</a>
<a href="collections.html?context=movies">${TabCollections}</a>
<a href="moviegenres.html" class="ui-btn-active">${TabGenres}</a>
<a href="moviepeople.html">${TabPeople}</a>
<a href="moviestudios.html">${TabStudios}</a>
<a href="moviepeople.html" class="moviePeopleTab">${TabPeople}</a>
<a href="moviestudios.html" class="movieStudiosTab">${TabStudios}</a>
</div>
</div>
<div id="moviePeopleTabs" class="itemTabs" style="display: none;">
@ -24,8 +24,8 @@
<a href="movietrailers.html">${TabTrailers}</a>
<a href="collections.html?context=movies">${TabCollections}</a>
<a href="moviegenres.html">${TabGenres}</a>
<a href="moviepeople.html" class="ui-btn-active">${TabPeople}</a>
<a href="moviestudios.html">${TabStudios}</a>
<a href="moviepeople.html" class="ui-btn-active moviePeopleTab">${TabPeople}</a>
<a href="moviestudios.html" class="movieStudiosTab">${TabStudios}</a>
</div>
</div>
<div id="movieStudioTabs" class="itemTabs" style="display: none;">
@ -35,8 +35,8 @@
<a href="movietrailers.html">${TabTrailers}</a>
<a href="collections.html?context=movies">${TabCollections}</a>
<a href="moviegenres.html">${TabGenres}</a>
<a href="moviepeople.html">${TabPeople}</a>
<a href="moviestudios.html" class="ui-btn-active">${TabStudios}</a>
<a href="moviepeople.html" class="moviePeopleTab">${TabPeople}</a>
<a href="moviestudios.html" class="ui-btn-active movieStudiosTab">${TabStudios}</a>
</div>
</div>
<div id="tvGenreTabs" class="itemTabs" style="display: none;">
@ -45,10 +45,10 @@
<a href="tvlatest.html">${TabLatest}</a>
<a href="tvupcoming.html">${TabUpcoming}</a>
<a href="tvshows.html">${TabShows}</a>
<a href="episodes.html">${TabEpisodes}</a>
<a href="episodes.html" class="tvEpisodesTab">${TabEpisodes}</a>
<a href="tvgenres.html" class="ui-btn-active">${TabGenres}</a>
<a href="tvpeople.html">${TabPeople}</a>
<a href="tvstudios.html">${TabNetworks}</a>
<a href="tvpeople.html" class="tvPeopleTab">${TabPeople}</a>
<a href="tvstudios.html" class="tvStudiosTab">${TabNetworks}</a>
</div>
</div>
<div id="tvPeopleTabs" class="itemTabs" style="display: none;">
@ -57,10 +57,10 @@
<a href="tvlatest.html">${TabLatest}</a>
<a href="tvupcoming.html">${TabUpcoming}</a>
<a href="tvshows.html">${TabShows}</a>
<a href="episodes.html">${TabEpisodes}</a>
<a href="episodes.html" class="tvEpisodesTab">${TabEpisodes}</a>
<a href="tvgenres.html">${TabGenres}</a>
<a href="tvpeople.html" class="ui-btn-active">Actors</a>
<a href="tvstudios.html">${TabNetworks}</a>
<a href="tvpeople.html" class="ui-btn-active tvPeopleTab">Actors</a>
<a href="tvstudios.html" class="tvStudiosTab">${TabNetworks}</a>
</div>
</div>
<div id="tvStudioTabs" class="itemTabs" style="display: none;">
@ -69,19 +69,19 @@
<a href="tvlatest.html">${TabLatest}</a>
<a href="tvupcoming.html">${TabUpcoming}</a>
<a href="tvshows.html">${TabShows}</a>
<a href="episodes.html">${TabEpisodes}</a>
<a href="episodes.html" class="tvEpisodesTab">${TabEpisodes}</a>
<a href="tvgenres.html">${TabGenres}</a>
<a href="tvpeople.html">${TabPeople}</a>
<a href="tvstudios.html" class="ui-btn-active">${TabNetworks}</a>
<a href="tvpeople.html" class="tvPeopleTab">${TabPeople}</a>
<a href="tvstudios.html" class="ui-btn-active tvStudiosTab">${TabNetworks}</a>
</div>
</div>
<div id="musicGenreTabs" class="itemTabs" style="display: none;">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="musicrecommended.html">${TabSuggestions}</a>
<a href="songs.html">${TabSongs}</a>
<a href="songs.html" class="musicSongsTab">${TabSongs}</a>
<a href="musicalbums.html">${TabAlbums}</a>
<a href="musicalbumartists.html">${TabAlbumArtists}</a>
<a href="musicartists.html">${TabArtists}</a>
<a href="musicartists.html" class="musicArtistsTab">${TabArtists}</a>
<a href="musicgenres.html" class="ui-btn-active">${TabGenres}</a>
<a href="musicvideos.html">${TabMusicVideos}</a>
</div>
@ -89,10 +89,10 @@
<div id="artistTabs" class="itemTabs" style="display: none;">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="musicrecommended.html">${TabSuggestions}</a>
<a href="songs.html">${TabSongs}</a>
<a href="songs.html" class="musicSongsTab">${TabSongs}</a>
<a href="musicalbums.html">${TabAlbums}</a>
<a href="musicalbumartists.html">${TabAlbumArtists}</a>
<a href="musicartists.html" class="ui-btn-active">${TabArtists}</a>
<a href="musicartists.html" class="ui-btn-active musicArtistsTab">${TabArtists}</a>
<a href="musicgenres.html">${TabGenres}</a>
<a href="musicvideos.html">${TabMusicVideos}</a>
</div>

View file

@ -9,7 +9,7 @@
<div class="itemTabs homeTabs" style="display: none;">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="index.html" class="lnkHomeHome">${TabHome}</a>
<a href="homelatest.html" class="lnkHomeLatest">${TabLatest}</a>
<a href="homelatest.html" class="lnkHomeLatest homeLatestTab">${TabLatest}</a>
<a href="tvrecommended.html" class="lnkHomeNextUp">${TabNextUp}</a>
<a href="favorites.html" class="lnkHomeFavorites">${TabFavorites}</a>
<a href="tvupcoming.html" class="lnkHomeUpcoming">${TabUpcoming}</a>
@ -18,7 +18,7 @@
<div id="channelTabs" class="itemTabs" style="display: none;">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="channelslatest.html">${TabLatest}</a>
<a href="channelslatest.html" class="latestChannelItemsTab">${TabLatest}</a>
<a href="channels.html" class="ui-btn-active">${TabChannels}</a>
</div>
</div>
@ -36,8 +36,8 @@
<a href="movietrailers.html" class="lnkMovieTrailers">${TabTrailers}</a>
<a href="collections.html?context=movies" class="lnkCollections">${TabCollections}</a>
<a href="moviegenres.html">${TabGenres}</a>
<a href="moviepeople.html">${TabPeople}</a>
<a href="moviestudios.html">${TabStudios}</a>
<a href="moviepeople.html" class="moviePeopleTab">${TabPeople}</a>
<a href="moviestudios.html" class="movieStudiosTab">${TabStudios}</a>
</div>
</div>
<div class="itemTabs photoTabs" style="display: none;">
@ -53,19 +53,19 @@
<a href="tvlatest.html">${TabLatest}</a>
<a href="tvupcoming.html">${TabUpcoming}</a>
<a href="tvshows.html" class="ui-btn-active">${TabShows}</a>
<a href="episodes.html">${TabEpisodes}</a>
<a href="episodes.html" class="tvEpisodesTab">${TabEpisodes}</a>
<a href="tvgenres.html">${TabGenres}</a>
<a href="tvpeople.html">${TabPeople}</a>
<a href="tvstudios.html">${TabNetworks}</a>
<a href="tvpeople.html" class="tvPeopleTab">${TabPeople}</a>
<a href="tvstudios.html" class="tvStudiosTab">${TabNetworks}</a>
</div>
</div>
<div id="songTabs" class="itemTabs" style="display: none;">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="musicrecommended.html">${TabSuggestions}</a>
<a href="songs.html" class="ui-btn-active">${TabSongs}</a>
<a href="songs.html" class="ui-btn-active musicSongsTab">${TabSongs}</a>
<a href="musicalbums.html">${TabAlbums}</a>
<a href="musicalbumartists.html">${TabAlbumArtists}</a>
<a href="musicartists.html">${TabArtists}</a>
<a href="musicartists.html" class="musicArtistsTab">${TabArtists}</a>
<a href="musicgenres.html">${TabGenres}</a>
<a href="musicvideos.html">${TabMusicVideos}</a>
</div>
@ -73,10 +73,10 @@
<div id="albumTabs" class="itemTabs" style="display: none;">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="musicrecommended.html">${TabSuggestions}</a>
<a href="songs.html">${TabSongs}</a>
<a href="songs.html" class="musicSongsTab">${TabSongs}</a>
<a href="musicalbums.html" class="ui-btn-active">${TabAlbums}</a>
<a href="musicalbumartists.html">${TabAlbumArtists}</a>
<a href="musicartists.html">${TabArtists}</a>
<a href="musicartists.html" class="musicArtistsTab">${TabArtists}</a>
<a href="musicgenres.html">${TabGenres}</a>
<a href="musicvideos.html">${TabMusicVideos}</a>
</div>
@ -84,10 +84,10 @@
<div id="musicVideoTabs" class="itemTabs" style="display: none;">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="musicrecommended.html">${TabSuggestions}</a>
<a href="songs.html">${TabSongs}</a>
<a href="songs.html" class="musicSongsTab">${TabSongs}</a>
<a href="musicalbums.html">${TabAlbums}</a>
<a href="musicalbumartists.html">${TabAlbumArtists}</a>
<a href="musicartists.html">${TabArtists}</a>
<a href="musicartists.html" class="musicArtistsTab">${TabArtists}</a>
<a href="musicgenres.html">${TabGenres}</a>
<a href="musicvideos.html" class="ui-btn-active">${TabMusicVideos}</a>
</div>
@ -112,7 +112,7 @@
</div>
<div class="itemTabs channelTabs" style="display: none;">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="channelslatest.html">${TabLatest}</a>
<a href="channelslatest.html" class="latestChannelItemsTab">${TabLatest}</a>
<a href="channels.html" class="ui-btn-active">${TabChannels}</a>
</div>
</div>

View file

@ -16,7 +16,7 @@
<div data-role="content" style="padding-top: 5px;padding-left:0!important;padding-right:0!important;">
<div class="tvGuide">
<div style="white-space: nowrap;position:fixed;top:98px;left:0;z-index:100; max-width: 100%;">
<div style="white-space: nowrap;position:fixed;top:98px;left:0;z-index:100; max-width: 100%;" class="tvGuideHeader">
<div class="channelTimeslotHeader">
<div class="timeslotHeaderInner">
<a href="#popupConfig" data-rel="popup" class="accentButton" style="display:block;padding-left:5px;"><i class="fa fa-calendar"></i><span class="currentDate"></span></a>

View file

@ -4,7 +4,7 @@
<title>${TitleSignIn}</title>
</head>
<body>
<div id="loginPage" data-role="page" class="page standalonePage">
<div id="loginPage" data-role="page" class="page standalonePage" data-theme="b">
<div data-role="content">
@ -29,27 +29,37 @@
</button>
</p>
<br />
<p>
<a href="forgotpassword.html">
${ButtonForgotPassword}
</a>
</p>
<br />
</form>
<div class="visualLoginForm" style="display: none; text-align: center;">
<br/>
<br />
<div id="divUsers" class="itemsContainer"></div>
<p class="localhostMessage" style="text-align: center; display: none;">${PasswordLocalhostMessage}</p>
<p>
<a href="#" class="lnkManualLogin" onclick="LoginPage.showManualForm($.mobile.activePage, true);">${ButtonManualLogin}</a>
<a href="forgotpassword.html" style="margin-left: 2em;">${ButtonForgotPassword}</a>
</p>
<br />
<div class="readOnlyContent" style="margin: 2em auto 0;">
<a href="#" onclick="LoginPage.showManualForm($.mobile.activePage, true);" data-role="button" data-icon="lock">${ButtonManualLogin}</a>
</div>
</div>
<div class="readOnlyContent" style="margin: 0 auto 1em;">
<a href="forgotpassword.html" data-role="button" data-icon="info">
${ButtonForgotPassword}
</a>
<p class="disclaimer" style="text-align: center; margin-top: 2em;"></p>
<div class="connectButtons" style="display:none;">
<br />
<a href="selectserver.html" data-role="button" data-icon="action">
${ButtonChangeServer}
</a>
</div>
</div>
</div>
<script type="text/javascript">

View file

@ -12,8 +12,8 @@
<a href="movietrailers.html">${TabTrailers}</a>
<a href="collections.html?context=movies">${TabCollections}</a>
<a href="#" class="ui-btn-active">${TabGenres}</a>
<a href="moviepeople.html">${TabPeople}</a>
<a href="moviestudios.html">${TabStudios}</a>
<a href="moviepeople.html" class="moviePeopleTab">${TabPeople}</a>
<a href="moviestudios.html" class="movieStudiosTab">${TabStudios}</a>
</div>
<div data-role="content">

View file

@ -13,7 +13,7 @@
<a href="collections.html?context=movies">${TabCollections}</a>
<a href="moviegenres.html">${TabGenres}</a>
<a href="#" class="ui-btn-active">${TabPeople}</a>
<a href="moviestudios.html">${TabStudios}</a>
<a href="moviestudios.html" class="movieStudiosTab">${TabStudios}</a>
</div>
<div class="alphabetPicker">

View file

@ -12,8 +12,8 @@
<a href="movietrailers.html">${TabTrailers}</a>
<a href="collections.html?context=movies">${TabCollections}</a>
<a href="moviegenres.html">${TabGenres}</a>
<a href="moviepeople.html">${TabPeople}</a>
<a href="moviestudios.html">${TabStudios}</a>
<a href="moviepeople.html" class="moviePeopleTab">${TabPeople}</a>
<a href="moviestudios.html" class="movieStudiosTab">${TabStudios}</a>
</div>
<div class="alphabetPicker">

View file

@ -12,8 +12,8 @@
<a href="movietrailers.html">${TabTrailers}</a>
<a href="collections.html?context=movies">${TabCollections}</a>
<a href="moviegenres.html">${TabGenres}</a>
<a href="moviepeople.html">${TabPeople}</a>
<a href="moviestudios.html">${TabStudios}</a>
<a href="moviepeople.html" class="moviePeopleTab">${TabPeople}</a>
<a href="moviestudios.html" class="movieStudiosTab">${TabStudios}</a>
</div>
<div data-role="content">

View file

@ -12,7 +12,7 @@
<a href="movietrailers.html">${TabTrailers}</a>
<a href="collections.html?context=movies">${TabCollections}</a>
<a href="moviegenres.html">${TabGenres}</a>
<a href="moviepeople.html">${TabPeople}</a>
<a href="moviepeople.html" class="moviePeopleTab">${TabPeople}</a>
<a href="#" class="ui-btn-active">${TabStudios}</a>
</div>

View file

@ -12,8 +12,8 @@
<a href="#" class="ui-btn-active">${TabTrailers}</a>
<a href="collections.html?context=movies">${TabCollections}</a>
<a href="moviegenres.html">${TabGenres}</a>
<a href="moviepeople.html">${TabPeople}</a>
<a href="moviestudios.html">${TabStudios}</a>
<a href="moviepeople.html" class="moviePeopleTab">${TabPeople}</a>
<a href="moviestudios.html" class="movieStudiosTab">${TabStudios}</a>
</div>
<div class="alphabetPicker">

View file

@ -7,10 +7,10 @@
<div id="musicAlbumArtistsPage" data-role="page" class="page libraryPage">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="musicrecommended.html">${TabSuggestions}</a>
<a href="songs.html">${TabSongs}</a>
<a href="songs.html" class="musicSongsTab">${TabSongs}</a>
<a href="musicalbums.html">${TabAlbums}</a>
<a href="#" class="ui-btn-active">${TabAlbumArtists}</a>
<a href="musicartists.html">${TabArtists}</a>
<a href="musicartists.html" class="musicArtistsTab">${TabArtists}</a>
<a href="musicgenres.html">${TabGenres}</a>
<a href="musicvideos.html">${TabMusicVideos}</a>
</div>

View file

@ -7,10 +7,10 @@
<div id="musicAlbumsPage" data-role="page" class="page libraryPage">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="musicrecommended.html">${TabSuggestions}</a>
<a href="songs.html">${TabSongs}</a>
<a href="songs.html" class="musicSongsTab">${TabSongs}</a>
<a href="#" class="ui-btn-active">${TabAlbums}</a>
<a href="musicalbumartists.html">${TabAlbumArtists}</a>
<a href="musicartists.html">${TabArtists}</a>
<a href="musicartists.html" class="musicArtistsTab">${TabArtists}</a>
<a href="musicgenres.html">${TabGenres}</a>
<a href="musicvideos.html">${TabMusicVideos}</a>
</div>

View file

@ -7,7 +7,7 @@
<div id="musicArtistsPage" data-role="page" class="page libraryPage">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="musicrecommended.html">${TabSuggestions}</a>
<a href="songs.html">${TabSongs}</a>
<a href="songs.html" class="musicSongsTab">${TabSongs}</a>
<a href="musicalbums.html">${TabAlbums}</a>
<a href="musicalbumartists.html">${TabAlbumArtists}</a>
<a href="#" class="ui-btn-active">${TabArtists}</a>

View file

@ -7,10 +7,10 @@
<div id="musicGenresPage" data-role="page" class="page libraryPage">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="musicrecommended.html">${TabSuggestions}</a>
<a href="songs.html">${TabSongs}</a>
<a href="songs.html" class="musicSongsTab">${TabSongs}</a>
<a href="musicalbums.html">${TabAlbums}</a>
<a href="musicalbumartists.html">${TabAlbumArtists}</a>
<a href="musicartists.html">${TabArtists}</a>
<a href="musicartists.html" class="musicArtistsTab">${TabArtists}</a>
<a href="#" class="ui-btn-active">${TabGenres}</a>
<a href="musicvideos.html">${TabMusicVideos}</a>
</div>

View file

@ -7,10 +7,10 @@
<div id="musicRecommendedPage" data-role="page" class="page libraryPage backdropPage" data-backdroptype="musicartist">
<div class="libraryViewNav scopedLibraryViewNav">
<a href="#" class="ui-btn-active">${TabSuggestions}</a>
<a href="songs.html">${TabSongs}</a>
<a href="songs.html" class="musicSongsTab">${TabSongs}</a>
<a href="musicalbums.html">${TabAlbums}</a>
<a href="musicalbumartists.html">${TabAlbumArtists}</a>
<a href="musicartists.html">${TabArtists}</a>
<a href="musicartists.html" class="musicArtistsTab">${TabArtists}</a>
<a href="musicgenres.html">${TabGenres}</a>
<a href="musicvideos.html">${TabMusicVideos}</a>
</div>

View file

@ -8,10 +8,10 @@
<div class="libraryViewNav scopedLibraryViewNav">
<a href="musicrecommended.html">${TabSuggestions}</a>
<a href="songs.html">${TabSongs}</a>
<a href="songs.html" class="musicSongsTab">${TabSongs}</a>
<a href="musicalbums.html">${TabAlbums}</a>
<a href="musicalbumartists.html">${TabAlbumArtists}</a>
<a href="musicartists.html">${TabArtists}</a>
<a href="musicartists.html" class="musicArtistsTab">${TabArtists}</a>
<a href="musicgenres.html">${TabGenres}</a>
<a href="#" class="ui-btn-active">${TabMusicVideos}</a>
</div>

View file

@ -10,7 +10,7 @@
<a href="#" class="ui-btn-active lnkDisplayPreferences">${TabDisplay}</a>
<a href="#" class="lnkLanguagePreferences">${TabPlayback}</a>
<a href="#" class="lnkMyProfile">${TabProfile}</a>
<a href="#" class="lnkWebClientPreferences">${TabWebClient}</a>
<a href="#" class="lnkWebClientPreferences">${TabAppSettings}</a>
</div>
<br />

View file

@ -10,7 +10,7 @@
<a href="#" class="lnkDisplayPreferences">${TabDisplay}</a>
<a href="#" class="ui-btn-active lnkLanguagePreferences">${TabPlayback}</a>
<a href="#" class="lnkMyProfile">${TabProfile}</a>
<a href="#" class="lnkWebClientPreferences">${TabWebClient}</a>
<a href="#" class="lnkWebClientPreferences">${TabAppSettings}</a>
</div>
<br />

View file

@ -10,7 +10,7 @@
<a href="#" class="lnkDisplayPreferences">${TabDisplay}</a>
<a href="#" class="lnkLanguagePreferences">${TabPlayback}</a>
<a href="#" class="lnkMyProfile">${TabProfile}</a>
<a href="#" class="ui-btn-active lnkWebClientPreferences">${TabWebClient}</a>
<a href="#" class="ui-btn-active lnkWebClientPreferences">${TabAppSettings}</a>
</div>
<br />

View file

@ -10,7 +10,7 @@
<a href="#" class="lnkDisplayPreferences">${TabDisplay}</a>
<a href="#" class="lnkLanguagePreferences">${TabPlayback}</a>
<a href="#" class="ui-btn-active lnkMyProfile">${TabProfile}</a>
<a href="#" class="lnkWebClientPreferences">${TabWebClient}</a>
<a href="#" class="lnkWebClientPreferences">${TabAppSettings}</a>
</div>
<br />

View file

@ -16,7 +16,7 @@
<div data-role="content" style="padding: 1em 0;">
<div style="text-align: center;">
<div class="tabNowPlaying tabContent">
<div class="tabNowPlaying tabContent" style="display:none;">
<div class="itemName" style="line-height: normal;"></div>
<div class="nowPlayingPageImage" style="margin: 1em 0;"></div>
<div>
@ -128,10 +128,7 @@
</div>
<div class="tabPlaylist tabContent" style="display: none;">
<div class="readOnlyContent" style="margin: 0 auto; padding: 0 1em;">
<div class="playlist detailTableContainer">
</div>
<div class="playlist itemsContainer" style="max-width:800px;margin: 0 auto;">
</div>
</div>

View file

@ -99,12 +99,6 @@
function enabled() {
// Gets real messy and jumps around the page when scrolling
// Can be reviewed later.
if ($.browser.msie) {
return false;
}
var userId = Dashboard.getCurrentUserId();
var val = store.getItem('enableBackdrops-' + userId);

View file

@ -28,6 +28,154 @@
}
function handleConnectionResult(page, result) {
switch (result.State) {
case MediaBrowser.ConnectionState.SignedIn:
{
var apiClient = result.ApiClient;
Dashboard.serverAddress(apiClient.serverAddress());
Dashboard.setCurrentUser(apiClient.getCurrentUserId(), apiClient.accessToken());
window.location = 'index.html';
}
break;
case MediaBrowser.ConnectionState.ServerSignIn:
{
window.location = 'login.html?serverid=' + result.Servers[0].Id;
}
break;
case MediaBrowser.ConnectionState.ServerSelection:
{
onLoggedIn();
}
break;
case MediaBrowser.ConnectionState.ConnectSignIn:
{
loadMode(page, 'welcome');
}
break;
case MediaBrowser.ConnectionState.Unavailable:
{
Dashboard.alert({
message: Globalize.translate("MessageUnableToConnectToServer"),
title: Globalize.translate("HeaderConnectionFailure")
});
}
break;
default:
break;
}
}
function loadAppConnection(page) {
Dashboard.showLoadingMsg();
ConnectionManager.connect().done(function (result) {
Dashboard.hideLoadingMsg();
handleConnectionResult(page, result);
});
}
function loadPage(page) {
var mode = getParameterByName('mode') || 'auto';
if (mode == 'auto') {
if (Dashboard.isRunningInCordova()) {
loadAppConnection(page);
return;
}
mode = 'connect';
}
loadMode(page, mode);
}
function loadMode(page, mode) {
$(document.body).prepend('<div class="backdropContainer" style="background-image:url(css/images/splash.jpg);top:0;"></div>');
$(page).addClass('lightBackdropPage backdropPage staticBackdropPage');
if (mode == 'welcome') {
$('.connectLoginForm', page).hide();
$('.welcomeContainer', page).show();
$('.manualServerForm', page).hide();
}
else if (mode == 'connect') {
$('.connectLoginForm', page).show();
$('.welcomeContainer', page).hide();
$('.manualServerForm', page).hide();
}
else if (mode == 'manualserver') {
$('.manualServerForm', page).show();
$('.connectLoginForm', page).hide();
$('.welcomeContainer', page).hide();
}
}
$(document).on('pageinit', "#connectLoginPage", function () {
var page = this;
$('.btnSkipConnect', page).on('click', function() {
Dashboard.navigate('connectlogin.html?mode=manualserver');
});
}).on('pageshow', "#connectLoginPage", function () {
var page = this;
loadPage(page);
var link = '<a href="http://emby.media" target="_blank">http://emby.media</a>';
$('.embyIntroDownloadMessage', page).html(Globalize.translate('EmbyIntroDownloadMessage', link));
if (Dashboard.isRunningInCordova()) {
$('.newUsers', page).hide();
$('.forgotPassword', page).hide();
$('.skip', page).show();
} else {
$('.skip', page).hide();
$('.newUsers', page).show();
$('.forgotPassword', page).show();
}
});
function submitManualServer(page) {
var host = $('#txtServerHost', page).val();
var port = $('#txtServerPort', page).val();
if (port) {
host += ':' + port;
}
Dashboard.showLoadingMsg();
ConnectionManager.connectToAddress(host).done(function (result) {
Dashboard.hideLoadingMsg();
handleConnectionResult(page, result);
}).fail(function () {
Dashboard.hideLoadingMsg();
handleConnectionResult(page, {
State: MediaBrowser.ConnectionState.Unavailable
});
});
}
function submit(page) {
var user = $('#txtManualName', page).val();
@ -45,6 +193,15 @@
submit(page);
return false;
},
onManualServerSubmit: function () {
var page = $(this).parents('.page');
submitManualServer(page);
return false;
}
};

View file

@ -591,7 +591,7 @@
var clientLowered = connection.Client.toLowerCase();
if (clientLowered == "dashboard") {
if (clientLowered == "dashboard" || clientLowered == "emby web client" || clientLowered == "emby mobile") {
var device = connection.DeviceName.toLowerCase();
@ -613,7 +613,7 @@
imgUrl = 'css/images/clients/html5.png';
}
return "<img src='" + imgUrl + "' alt='Dashboard' />";
return "<img src='" + imgUrl + "' alt='Emby Web Client' />";
}
if (clientLowered == "mb-classic") {

View file

@ -14,50 +14,61 @@
return deferred.promise();
}
function createMediaLinks(options) {
function getLibraryButtonsHtml(items) {
var html = "";
var items = options.items;
// "My Library" backgrounds
for (var i = 0, length = items.length; i < length; i++) {
var item = items[i];
var icon;
var backgroundColor = 'rgba(82, 181, 75, 0.7)';
switch (item.CollectionType) {
case "movies":
icon = "fa-film";
backgroundColor = 'rgba(176, 94, 81, 0.7)';
break;
case "music":
icon = "fa-music";
backgroundColor = 'rgba(217, 145, 67, 0.7)';
break;
case "photos":
icon = "fa-photo";
backgroundColor = 'rgba(127, 0, 0, 0.7)';
break;
case "livetv":
icon = "fa-video-camera";
backgroundColor = 'rgba(255, 233, 127, 0.7)';
break;
case "tvshows":
icon = "fa-video-camera";
backgroundColor = 'rgba(77, 88, 164, 0.7)';
break;
case "games":
icon = "fa-gamepad";
backgroundColor = 'rgba(183, 202, 72, 0.7)';
break;
case "trailers":
icon = "fa-film";
backgroundColor = 'rgba(176, 94, 81, 0.7)';
break;
case "homevideos":
icon = "fa-video-camera";
backgroundColor = 'rgba(110, 52, 32, 0.7)';
break;
case "musicvideos":
icon = "fa-video-camera";
backgroundColor = 'rgba(143, 54, 168, 0.7)';
break;
case "books":
icon = "fa-book";
break;
case "channels":
icon = "fa-globe";
backgroundColor = 'rgba(51, 136, 204, 0.7)';
break;
case "playlists":
icon = "fa-list";
@ -67,25 +78,22 @@
break;
}
var cssClass = "posterItem";
cssClass += ' ' + options.shape + 'PosterItem';
var cssClass = 'card smallBackdropCard buttonCard';
if (item.CollectionType) {
cssClass += ' ' + item.CollectionType + 'PosterItem';
cssClass += ' ' + item.CollectionType + 'buttonCard';
}
var href = item.url || LibraryBrowser.getHref(item, options.context);
var href = item.url || LibraryBrowser.getHref(item);
html += '<a data-itemid="' + item.Id + '" class="' + cssClass + '" href="' + href + '">';
html += '<div class="cardBox" style="background-color:' + backgroundColor + ';margin:4px;border-radius:4px;">';
var imageCssClass = '';
html += '<div class="posterItemImage ' + imageCssClass + '">';
html += '</div>';
html += "<div class='posterItemDefaultText posterItemText'>";
html += "<div class='cardText' style='padding:7px 10px;color:#fff;'>";
html += '<i class="fa ' + icon + '"></i>';
html += '<span>' + item.Name + '</span>';
html += '<span style="margin-left:.7em;">' + item.Name + '</span>';
html += "</div>";
html += "</div>";
html += "</a>";
@ -104,13 +112,7 @@
html += '<h1 class="listHeader">' + Globalize.translate('HeaderMyMedia') + '</h1>';
}
html += '<div>';
html += createMediaLinks({
items: items,
shape: 'myLibrary',
showTitle: true,
centerText: true
});
html += getLibraryButtonsHtml(items);
html += '</div>';
$(elem).html(html);
@ -197,16 +199,16 @@
function loadLibraryTiles(elem, user, shape, index, autoHideOnMobile, showTitles) {
if (autoHideOnMobile) {
$(elem).addClass('hiddenSectionOnMobile');
} else {
$(elem).removeClass('hiddenSectionOnMobile');
}
return getUserViews(user.Id).done(function (items) {
var html = '';
if (autoHideOnMobile) {
html += '<div class="hiddenSectionOnMobile">';
} else {
html += '<div>';
}
if (items.length) {
var cssClass = index !== 0 ? 'listHeader' : 'listHeader firstListHeader';
@ -232,6 +234,13 @@
html += '</div>';
}
html += '</div>';
if (autoHideOnMobile) {
html += '<div class="hiddenSectionOnNonMobile" style="margin-top:1em;">';
html += getLibraryButtonsHtml(items);
html += '</div>';
}
$(elem).html(html).lazyChildren().createCardMenus();

View file

@ -1177,6 +1177,8 @@
var chapters = item.Chapters || [];
var maxWwidth = LibraryBrowser.getPosterViewInfo().thumbWidth;
for (var i = 0, length = chapters.length; i < length; i++) {
if (limit && i >= limit) {
@ -1198,7 +1200,7 @@
if (chapter.ImageTag) {
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
maxWidth: 210,
maxWidth: maxWwidth,
tag: chapter.ImageTag,
type: "Chapter",
index: i
@ -1397,6 +1399,8 @@
var html = '';
var maxWwidth = LibraryBrowser.getPosterViewInfo().thumbWidth;
for (var i = 0, length = items.length; i < length; i++) {
if (limit && i >= limit) {
@ -1423,7 +1427,7 @@
if (imageTags.Primary) {
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
maxWidth: 210,
maxWidth: maxWwidth,
tag: imageTags.Primary,
type: "primary"
});

View file

@ -472,7 +472,12 @@
}
if (item.CollectionType == 'channels') {
if (AppInfo.enableLatestChannelItems) {
return 'channelslatest.html';
} else {
return 'channels.html';
}
}
if (context != 'folders') {
@ -945,6 +950,117 @@
return itemCommands;
},
screenWidth: function () {
var screenWidth = $(window).width();
return screenWidth;
},
getPostersPerRow: function (screenWidth) {
function getValue(shape) {
var div = $('<div class="card ' + shape + 'Card"><div class="cardBox"><div class="cardImage"></div></div></div>').appendTo(document.body);
var width = screenWidth / $('.cardImage', div).innerWidth();
div.remove();
return width;
}
var info = {};
info.square = getValue('square');
info.smallSquare = getValue('smallSquare');
info.thumb = getValue('backdrop');
info.portrait = getValue('portrait');
info.smallPortrait = getValue('smallPortrait');
info.banner = getValue('banner');
info.smallThumb = getValue('smallBackdrop');
return info;
},
posterSizes: [],
getPosterViewInfo: function () {
var screenWidth = LibraryBrowser.screenWidth();
var cachedResults = LibraryBrowser.posterSizes;
for (var i = 0, length = cachedResults.length; i < length; i++) {
if (cachedResults[i].screenWidth == screenWidth) {
return cachedResults[i];
}
}
var result = LibraryBrowser.getPosterViewInfoInternal(screenWidth);
cachedResults.push(result);
return result;
},
getPosterViewInfoInternal: function (screenWidth) {
var imagesPerRow = LibraryBrowser.getPostersPerRow(screenWidth);
if (AppInfo.hasLowImageBandwidth) {
screenWidth *= .95;
} else {
screenWidth *= 1.25;
}
var thumbWidth = screenWidth / imagesPerRow.thumb;
var smallThumbWidth = screenWidth / imagesPerRow.smallThumb;
var posterWidth = screenWidth / imagesPerRow.portrait;
var smallPosterWidth = screenWidth / imagesPerRow.smallPortrait;
var squareSize = screenWidth / imagesPerRow.square;
var smallSquareSize = screenWidth / imagesPerRow.smallSquare;
var bannerWidth = screenWidth / imagesPerRow.banner;
if (!AppInfo.isTouchPreferred) {
var roundTo = 100;
thumbWidth = Math.round(thumbWidth / roundTo) * roundTo;
smallThumbWidth = Math.round(smallThumbWidth / roundTo) * roundTo;
posterWidth = Math.round(posterWidth / roundTo) * roundTo;
smallPosterWidth = Math.round(smallPosterWidth / roundTo) * roundTo;
squareSize = Math.round(squareSize / roundTo) * roundTo;
bannerWidth = Math.round(bannerWidth / roundTo) * roundTo;
}
var defaultPortait = 'portrait';
var defaultThumb = 'backdrop';
var defaultSquare = 'square';
if (AppInfo.hasLowImageBandwidth) {
defaultThumb = 'smallBackdrop';
defaultSquare = 'smallSquare';
defaultPortait = 'smallPortrait';
}
return {
defaultThumb: defaultThumb,
smallThumbWidth: Math.round(smallThumbWidth),
thumbWidth: Math.round(thumbWidth),
defaultPortait: defaultPortait,
posterWidth: Math.round(posterWidth),
smallPosterWidth: Math.round(smallPosterWidth),
defaultSquare: defaultSquare,
squareSize: Math.round(squareSize),
smallSquareSize: Math.round(smallSquareSize),
bannerWidth: Math.round(bannerWidth),
screenWidth: screenWidth
};
},
getPosterViewHtml: function (options) {
var items = options.items;
@ -978,6 +1094,28 @@
}
}
var posterInfo = LibraryBrowser.getPosterViewInfo();
var thumbWidth = posterInfo.thumbWidth;
var posterWidth = posterInfo.posterWidth;
var squareSize = posterInfo.squareSize;
var bannerWidth = posterInfo.bannerWidth;
if (options.shape == 'backdrop' && posterInfo.defaultThumb == 'smallBackdrop') {
options.shape = 'smallBackdrop';
thumbWidth = posterInfo.smallThumbWidth;
}
else if (options.shape == 'portrait' && posterInfo.defaultPortait == 'smallPortrait') {
options.shape = 'smallPortrait';
posterWidth = posterInfo.smallPosterWidth;
}
else if (options.shape == 'square' && posterInfo.defaultSquare == 'smallSquare') {
options.shape = 'smallSquare';
squareSize = posterInfo.smallSquareSize;
}
for (var i = 0, length = items.length; i < length; i++) {
var item = items[i];
@ -1044,13 +1182,12 @@
var forceName = false;
var downloadHeight = 576;
var enableImageEnhancers = options.enableImageEnhancers !== false;
if (options.autoThumb && item.ImageTags && item.ImageTags.Primary && item.PrimaryImageAspectRatio && item.PrimaryImageAspectRatio >= 1.5) {
height = 400;
width = primaryImageAspectRatio ? Math.round(height * primaryImageAspectRatio) : null;
width = posterWidth;
height = primaryImageAspectRatio ? Math.round(posterWidth / primaryImageAspectRatio) : null;
imgUrl = ApiClient.getImageUrl(item.Id, {
type: "Primary",
@ -1064,7 +1201,7 @@
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
type: "Thumb",
maxWidth: downloadHeight,
maxWidth: thumbWidth,
tag: item.ImageTags.Thumb,
enableImageEnhancers: enableImageEnhancers
});
@ -1073,7 +1210,7 @@
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
type: "Backdrop",
maxWidth: downloadHeight,
maxWidth: thumbWidth,
tag: item.BackdropImageTags[0],
enableImageEnhancers: enableImageEnhancers
});
@ -1082,7 +1219,7 @@
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
type: "Thumb",
maxWidth: downloadHeight,
maxWidth: thumbWidth,
tag: item.ImageTags.Thumb,
enableImageEnhancers: enableImageEnhancers
});
@ -1091,7 +1228,7 @@
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
type: "Banner",
maxWidth: 700,
maxWidth: bannerWidth,
tag: item.ImageTags.Banner,
enableImageEnhancers: enableImageEnhancers
});
@ -1100,7 +1237,7 @@
imgUrl = ApiClient.getScaledImageUrl(item.SeriesId, {
type: "Thumb",
maxWidth: downloadHeight,
maxWidth: thumbWidth,
tag: item.SeriesThumbImageTag,
enableImageEnhancers: enableImageEnhancers
});
@ -1109,7 +1246,7 @@
imgUrl = ApiClient.getThumbImageUrl(item.ParentThumbItemId, {
type: "Thumb",
maxWidth: downloadHeight,
maxWidth: thumbWidth,
enableImageEnhancers: enableImageEnhancers
});
@ -1117,7 +1254,7 @@
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
type: "Backdrop",
maxWidth: downloadHeight,
maxWidth: thumbWidth,
tag: item.BackdropImageTags[0],
enableImageEnhancers: enableImageEnhancers
});
@ -1126,8 +1263,8 @@
} else if (item.ImageTags && item.ImageTags.Primary) {
height = 400;
width = primaryImageAspectRatio ? Math.round(height * primaryImageAspectRatio) : null;
width = posterWidth;
height = primaryImageAspectRatio ? Math.round(posterWidth / primaryImageAspectRatio) : null;
imgUrl = ApiClient.getImageUrl(item.Id, {
type: "Primary",
@ -1140,18 +1277,16 @@
}
else if (item.ParentPrimaryImageTag) {
height = 400;
imgUrl = ApiClient.getImageUrl(item.ParentPrimaryImageItemId, {
type: "Primary",
height: height,
width: posterWidth,
tag: item.ParentPrimaryImageTag,
enableImageEnhancers: enableImageEnhancers
});
}
else if (item.AlbumId && item.AlbumPrimaryImageTag) {
height = 220;
height = squareSize;
width = primaryImageAspectRatio ? Math.round(height * primaryImageAspectRatio) : null;
imgUrl = ApiClient.getScaledImageUrl(item.AlbumId, {
@ -1167,7 +1302,7 @@
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
type: "Thumb",
maxWidth: downloadHeight,
maxWidth: thumbWidth,
tag: item.ImageTags.Thumb,
enableImageEnhancers: enableImageEnhancers
});
@ -1177,7 +1312,7 @@
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
type: "Backdrop",
maxWidth: downloadHeight,
maxWidth: thumbWidth,
tag: item.BackdropImageTags[0],
enableImageEnhancers: enableImageEnhancers
});
@ -1186,7 +1321,7 @@
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
type: "Thumb",
maxWidth: downloadHeight,
maxWidth: thumbWidth,
tag: item.ImageTags.Thumb,
enableImageEnhancers: enableImageEnhancers
});
@ -1195,7 +1330,7 @@
imgUrl = ApiClient.getScaledImageUrl(item.SeriesId, {
type: "Thumb",
maxWidth: downloadHeight,
maxWidth: thumbWidth,
tag: item.SeriesThumbImageTag,
enableImageEnhancers: enableImageEnhancers
});
@ -1204,7 +1339,7 @@
imgUrl = ApiClient.getThumbImageUrl(item, {
type: "Thumb",
maxWidth: downloadHeight,
maxWidth: thumbWidth,
enableImageEnhancers: enableImageEnhancers
});

View file

@ -887,6 +887,14 @@
itemsContainer.trigger('playallfromhere', [index]);
}
else if (action == 'setplaylistindex') {
index = elemWithAttributes.getAttribute('data-index');
closeContextMenu();
MediaController.currentPlaylistIndex(index);
}
else if (action == 'photoslideshow') {
if (!$(elem).hasClass('card')) {
@ -904,6 +912,17 @@
return false;
}
function resetCardImage() {
this.style.backgroundImage = "url('css/images/empty.png')";
}
function resetImages(page) {
$('cardImage', page).remove();
//$('.cardImage', page).each(resetCardImage);
}
$(document).on('pageinit', ".libraryPage", function () {
var page = this;
@ -956,6 +975,11 @@
hideSelections(page);
$('.viewTabButton:first', page).trigger('click');
}).on('pagebeforehide', ".libraryPage", function () {
var page = this;
resetImages(page);
});
function renderUserDataChanges(card, userData) {

View file

@ -1,10 +1,10 @@
(function (window, document, $) {
(function (window, document, $, devicePixelRatio) {
function renderHeader(user) {
var html = '<div class="viewMenuBar ui-bar-b">';
if ($.browser.safari && $.browser.mobile && window.navigator.standalone) {
if (($.browser.safari && window.navigator.standalone) || Dashboard.isRunningInCordova()) {
html += '<a data-rel="back" data-role="none" href="#" class="headerButton headerButtonLeft headerBackButton"><div class="fa fa-arrow-circle-o-left"></div></a>';
}
@ -41,6 +41,8 @@
}
if (user.name) {
html += '<a class="headerButton headerButtonRight headerUserButton" href="#" onclick="Dashboard.showUserFlyout(this);">';
if (user.imageUrl) {
@ -59,6 +61,7 @@
}
html += '</a>';
}
if (user.canManageServer) {
html += '<a href="dashboard.html" class="headerButton headerButtonRight dashboardEntryHeaderButton"><div class="fa fa-cog"></div></a>';
@ -77,12 +80,12 @@
function bindMenuEvents() {
if ($.browser.mobile) {
if (AppInfo.isTouchPreferred) {
$('.libraryMenuButton').on('mousedown', function () {
$('.libraryMenuButton').on('click', function () {
showLibraryMenu(false);
});
$('.dashboardMenuButton').on('mousedown', function () {
$('.dashboardMenuButton').on('click', function () {
showDashboardMenu(false);
});
@ -90,6 +93,10 @@
$('.libraryMenuButton').createHoverTouch().on('hovertouch', showLibraryMenu);
$('.dashboardMenuButton').createHoverTouch().on('hovertouch', showDashboardMenu);
}
// grab an element
var viewMenuBar = document.getElementsByClassName("viewMenuBar")[0];
initHeadRoom(viewMenuBar);
}
function getItemHref(item, context) {
@ -253,32 +260,43 @@
html += '<div class="sidebarLinks librarySidebarLinks">';
//var userHref = user.localUser && user.localUser.Policy.EnableUserPreferenceAccess ?
// 'mypreferencesdisplay.html?userId=' + user.localUser.Id :
// (user.localUser ? 'index.html' : '#');
var showUserAtTop = AppInfo.isTouchPreferred;
//var paddingLeft = user.imageUrl ? 'padding-left:.7em;' : '';
//html += '<a style="margin-top:0;' + paddingLeft + 'display:block;color:#fff;text-decoration:none;font-size:16px;font-weight:400!important;background: #000;" href="' + userHref + '">';
if (showUserAtTop) {
//var imgWidth = 44;
var userHref = user.localUser && user.localUser.Policy.EnableUserPreferenceAccess ?
'mypreferencesdisplay.html?userId=' + user.localUser.Id :
(user.localUser ? 'index.html' : '#');
//if (user.imageUrl) {
// var url = user.imageUrl;
var paddingLeft = user.imageUrl ? 'padding-left:.7em;' : '';
html += '<a style="margin-top:0;' + paddingLeft + 'display:block;color:#fff;text-decoration:none;font-size:16px;font-weight:400!important;background: #000;" href="' + userHref + '">';
// if (user.supportsImageParams) {
// url += "&width=" + (imgWidth * Math.max(devicePixelRatio || 1, 2));
// }
var imgWidth = 44;
// html += '<img style="max-width:' + imgWidth + 'px;vertical-align:middle;margin-right:.8em;border-radius: 50px;" src="' + url + '" />';
//} else {
// html += '<span class="fa fa-user sidebarLinkIcon"></span>';
//}
if (user.imageUrl) {
var url = user.imageUrl;
//html += user.name;
//html += '</a>';
if (user.supportsImageParams) {
url += "&width=" + (imgWidth * Math.max(devicePixelRatio || 1, 2));
}
html += '<img style="max-width:' + imgWidth + 'px;vertical-align:middle;margin-right:.8em;border-radius: 50px;" src="' + url + '" />';
} else {
html += '<span class="fa fa-user sidebarLinkIcon"></span>';
}
html += user.name;
html += '</a>';
html += '<div class="libraryMenuDivider" style="margin-top:0;"></div>';
}
var homeHref = ConnectionManager.currentApiClient() ? 'index.html' : 'selectserver.html';
if (showUserAtTop) {
html += '<a class="lnkMediaFolder sidebarLink" href="' + homeHref + '"><span class="fa fa-home sidebarLinkIcon"></span><span>' + Globalize.translate('ButtonHome') + '</span></a>';
} else {
html += '<a class="lnkMediaFolder sidebarLink" style="margin-top:.5em;padding-left:1em;display:block;color:#fff;text-decoration:none;" href="' + homeHref + '">';
html += '<img style="max-width:36px;vertical-align:middle;margin-right:1em;" src="css/images/mblogoicon.png" />';
@ -286,7 +304,8 @@
html += Globalize.translate('ButtonHome');
html += '</a>';
html += '<div class="libraryMenuDivider" style="margin-top:0;"></div>';
html += '<div class="libraryMenuDivider"></div>';
}
html += getViewsHtml();
html += '</div>';
@ -522,7 +541,25 @@
// Scroll back up so in case vertical scroll was messed with
$(document).scrollTop(0);
}
$('.libraryViewNav', page).each(function () {
initHeadRoom(this);
});
});
function initHeadRoom(elem) {
if (!AppInfo.enableHeadRoom) {
return;
}
// construct an instance of Headroom, passing the element
var headroom = new Headroom(elem);
// initialise
headroom.init();
}
function initializeApiClient(apiClient) {
@ -542,7 +579,7 @@
});
})(window, document, jQuery);
})(window, document, jQuery, window.devicePixelRatio);
$.fn.createHoverTouch = function () {

View file

@ -419,6 +419,17 @@
});
}
if (AppInfo.enableHeadRoom) {
$('.tvGuideHeader', page).each(function () {
// construct an instance of Headroom, passing the element
var headroom = new Headroom(this);
// initialise
headroom.init();
});
}
}).on('pageshow', "#liveTvGuidePage", function () {
var page = this;

View file

@ -1,13 +1,30 @@
var LoginPage = {
getApiClient: function () {
var serverId = getParameterByName('serverid');
var deferred = DeferredBuilder.Deferred();
if (serverId) {
deferred.resolveWith(null, [ConnectionManager.getOrCreateApiClient(serverId)]);
} else {
deferred.resolveWith(null, [ApiClient]);
}
return deferred.promise();
},
onPageShow: function () {
Dashboard.showLoadingMsg();
var page = this;
LoginPage.getApiClient().done(function (apiClient) {
// Show all users on localhost
var promise1 = ApiClient.getPublicUsers();
var promise1 = apiClient.getPublicUsers();
promise1.done(function (users) {
@ -18,17 +35,25 @@
LoginPage.showManualForm(page, false, false);
} else {
LoginPage.showVisualForm(page);
LoginPage.loadUserList(users);
LoginPage.loadUserList(page, apiClient, users);
}
Dashboard.hideLoadingMsg();
});
ApiClient.getJSON(ApiClient.getUrl('Branding/Configuration')).done(function (options) {
apiClient.getJSON(apiClient.getUrl('Branding/Configuration')).done(function (options) {
$('.disclaimer', page).html(options.LoginDisclaimer || '');
});
});
if (Dashboard.isConnectMode()) {
$('.connectButtons', page).show();
} else {
$('.connectButtons', page).hide();
}
},
cancelLogin: function () {
@ -67,30 +92,24 @@
return "Last seen " + humane_date(lastActivityDate);
},
getImagePath: function (user) {
if (!user.PrimaryImageTag) {
return "css/images/logindefault.png";
}
return ApiClient.getUserImageUrl(user.Id, {
width: 240,
tag: user.PrimaryImageTag,
type: "Primary"
});
},
authenticateUserByName: function (username, password) {
authenticateUserByName: function (apiClient, username, password) {
Dashboard.showLoadingMsg();
ApiClient.authenticateUserByName(username, password).done(function (result) {
apiClient.authenticateUserByName(username, password).done(function (result) {
var user = result.User;
var serverId = getParameterByName('serverid');
// In a multi-server supported app, set the server address
if (serverId) {
Dashboard.serverAddress(apiClient.serverAddress());
}
Dashboard.setCurrentUser(user.Id, result.AccessToken);
if (user.Policy.IsAdministrator) {
if (user.Policy.IsAdministrator && !serverId) {
window.location = "dashboard.html?u=" + user.Id + '&t=' + result.AccessToken;
} else {
window.location = "index.html?u=" + user.Id + '&t=' + result.AccessToken;
@ -111,11 +130,9 @@
},
loadUserList: function (users) {
loadUserList: function (page, apiClient, users) {
var html = "";
var page = $.mobile.activePage;
for (var i = 0, length = users.length; i < length; i++) {
var user = users[i];
@ -130,7 +147,7 @@
if (user.PrimaryImageTag) {
imgUrl = ApiClient.getUserImageUrl(user.Id, {
imgUrl = apiClient.getUserImageUrl(user.Id, {
width: 300,
tag: user.PrimaryImageTag,
type: "Primary"
@ -172,11 +189,15 @@
$('a', elem).on('click', function () {
var id = this.getAttribute('data-userid');
var name = this.getAttribute('data-username');
var haspw = this.getAttribute('data-haspw');
if (haspw == 'false') {
LoginPage.authenticateUserByName(name, '');
if (id == 'manual') {
LoginPage.showManualForm(page, true);
}
else if (haspw == 'false') {
LoginPage.authenticateUserByName(apiClient, name, '');
} else {
$('#txtManualName', page).val(name);
$('#txtManualPassword', '#loginPage').val('');
@ -187,7 +208,9 @@
onManualSubmit: function () {
LoginPage.authenticateUserByName($('#txtManualName', '#loginPage').val(), $('#txtManualPassword', '#loginPage').val());
LoginPage.getApiClient().done(function (apiClient) {
LoginPage.authenticateUserByName(apiClient, $('#txtManualName', '#loginPage').val(), $('#txtManualPassword', '#loginPage').val());
});
// Disable default form submission
return false;

View file

@ -90,8 +90,9 @@
function onPopupOpen(elem) {
elem.popup("open").parents(".ui-popup-container").css("margin-top", 30);
// TODO: With iOS 8 this might not be required anymore
if ($.browser.safari) {
$('.itemVideo').css('visibility', 'hidden');
//$('.itemVideo').css('visibility', 'hidden');
}
}
@ -910,6 +911,10 @@
self.canAutoPlayVideo = function () {
if (Dashboard.isRunningInCordova()) {
return true;
}
if ($.browser.msie || $.browser.mobile) {
return false;
}
@ -917,6 +922,11 @@
return true;
};
self.enableCustomVideoControls = function () {
return self.canAutoPlayVideo() && !$.browser.mobile;
};
// Replace audio version
self.cleanup = function (playerElement) {
@ -996,7 +1006,7 @@
// Create video player
var html = '';
var requiresNativeControls = !self.canAutoPlayVideo();
var requiresNativeControls = !self.enableCustomVideoControls();
// Can't autoplay in these browsers so we need to use the full controls
if (requiresNativeControls) {
@ -1202,7 +1212,7 @@
self.updatePlaylistUi = function () {
var index = self.currentPlaylistIndex(null),
length = self.playlist.length,
requiresNativeControls = !self.canAutoPlayVideo(),
requiresNativeControls = !self.enableCustomVideoControls(),
controls = $(requiresNativeControls ? '.videoAdvancedControls' : '.videoControls');
if (length < 2) {

View file

@ -26,7 +26,7 @@
self.getTargets = function () {
var targets = [{
name: 'My Browser',
name: Globalize.translate('MyDevice'),
id: ConnectionManager.deviceId(),
playerName: self.name,
playableMediaTypes: ['Audio', 'Video'],
@ -126,7 +126,7 @@
profile.DirectPlayProfiles = [];
profile.DirectPlayProfiles.push({
Container: 'mp4',
Container: 'mp4,m4v',
Type: 'Video',
VideoCodec: 'h264',
AudioCodec: 'aac,mp3'
@ -134,11 +134,18 @@
if ($.browser.chrome) {
profile.DirectPlayProfiles.push({
Container: 'mkv,m4v',
Container: 'mkv',
Type: 'Video',
VideoCodec: 'h264',
AudioCodec: 'aac,mp3'
});
// TODO: Test this
//profile.DirectPlayProfiles.push({
// Container: 'mov',
// Type: 'Video',
// VideoCodec: 'h264',
// AudioCodec: 'aac,mp3'
//});
}
profile.DirectPlayProfiles.push({
@ -208,7 +215,6 @@
profile.ContainerProfiles = [];
var audioConditions = [];
var videoAudioAacConditions = [];
var videoAudioMp3Conditions = [];
var maxAudioChannels = $.browser.msie || $.browser.safari ?
@ -222,7 +228,6 @@
};
audioConditions.push(channelCondition);
videoAudioAacConditions.push(channelCondition);
videoAudioMp3Conditions.push(channelCondition);
profile.CodecProfiles = [];
@ -239,22 +244,32 @@
});
}
videoAudioAacConditions.push({
Condition: 'NotEquals',
Property: 'AudioProfile',
Value: 'LC'
});
videoAudioAacConditions.push({
profile.CodecProfiles.push({
Type: 'VideoAudio',
Codec: 'aac',
Container: 'mkv,mov',
Conditions: [
channelCondition,
{
Condition: 'NotEquals',
Property: 'AudioProfile',
Value: 'HE-AAC'
},
{
Condition: 'NotEquals',
Property: 'AudioProfile',
Value: 'LC'
}
]
});
profile.CodecProfiles.push({
Type: 'VideoAudio',
Codec: 'aac',
Conditions: videoAudioAacConditions
Container: 'mp4,m4v',
Conditions: [
channelCondition
]
});
profile.CodecProfiles.push({
@ -311,6 +326,26 @@
});
}
profile.ResponseProfiles = [];
profile.ResponseProfiles.push({
Type: 'Video',
Container: 'm4v',
MimeType: 'video/mp4'
});
//profile.ResponseProfiles.push({
// Type: 'Video',
// Container: 'mkv',
// MimeType: 'video/webm'
//});
profile.ResponseProfiles.push({
Type: 'Video',
Container: 'mov',
MimeType: 'video/webm'
});
return profile;
};
@ -825,7 +860,10 @@
var deviceProfile = self.getDeviceProfile();
Dashboard.showLoadingMsg();
if (item.MediaType === "Video") {
Dashboard.showModalLoadingMsg();
}
getPlaybackInfo(item.Id, deviceProfile, startPosition).done(function (playbackInfoResult) {
@ -848,7 +886,7 @@
playInternalPostMediaSourceSelection(item, mediaSource, startPosition, callback);
}
} else {
Dashboard.hideLoadingMsg();
Dashboard.hideModalLoadingMsg();
showPlaybackInfoErrorMessage('NoCompatibleStream');
}
}
@ -858,7 +896,7 @@
function playInternalPostMediaSourceSelection(item, mediaSource, startPosition, callback) {
Dashboard.hideLoadingMsg();
Dashboard.hideModalLoadingMsg();
self.currentMediaSource = mediaSource;
self.currentItem = item;
@ -1589,6 +1627,10 @@
self.canAutoPlayAudio = function () {
if (Dashboard.isRunningInCordova()) {
return true;
}
if ($.browser.android || ($.browser.webkit && !$.browser.chrome)) {
return false;
}

View file

@ -2,10 +2,14 @@
function loadLatest(page, userId, parentId) {
var limit = AppInfo.hasLowImageBandwidth ?
15 :
18;
var options = {
IncludeItemTypes: "Movie",
Limit: 18,
Limit: limit,
Fields: "PrimaryImageAspectRatio,MediaSourceCount,SyncInfo",
ParentId: parentId,
ImageTypeLimit: 1,
@ -24,6 +28,46 @@
});
}
function loadResume(page, userId, parentId) {
var screenWidth = $(window).width();
var options = {
SortBy: "DatePlayed",
SortOrder: "Descending",
IncludeItemTypes: "Movie",
Filters: "IsResumable",
Limit: screenWidth >= 1920 ? 6 : (screenWidth >= 1600 ? 4 : 3),
Recursive: true,
Fields: "PrimaryImageAspectRatio,MediaSourceCount,SyncInfo",
CollapseBoxSetItems: false,
ParentId: parentId,
ImageTypeLimit: 1,
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
};
ApiClient.getItems(userId, options).done(function (result) {
if (result.Items.length) {
$('#resumableSection', page).show();
} else {
$('#resumableSection', page).hide();
}
$('#resumableItems', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items,
preferThumb: true,
shape: 'backdrop',
overlayText: true,
showTitle: true,
lazy: true
})).lazyChildren().trigger('create');
});
}
function getRecommendationHtml(recommendation) {
var html = '';
@ -62,58 +106,10 @@
return html;
}
$(document).on('pageinit', "#moviesRecommendedPage", function () {
var page = this;
$('.recommendations', page).createCardMenus();
}).on('pagebeforeshow', "#moviesRecommendedPage", function () {
var parentId = LibraryMenu.getTopParentId();
function loadSuggestions(page, userId, parentId) {
var screenWidth = $(window).width();
var page = this;
var userId = Dashboard.getCurrentUserId();
var options = {
SortBy: "DatePlayed",
SortOrder: "Descending",
IncludeItemTypes: "Movie",
Filters: "IsResumable",
Limit: screenWidth >= 1920 ? 6 : (screenWidth >= 1600 ? 4 : 3),
Recursive: true,
Fields: "PrimaryImageAspectRatio,MediaSourceCount,SyncInfo",
CollapseBoxSetItems: false,
ParentId: parentId,
ImageTypeLimit: 1,
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
};
ApiClient.getItems(userId, options).done(function (result) {
if (result.Items.length) {
$('#resumableSection', page).show();
} else {
$('#resumableSection', page).hide();
}
$('#resumableItems', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items,
preferThumb: true,
shape: 'backdrop',
overlayText: true,
showTitle: true,
lazy: true
})).lazyChildren().trigger('create');
});
loadLatest(page, userId, parentId);
var url = ApiClient.getUrl("Movies/Recommendations", {
userId: userId,
@ -138,6 +134,27 @@
$('.noItemsMessage', page).hide();
$('.recommendations', page).html(html).lazyChildren();
});
}
$(document).on('pageinit', "#moviesRecommendedPage", function () {
var page = this;
$('.recommendations', page).createCardMenus();
}).on('pagebeforeshow', "#moviesRecommendedPage", function () {
var parentId = LibraryMenu.getTopParentId();
var page = this;
var userId = Dashboard.getCurrentUserId();
loadResume(page, userId, parentId);
loadLatest(page, userId, parentId);
if (!AppInfo.hasLowImageBandwidth) {
loadSuggestions(page, userId, parentId);
}
});

View file

@ -99,12 +99,7 @@
});
// See backrops.js for comments on this
if ($.browser.msie) {
$('.fldEnableBackdrops', page).hide();
} else {
$('.fldEnableBackdrops', page).show();
}
});
window.WebClientPreferencesPage = {

View file

@ -21,18 +21,21 @@
var html = '';
html += '<div class="nowPlayingBar" style="display:none;">';
html += '<div style="display:inline-block;width:12px;"></div>';
html += '<a class="mediaButton remoteControlButton" title="' + Globalize.translate('ButtonRemoteControl') + '" href="nowplaying.html" data-transition="slideup" data-role="button" data-icon="remote" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonRemoteControl') + '</a>';
html += '<div class="nowPlayingImage"></div>';
html += '<div class="nowPlayingText"></div>';
html += '<a id="playlistButton" class="mediaButton playlistButton" href="nowplaying.html?tab=Playlist" data-transition="slideup" data-role="button" data-icon="bullets" data-iconpos="notext" data-inline="true" title="' + Globalize.translate('ButtonPlaylist') + '">' + Globalize.translate('ButtonPlaylist') + '</a>';
html += '<button id="previousTrackButton" class="mediaButton previousTrackButton" title="' + Globalize.translate('ButtonPreviousTrack') + '" type="button" data-icon="previous-track" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonPreviousTrack') + '</button>';
html += '<a class="mediaButton remoteControlButton imageButton" href="nowplaying.html" data-transition="slideup" title="' + Globalize.translate('ButtonRemoteControl') + '"><i class="fa fa-tablet"></i></a>';
html += '<a class="mediaButton playlistButton imageButton" href="nowplaying.html?tab=Playlist" data-transition="slideup" title="' + Globalize.translate('ButtonPlaylist') + '"><i class="fa fa-list"></i></a>';
html += '<button id="playButton" class="mediaButton unpauseButton" title="' + Globalize.translate('ButtonPlay') + '" type="button" data-icon="play" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonPlay') + '</button>';
html += '<button id="pauseButton" class="mediaButton pauseButton" title="' + Globalize.translate('ButtonPause') + '" type="button" data-icon="pause" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonPause') + '</button>';
html += '<button class="mediaButton previousTrackButton imageButton" title="' + Globalize.translate('ButtonPreviousTrack') + '" type="button" data-role="none"><i class="fa fa-step-backward"></i></button>';
html += '<button id="stopButton" class="mediaButton stopButton" title="' + Globalize.translate('ButtonStop') + '" type="button" data-icon="stop" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonStop') + '</button>';
html += '<button id="nextTrackButton" class="mediaButton nextTrackButton" title="' + Globalize.translate('ButtonNextTrack') + '" type="button" data-icon="next-track" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonNextTrack') + '</button>';
html += '<button class="mediaButton unpauseButton imageButton" title="' + Globalize.translate('ButtonPlay') + '" type="button" data-role="none"><i class="fa fa-play"></i></button>';
html += '<button class="mediaButton pauseButton imageButton" title="' + Globalize.translate('ButtonPause') + '" type="button" data-role="none"><i class="fa fa-pause"></i></button>';
html += '<button class="mediaButton stopButton imageButton" title="' + Globalize.translate('ButtonStop') + '" type="button" data-role="none"><i class="fa fa-stop"></i></button>';
html += '<button class="mediaButton nextTrackButton imageButton" title="' + Globalize.translate('ButtonNextTrack') + '" type="button" data-role="none"><i class="fa fa-step-forward"></i></button>';
html += '<div id="mediaElement"></div>';
@ -41,11 +44,8 @@
html += '</div>';
html += '<div class="currentTime"></div>';
html += '<div class="nowPlayingImage"></div>';
html += '<div class="nowPlayingText"></div>';
html += '<button id="muteButton" class="mediaButton muteButton" title="' + Globalize.translate('ButtonMute') + '" type="button" data-icon="audio" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonMute') + '</button>';
html += '<button id="unmuteButton" class="mediaButton unmuteButton" title="' + Globalize.translate('ButtonUnmute') + '" type="button" data-icon="volume-off" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonUnmute') + '</button>';
html += '<button class="mediaButton muteButton imageButton" title="' + Globalize.translate('ButtonMute') + '" type="button" data-role="none"><i class="fa fa-volume-up"></i></button>';
html += '<button class="mediaButton unmuteButton imageButton" title="' + Globalize.translate('ButtonUnmute') + '" type="button" data-role="none"><i class="fa fa-volume-off"></i></button>';
html += '<div class="volumeSliderContainer sliderContainer">';
html += '<input type="range" class="mediaSlider volumeSlider slider" step=".05" min="0" max="100" value="0" style="display:none;" data-mini="true" data-theme="a" data-highlight="true" />';
@ -298,6 +298,7 @@
nowPlayingTextElement.html(nameHtml);
var url;
var imgHeight = 50;
var nowPlayingItem = state.NowPlayingItem;
@ -305,7 +306,7 @@
url = ApiClient.getScaledImageUrl(nowPlayingItem.PrimaryImageItemId, {
type: "Primary",
height: 40,
height: imgHeight,
tag: nowPlayingItem.PrimaryImageTag
});
}
@ -313,7 +314,7 @@
url = ApiClient.getScaledImageUrl(nowPlayingItem.BackdropItemId, {
type: "Backdrop",
height: 40,
height: imgHeight,
tag: nowPlayingItem.BackdropImageTag,
index: 0
});
@ -322,7 +323,7 @@
url = ApiClient.getScaledImageUrl(nowPlayingItem.ThumbImageItemId, {
type: "Thumb",
height: 40,
height: imgHeight,
tag: nowPlayingItem.ThumbImageTag
});
}

View file

@ -629,57 +629,36 @@
var html = '';
html += '<table class="detailTable">';
//ApiClient.getItems(Dashboard.getCurrentUserId(), {
html += '<thead><tr>';
html += '<th></th>';
html += '<th>' + Globalize.translate('HeaderName') + '</th>';
html += '<th>' + Globalize.translate('HeaderAlbum') + '</th>';
html += '<th>' + Globalize.translate('HeaderArtist') + '</th>';
html += '<th>' + Globalize.translate('HeaderAlbumArtist') + '</th>';
html += '<th>' + Globalize.translate('HeaderTime') + '</th>';
html += '</tr></thead>';
// SortBy: "SortName",
// SortOrder: "Ascending",
// IncludeItemTypes: "Audio",
// Recursive: true,
// Fields: "PrimaryImageAspectRatio,SortName,MediaSourceCount,IsUnidentified,SyncInfo",
// StartIndex: 0,
// ImageTypeLimit: 1,
// EnableImageTypes: "Primary,Backdrop,Banner,Thumb",
// Limit: 100
html += '<tbody>';
//}).done(function (result) {
$.each(MediaController.playlist(), function (i, item) {
// html += LibraryBrowser.getListViewHtml({
// items: result.Items,
// smallIcon: true,
// defaultAction: 'setplaylistindex'
// });
var name = LibraryBrowser.getPosterViewDisplayName(item);
// $(".playlist", page).html(html).trigger('create').lazyChildren();
//});
var parentName = item.SeriesName || item.Album;
html += '<tr>';
html += '<td><button type="button" data-index="' + i + '" class="lnkPlayFromIndex" data-icon="play" data-iconpos="notext">' + Globalize.translate('ButtonPlay') + '</button></td>';
html += '<td>';
html += '<a href="itemdetails.html?id=' + item.Id + '">' + name + '</a>';
html += '</td>';
html += '<td>';
if (parentName) {
var parentId = item.AlbumId || item.SeriesId || item.ParentId;
html += '<a href="itemdetails.html?id=' + parentId + '">' + parentName + '</a>';
}
html += '</td>';
html += '<td>';
html += LibraryBrowser.getArtistLinksHtml(item.ArtistItems || []);
html += '</td>';
html += '<td>';
if (item.AlbumArtist) {
html += LibraryBrowser.getArtistLinksHtml(item.AlbumArtists || []);
}
html += '</td>';
html += '<td>' + Dashboard.getDisplayTime(item.RunTimeTicks) + '</td>';
html += '<td><button type="button" data-index="' + i + '" class="lnkRemoveFromIndex" data-icon="delete" data-iconpos="notext">' + Globalize.translate('ButtonRemove') + '</button></td>';
html += '</tr>';
html += LibraryBrowser.getListViewHtml({
items: MediaController.playlist(),
smallIcon: true,
defaultAction: 'play'
});
html += '</tbody>';
html += '</table>';
$(".playlist", page).html(html).trigger('create');
$(".playlist", page).html(html).trigger('create').lazyChildren();
}
$(document).on('pageinit', "#nowPlayingPage", function () {

View file

@ -19,6 +19,15 @@
window.location = 'index.html';
}
break;
case MediaBrowser.ConnectionState.ServerSignIn:
{
if (Dashboard.isRunningInCordova()) {
window.location = 'login.html?serverid=' + result.Servers[0].Id;
} else {
showServerConnectionFailure();
}
}
break;
default:
showServerConnectionFailure();
break;
@ -55,13 +64,20 @@
var href = "#";
html += '<a class="cardContent lnkServer" data-serverid="' + server.Id + '" href="' + href + '">';
var imgUrl = 'css/images/server.png';
var imgUrl = server.Id == 'connect' ? 'css/images/logo536.png' : '';
if (imgUrl) {
html += '<div class="cardImage" style="background-image:url(\'' + imgUrl + '\');">';
} else {
html += '<div class="cardImage" style="text-align:center;">';
var icon = server.Id == 'new' ? 'plus-circle' : 'globe';
html += '<i class="fa fa-' + icon + '" style="color:#fff;vertical-align:middle;font-size:100px;margin-top:25%;"></i>';
}
html += "</div>";
// cardContent
// cardContent'
html += "</a>";
// cardScalable
@ -69,11 +85,13 @@
html += '<div class="cardFooter">';
if (server.showOptions !== false) {
html += '<div class="cardText" style="text-align:right; float:right;">';
html += '<button class="btnServerMenu" type="button" data-inline="true" data-iconpos="notext" data-icon="ellipsis-v" style="margin: 2px 0 0;"></button>';
html += "</div>";
}
html += '<div class="cardText" style="margin-right: 30px; padding: 11px 0 10px;">';
html += server.Name;
@ -108,6 +126,17 @@
$('.lnkServer', elem).on('click', function () {
var id = this.getAttribute('data-serverid');
if (id == 'new') {
Dashboard.navigate('connectlogin.html?mode=manualserver');
return;
}
if (id == 'connect') {
Dashboard.navigate('connectlogin.html?mode=connect');
return;
}
var server = servers.filter(function (s) {
return s.Id == id;
})[0];
@ -272,10 +301,8 @@
var href = "#";
html += '<a class="cardContent" href="' + href + '">';
var imgUrl = 'css/images/server.png';
html += '<div class="cardImage" style="background-image:url(\'' + imgUrl + '\');">';
html += '<div class="cardImage" style="text-align:center;">';
html += '<i class="fa fa-globe" style="color:#fff;vertical-align:middle;font-size:100px;margin-top:25%;"></i>';
html += "</div>";
// cardContent
@ -326,11 +353,19 @@
function loadInvitations(page) {
if (ConnectionManager.isLoggedIntoConnect()) {
ConnectionManager.getUserInvitations().done(function (list) {
renderInvitations(page, list);
});
} else {
renderInvitations(page, []);
}
}
function loadPage(page) {
@ -339,6 +374,24 @@
ConnectionManager.getAvailableServers().done(function (servers) {
servers = servers.slice(0);
if (Dashboard.isRunningInCordova()) {
servers.push({
Name: Globalize.translate('ButtonNewServer'),
Id: 'new',
showOptions: false
});
}
if (!ConnectionManager.isLoggedIntoConnect()) {
servers.push({
Name: Globalize.translate('ButtonSignInWithConnect'),
Id: 'connect',
showOptions: false
});
}
renderServers(page, servers);
Dashboard.hideLoadingMsg();

View file

@ -42,6 +42,23 @@ var Dashboard = {
$.mobile.panel.prototype.options.classes.panel = "largePanel ui-panel";
},
isConnectMode: function () {
if (Dashboard.isRunningInCordova()) {
return true;
}
var url = getWindowUrl().toLowerCase();
return url.indexOf('mediabrowser.tv') != -1 ||
url.indexOf('emby.media') != -1;
},
isRunningInCordova: function () {
return window.appMode == 'cordova';
},
onRequestFail: function (e, data) {
if (data.status == 401) {
@ -180,14 +197,6 @@ var Dashboard = {
Dashboard.getUserPromise = null;
},
isConnectMode: function () {
var url = getWindowUrl().toLowerCase();
return url.indexOf('mediabrowser.tv') != -1 ||
url.indexOf('emby.media') != -1;
},
logout: function (logoutWithServer) {
store.removeItem("userId");
@ -230,28 +239,6 @@ var Dashboard = {
}, 3000);
},
alert: function (options) {
if (typeof options == "string") {
var message = options;
$.mobile.loading('show', {
text: message,
textonly: true,
textVisible: true
});
setTimeout(function () {
$.mobile.loading('hide');
}, 3000);
return;
}
Dashboard.confirmInternal(options.message, options.title || Globalize.translate('HeaderAlert'), false, options.callback);
},
updateSystemInfo: function (info) {
Dashboard.lastSystemInfo = info;
@ -381,6 +368,10 @@ var Dashboard = {
showFooterNotification: function (options) {
if (Dashboard.isRunningInCordova()) {
return;
}
var removeOnHide = !options.id;
options.id = options.id || "notification" + new Date().getTime() + parseInt(Math.random());
@ -454,6 +445,29 @@ var Dashboard = {
$.mobile.loading("hide");
},
getModalLoadingMsg: function () {
var elem = $('.modalLoading');
if (!elem.length) {
elem = $('<div class="modalLoading"></div>').appendTo(document.body);
}
return elem;
},
showModalLoadingMsg: function () {
Dashboard.showLoadingMsg();
Dashboard.getModalLoadingMsg().show();
},
hideModalLoadingMsg: function () {
Dashboard.getModalLoadingMsg().hide();
Dashboard.hideLoadingMsg();
},
processPluginConfigurationUpdateResult: function () {
Dashboard.hideLoadingMsg();
@ -470,6 +484,53 @@ var Dashboard = {
Dashboard.alert(Globalize.translate('MessageSettingsSaved'));
},
alert: function (options) {
if (typeof options == "string") {
var message = options;
$.mobile.loading('show', {
text: message,
textonly: true,
textVisible: true
});
setTimeout(function () {
$.mobile.loading('hide');
}, 3000);
return;
}
// Cordova
if (navigator.notification && navigator.notification.alert && options.message.indexOf('<') == -1) {
navigator.notification.alert(options.message, options.callback || function () { }, options.title || Globalize.translate('HeaderAlert'));
} else {
Dashboard.confirmInternal(options.message, options.title || Globalize.translate('HeaderAlert'), false, options.callback);
}
},
confirm: function (message, title, callback) {
// Cordova
if (navigator.notification && navigator.notification.alert && message.indexOf('<') == -1) {
var buttonLabels = [Globalize.translate('ButtonOk'), Globalize.translate('ButtonCancel')];
navigator.notification.confirm(message, function (index) {
callback(index == 1);
}, title || Globalize.translate('HeaderAlert'), buttonLabels.join(','));
} else {
Dashboard.confirmInternal(message, title, true, callback);
}
},
confirmInternal: function (message, title, showCancel, callback) {
$('.confirmFlyout').popup("close").remove();
@ -508,10 +569,6 @@ var Dashboard = {
});
},
confirm: function (message, title, callback) {
Dashboard.confirmInternal(message, title, true, callback);
},
refreshSystemInfoFromServer: function () {
if (Dashboard.getAccessToken()) {
@ -583,7 +640,7 @@ var Dashboard = {
var url = user.imageUrl;
if (user.supportsImageParams) {
url += "&width=" + (imgWidth * Math.max(devicePixelRatio || 1, 2));
url += "&width=" + (imgWidth * Math.max(window.devicePixelRatio || 1, 2));
}
html += '<img style="max-width:' + imgWidth + 'px;vertical-align:middle;margin-right:.5em;border-radius: 50px;" src="' + url + '" />';
@ -1277,7 +1334,7 @@ var Dashboard = {
isServerlessPage: function () {
var url = getWindowUrl().toLowerCase();
return url.indexOf('connectlogin.html') != -1 || url.indexOf('selectserver.html') != -1;
return url.indexOf('connectlogin.html') != -1 || url.indexOf('selectserver.html') != -1 || url.indexOf('login.html') != -1 || url.indexOf('forgotpassword.html') != -1 || url.indexOf('forgotpasswordpin.html') != -1;
},
capabilities: function () {
@ -1285,14 +1342,34 @@ var Dashboard = {
PlayableMediaTypes: "Audio,Video",
SupportedCommands: Dashboard.getSupportedRemoteCommands().join(','),
SupportsPersistentIdentifier: false,
SupportsPersistentIdentifier: Dashboard.isRunningInCordova(),
SupportsMediaControl: true,
SupportedLiveMediaTypes: ['Audio', 'Video']
};
}
};
},
(function () {
getDefaultImageQuality: function (imageType) {
var quality = 90;
var isBackdrop = imageType.toLowerCase() == 'backdrop';
if (isBackdrop) {
quality -= 10;
}
if (AppInfo.hasLowImageBandwidth) {
quality -= 15;
if (isBackdrop) {
quality -= 10;
}
}
return quality;
},
getAppInfo: function () {
function generateDeviceName() {
@ -1326,9 +1403,100 @@ var Dashboard = {
return name;
}
if (!window.WebSocket) {
var appVersion = window.dashboardVersion;
var appName = "Emby Web Client";
alert(Globalize.translate('MessageBrowserDoesNotSupportWebSockets'));
var deviceName;
var deviceId;
if (Dashboard.isRunningInCordova()) {
if ($.browser.safari) {
appName = "iOS";
if ($.browser.iphone) {
deviceName = 'iPhone';
} else if ($.browser.ipad) {
deviceName = 'iPad';
}
} else {
appName = "Android";
}
}
deviceName = deviceName || generateDeviceName();
// Cordova
//if (window.device) {
// deviceName = device.model;
// deviceId = device.uuid;
//}
//else
{
var seed = [];
var keyName = 'randomId';
if (Dashboard.isRunningInCordova()) {
seed.push('cordova');
keyName = 'cordovaDeviceId';
}
deviceId = MediaBrowser.generateDeviceId(keyName, seed.join(','));
}
return {
appName: appName,
appVersion: appVersion,
deviceName: deviceName,
deviceId: deviceId
};
}
};
var AppInfo = {};
(function () {
function isTouchDevice() {
return (('ontouchstart' in window)
|| (navigator.MaxTouchPoints > 0)
|| (navigator.msMaxTouchPoints > 0));
}
function setAppInfo() {
if (isTouchDevice()) {
AppInfo.isTouchPreferred = true;
}
if ($.browser.safari) {
if ($.browser.mobile) {
AppInfo.hasLowImageBandwidth = true;
}
}
else {
if (!$.browser.tv) {
AppInfo.enableHeadRoom = true;
}
}
if (!AppInfo.hasLowImageBandwidth) {
AppInfo.enableLatestChannelItems = true;
AppInfo.enableStudioTabs = true;
AppInfo.enablePeopleTabs = true;
AppInfo.enableTvEpisodesTab = true;
AppInfo.enableMusicSongsTab = true;
AppInfo.enableMusicArtistsTab = true;
AppInfo.enableHomeLatestTab = true;
}
}
function initializeApiClient(apiClient) {
@ -1339,15 +1507,15 @@ var Dashboard = {
.on('serveraddresschanged.dashboard', Dashboard.onApiClientServerAddressChanged);
}
var appName = "Dashboard";
var appVersion = window.dashboardVersion;
var deviceName = generateDeviceName();
var deviceId = MediaBrowser.generateDeviceId();
function createConnectionManager() {
var appInfo = Dashboard.getAppInfo();
var credentialProvider = new MediaBrowser.CredentialProvider();
var capabilities = Dashboard.capabilities();
window.ConnectionManager = new MediaBrowser.ConnectionManager(Logger, credentialProvider, appName, appVersion, deviceName, deviceId, capabilities);
window.ConnectionManager = new MediaBrowser.ConnectionManager(Logger, credentialProvider, appInfo.appName, appInfo.appVersion, appInfo.deviceName, appInfo.deviceId, capabilities);
if (Dashboard.isConnectMode()) {
@ -1360,13 +1528,14 @@ var Dashboard = {
if (Dashboard.serverAddress() && Dashboard.getCurrentUserId() && Dashboard.getAccessToken()) {
window.ApiClient = new MediaBrowser.ApiClient(Logger, Dashboard.serverAddress(), appName, appVersion, deviceName, deviceId);
window.ApiClient = new MediaBrowser.ApiClient(Logger, Dashboard.serverAddress(), appInfo.appName, appInfo.appVersion, appInfo.deviceName, appInfo.deviceId);
ApiClient.setCurrentUserId(Dashboard.getCurrentUserId(), Dashboard.getAccessToken());
initializeApiClient(ApiClient);
ConnectionManager.addApiClient(ApiClient, true).fail(Dashboard.logout);
} else {
Dashboard.logout();
@ -1376,7 +1545,7 @@ var Dashboard = {
} else {
window.ApiClient = new MediaBrowser.ApiClient(Logger, Dashboard.serverAddress(), appName, appVersion, deviceName, deviceId);
window.ApiClient = new MediaBrowser.ApiClient(Logger, Dashboard.serverAddress(), appInfo.appName, appInfo.appVersion, appInfo.deviceName, appInfo.deviceId);
ApiClient.setCurrentUserId(Dashboard.getCurrentUserId(), Dashboard.getAccessToken());
@ -1386,33 +1555,51 @@ var Dashboard = {
}
if (window.ApiClient) {
ApiClient.getDefaultImageQuality = Dashboard.getDefaultImageQuality;
Dashboard.importCss(ApiClient.getUrl('Branding/Css'));
ApiClient.getDefaultImageQuality = function (imageType) {
var quality = 90;
var isBackdrop = imageType.toLowerCase() == 'backdrop';
if (isBackdrop) {
quality -= 10;
}
if ($.browser.safari && $.browser.mobile) {
quality -= 10;
if (isBackdrop) {
quality -= 10;
}
}
return quality;
};
function onReady() {
//FastClick.attach(document.body);
if (AppInfo.hasLowImageBandwidth) {
$(document.body).addClass('largeCardMargin');
}
})();
if (!AppInfo.enableLatestChannelItems) {
$(document.body).addClass('latestChannelItemsDisabled');
}
$(function () {
if (!AppInfo.enableStudioTabs) {
$(document.body).addClass('studioTabDisabled');
}
if (!AppInfo.enablePeopleTabs) {
$(document.body).addClass('peopleTabDisabled');
}
if (!AppInfo.enableTvEpisodesTab) {
$(document.body).addClass('tvEpisodesTabDisabled');
}
if (!AppInfo.enableMusicSongsTab) {
$(document.body).addClass('musicSongsTabDisabled');
}
if (!AppInfo.enableMusicArtistsTab) {
$(document.body).addClass('musicArtistsTabDisabled');
}
if (!AppInfo.enableHomeLatestTab) {
$(document.body).addClass('homeLatestTabDisabled');
}
if (Dashboard.isRunningInCordova()) {
$(document).addClass('nativeApp');
}
var videoPlayerHtml = '<div id="mediaPlayer" data-theme="b" class="ui-bar-b" style="display: none;">';
@ -1428,22 +1615,22 @@ $(function () {
videoPlayerHtml += '<div class="videoTopControlsLogo"></div>';
videoPlayerHtml += '<div class="videoAdvancedControls">';
videoPlayerHtml += '<button class="mediaButton videoTrackControl previousTrackButton" title="Previous video" type="button" onclick="MediaPlayer.previousTrack();" data-icon="previous-track" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonPreviousTrack') + '</button>';
videoPlayerHtml += '<button class="mediaButton videoTrackControl nextTrackButton" title="Next video" type="button" onclick="MediaPlayer.nextTrack();" data-icon="next-track" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonNextTrack') + '</button>';
videoPlayerHtml += '<button class="mediaButton videoTrackControl previousTrackButton imageButton" title="Previous video" type="button" onclick="MediaPlayer.previousTrack();" data-role="none"><i class="fa fa-step-backward"></i></button>';
videoPlayerHtml += '<button class="mediaButton videoTrackControl nextTrackButton imageButton" title="Next video" type="button" onclick="MediaPlayer.nextTrack();" data-role="none"><i class="fa fa-step-forward"></i></button>';
videoPlayerHtml += '<button class="mediaButton videoAudioButton" title="Audio tracks" type="button" data-icon="audiocd" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonAudioTracks') + '</button>';
videoPlayerHtml += '<button class="mediaButton videoAudioButton imageButton" title="Audio tracks" type="button" data-role="none"><i class="fa fa-music"></i></button>';
videoPlayerHtml += '<div data-role="popup" class="videoAudioPopup videoPlayerPopup" data-history="false" data-theme="b"></div>';
videoPlayerHtml += '<button class="mediaButton videoSubtitleButton" title="Subtitles" type="button" data-icon="subtitles" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonFullscreen') + '</button>';
videoPlayerHtml += '<button class="mediaButton videoSubtitleButton imageButton" title="Subtitles" type="button" data-role="none"><i class="fa fa-text-width"></i></button>';
videoPlayerHtml += '<div data-role="popup" class="videoSubtitlePopup videoPlayerPopup" data-history="false" data-theme="b"></div>';
videoPlayerHtml += '<button class="mediaButton videoChaptersButton" title="Scenes" type="button" data-icon="video" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonScenes') + '</button>';
videoPlayerHtml += '<button class="mediaButton videoChaptersButton imageButton" title="Scenes" type="button" data-role="none"><i class="fa fa-video-camera"></i></button>';
videoPlayerHtml += '<div data-role="popup" class="videoChaptersPopup videoPlayerPopup" data-history="false" data-theme="b"></div>';
videoPlayerHtml += '<button class="mediaButton videoQualityButton" title="Quality" type="button" data-icon="gear" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonQuality') + '</button>';
videoPlayerHtml += '<button class="mediaButton videoQualityButton imageButton" title="Quality" type="button" data-role="none"><i class="fa fa-gear"></i></button>';
videoPlayerHtml += '<div data-role="popup" class="videoQualityPopup videoPlayerPopup" data-history="false" data-theme="b"></div>';
videoPlayerHtml += '<button class="mediaButton" title="Stop" type="button" onclick="MediaPlayer.stop();" data-icon="delete" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonStop') + '</button>';
videoPlayerHtml += '<button class="mediaButton imageButton" title="Stop" type="button" onclick="MediaPlayer.stop();" data-role="none"><i class="fa fa-close"></i></button>';
videoPlayerHtml += '</div>'; // videoAdvancedControls
videoPlayerHtml += '</div>'; // videoTopControls
@ -1451,10 +1638,15 @@ $(function () {
// Create controls
videoPlayerHtml += '<div class="videoControls hiddenOnIdle">';
videoPlayerHtml += '<button id="video-previousTrackButton" class="mediaButton previousTrackButton videoTrackControl" title="Previous Track" type="button" onclick="MediaPlayer.previousTrack();" data-icon="previous-track" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonPreviousTrack') + '</button>';
videoPlayerHtml += '<button id="video-playButton" class="mediaButton" title="Play" type="button" onclick="MediaPlayer.unpause();" data-icon="play" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonPlay') + '</button>';
videoPlayerHtml += '<button id="video-pauseButton" class="mediaButton" title="Pause" type="button" onclick="MediaPlayer.pause();" data-icon="pause" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonPause') + '</button>';
videoPlayerHtml += '<button id="video-nextTrackButton" class="mediaButton nextTrackButton videoTrackControl" title="Next Track" type="button" onclick="MediaPlayer.nextTrack();" data-icon="next-track" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonNextTrack') + '</button>';
videoPlayerHtml += '<div class="nowPlayingInfo hiddenOnIdle">';
videoPlayerHtml += '<div class="nowPlayingImage"></div>';
videoPlayerHtml += '<div class="nowPlayingText"></div>';
videoPlayerHtml += '</div>'; // nowPlayingInfo
videoPlayerHtml += '<button id="video-previousTrackButton" class="mediaButton previousTrackButton videoTrackControl imageButton" title="Previous Track" type="button" onclick="MediaPlayer.previousTrack();" data-role="none"><i class="fa fa-step-backward"></i></button>';
videoPlayerHtml += '<button id="video-playButton" class="mediaButton imageButton" title="Play" type="button" onclick="MediaPlayer.unpause();" data-role="none"><i class="fa fa-play"></i></button>';
videoPlayerHtml += '<button id="video-pauseButton" class="mediaButton imageButton" title="Pause" type="button" onclick="MediaPlayer.pause();" data-role="none"><i class="fa fa-pause"></i></button>';
videoPlayerHtml += '<button id="video-nextTrackButton" class="mediaButton nextTrackButton videoTrackControl imageButton" title="Next Track" type="button" onclick="MediaPlayer.nextTrack();" data-role="none"><i class="fa fa-step-forward"></i></button>';
videoPlayerHtml += '<div class="positionSliderContainer sliderContainer">';
videoPlayerHtml += '<input type="range" class="mediaSlider positionSlider slider" step=".001" min="0" max="100" value="0" style="display:none;" data-mini="true" data-theme="a" data-highlight="true" />';
@ -1462,19 +1654,14 @@ $(function () {
videoPlayerHtml += '<div class="currentTime">--:--</div>';
videoPlayerHtml += '<div class="nowPlayingInfo hiddenOnIdle">';
videoPlayerHtml += '<div class="nowPlayingImage"></div>';
videoPlayerHtml += '<div class="nowPlayingText"></div>';
videoPlayerHtml += '</div>'; // nowPlayingInfo
videoPlayerHtml += '<button id="video-muteButton" class="mediaButton muteButton" title="Mute" type="button" onclick="MediaPlayer.mute();" data-icon="audio" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonMute') + '</button>';
videoPlayerHtml += '<button id="video-unmuteButton" class="mediaButton unmuteButton" title="Unmute" type="button" onclick="MediaPlayer.unMute();" data-icon="volume-off" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonUnmute') + '</button>';
videoPlayerHtml += '<button id="video-muteButton" class="mediaButton muteButton imageButton" title="Mute" type="button" onclick="MediaPlayer.mute();" data-role="none"><i class="fa fa-volume-up"></i></button>';
videoPlayerHtml += '<button id="video-unmuteButton" class="mediaButton unmuteButton imageButton" title="Unmute" type="button" onclick="MediaPlayer.unMute();" data-role="none"><i class="fa fa-volume-off"></i></button>';
videoPlayerHtml += '<div class="volumeSliderContainer sliderContainer">';
videoPlayerHtml += '<input type="range" class="mediaSlider volumeSlider slider" step=".05" min="0" max="1" value="0" style="display:none;" data-mini="true" data-theme="a" data-highlight="true" />';
videoPlayerHtml += '</div>';
videoPlayerHtml += '<button onclick="MediaPlayer.toggleFullscreen();" id="video-fullscreenButton" class="mediaButton fullscreenButton" title="Fullscreen" type="button" data-icon="expand" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonFullscreen') + '</button>';
videoPlayerHtml += '<button onclick="MediaPlayer.toggleFullscreen();" id="video-fullscreenButton" class="mediaButton fullscreenButton imageButton" title="Fullscreen" type="button" data-role="none"><i class="fa fa-expand"></i></button>';
videoPlayerHtml += '</div>'; // videoControls
@ -1516,17 +1703,24 @@ $(function () {
e.preventDefault();
return false;
});
function isTouchDevice() {
return (('ontouchstart' in window)
|| (navigator.MaxTouchPoints > 0)
|| (navigator.msMaxTouchPoints > 0));
}
if (isTouchDevice()) {
$(document.body).addClass('touch');
setAppInfo();
createConnectionManager();
if (Dashboard.isRunningInCordova()) {
document.addEventListener("deviceready", function () {
$(onReady);
}, false);
} else {
$(onReady);
}
});
})();
Dashboard.jQueryMobileInit();
@ -1557,18 +1751,6 @@ $(document).on('pagecreate', ".page", function () {
var page = $(this);
var isConnectMode = Dashboard.isConnectMode();
if (isConnectMode && !page.hasClass('connectLoginPage')) {
if (!ConnectionManager.isLoggedIntoConnect()) {
console.log('Not logged into connect. Redirecting to login.');
Dashboard.logout();
return;
}
}
var apiClient = ConnectionManager.currentApiClient();
if (Dashboard.getAccessToken() && Dashboard.getCurrentUserId()) {
@ -1595,6 +1777,16 @@ $(document).on('pagecreate', ".page", function () {
else {
var isConnectMode = Dashboard.isConnectMode();
if (isConnectMode) {
if (!Dashboard.isServerlessPage()) {
Dashboard.logout();
return;
}
}
if (this.id !== "loginPage" && !page.hasClass('forgotPasswordPage') && !page.hasClass('wizardPage') && !isConnectMode) {
console.log('Not logged into server. Redirecting to login.');

View file

@ -400,7 +400,9 @@
var page = this;
if (!Dashboard.isServerlessPage()) {
showSyncButtonsPerUser(page);
}
});

View file

@ -47,7 +47,7 @@
var val = store.getItem('enableThemeSongs-' + userId);
// For bandwidth
return val == '1' || (val != '0' && !$.browser.mobile);
return val == '1' || (val != '0' && MediaPlayer.canAutoPlayAudio());
}
function getPlayer() {

View file

@ -8,10 +8,14 @@
var page = this;
var limit = AppInfo.hasLowImageBandwidth ?
20 :
30;
var options = {
IncludeItemTypes: "Episode",
Limit: 30,
Limit: limit,
Fields: "PrimaryImageAspectRatio,SyncInfo",
ParentId: parentId,
ImageTypeLimit: 1,

View file

@ -2,20 +2,9 @@
function reload(page) {
var query = {
Limit: 24,
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated,SyncInfo",
UserId: Dashboard.getCurrentUserId(),
ExcludeLocationTypes: "Virtual",
ImageTypeLimit: 1,
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
};
query.ParentId = LibraryMenu.getTopParentId();
var context = '';
if (query.ParentId) {
if (LibraryMenu.getTopParentId()) {
$('.scopedLibraryViewNav', page).show();
$('.globalNav', page).hide();
@ -37,9 +26,13 @@
function loadNextUp(page, context) {
var limit = AppInfo.hasLowImageBandwidth ?
18 :
24;
var query = {
Limit: 24,
Limit: limit,
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated,SyncInfo",
UserId: Dashboard.getCurrentUserId(),
ExcludeLocationTypes: "Virtual",

View file

@ -4,9 +4,13 @@
var page = this;
var limit = AppInfo.hasLowImageBandwidth ?
20 :
40;
var query = {
Limit: 40,
Limit: limit,
Fields: "AirTime,UserData,SeriesStudio,SyncInfo",
UserId: Dashboard.getCurrentUserId(),
ImageTypeLimit: 1,

View file

@ -10,7 +10,7 @@
<a href="#" class="ui-btn-active">${TabSongs}</a>
<a href="musicalbums.html">${TabAlbums}</a>
<a href="musicalbumartists.html">${TabAlbumArtists}</a>
<a href="musicartists.html">${TabArtists}</a>
<a href="musicartists.html" class="musicArtistsTab">${TabArtists}</a>
<a href="musicgenres.html">${TabGenres}</a>
<a href="musicvideos.html">${TabMusicVideos}</a>
</div>

View file

@ -2419,7 +2419,7 @@
url += "/" + options.index;
}
options.quality = options.quality || (options.type.toLowerCase() == 'backdrop' ? 80 : 90);
options.quality = options.quality || self.getDefaultImageQuality(options.type);
// Don't put these on the query string
delete options.type;
@ -2477,7 +2477,9 @@
self.authenticateUserByName = function (name, password) {
if (!name) {
throw new Error("null name");
var deferred = DeferredBuilder.Deferred();
deferred.reject();
return deferred.promise();
}
var url = self.getUrl("Users/authenticatebyname");

View file

@ -944,10 +944,15 @@
self.connectToAddress = function (address) {
address = normalizeAddress(address);
var deferred = DeferredBuilder.Deferred();
if (!address) {
deferred.reject();
return deferred.promise();
}
address = normalizeAddress(address);
tryConnect(address, 15000).done(function (publicInfo) {
logger.log('connectToAddress ' + address + ' succeeded');
@ -976,10 +981,14 @@
self.loginToConnect = function (username, password) {
if (!username) {
throw new Error("null username");
var deferred = DeferredBuilder.Deferred();
deferred.reject();
return deferred.promise();
}
if (!password) {
throw new Error("null password");
var deferred = DeferredBuilder.Deferred();
deferred.reject();
return deferred.promise();
}
var md5 = self.getConnectPasswordHash(password);

View file

@ -0,0 +1,109 @@
(function (globalScope) {
function stringToArrayBuffer(string) {
// UTF-16LE
var buf = new ArrayBuffer(string.length * 2);
var bufView = new Uint16Array(buf);
for (var i = 0, strLen = string.length; i < strLen; i++) {
bufView[i] = string.charCodeAt(i);
}
return buf;
}
function arrayBufferToString(buf) {
return String.fromCharCode.apply(null, new Uint16Array(buf));
}
globalScope.ServerDiscovery = {
findServers: function (timeoutMs) {
var deferred = DeferredBuilder.Deferred();
var servers = [];
// Expected server properties
// Name, Id, Address, EndpointAddress (optional)
var chrome = globalScope.chrome;
if (!chrome) {
deferred.resolveWith(null, [servers]);
return deferred.promise();
}
var isTimedOut = false;
var socketId;
var timeout = setTimeout(function () {
isTimedOut = true;
deferred.resolveWith(null, [servers]);
if (socketId) {
chrome.sockets.udp.onReceive.removeListener(onReceive);
chrome.sockets.udp.close(socketId);
}
}, timeoutMs);
function onReceive(info) {
console.log('ServerDiscovery message received');
console.log(info);
if (info.socketId == socketId) {
var json = arrayBufferToString(info.data);
var server = JSON.parse(json);
server.RemoteAddress = info.remoteAddress;
if (info.remotePort) {
server.RemoteAddress += ':' + info.remotePort;
}
servers.push(server);
}
}
var port = 7359;
chrome.sockets.udp.create(function (createInfo) {
socketId = createInfo.socketId;
chrome.sockets.udp.bind(createInfo.socketId, '0.0.0.0', port, function (result) {
var data = stringToArrayBuffer('who is EmbyServer?');
chrome.sockets.udp.send(createInfo.socketId, data, '255.255.255.255', port, function (result) {
if (result < 0) {
console.log('send fail: ' + result);
chrome.sockets.udp.close(createInfo.socketId);
if (!isTimedOut) {
clearTimeout(timeout);
deferred.resolveWith(null, [servers]);
}
} else {
console.log('sendTo: success ' + port);
if (!isTimedOut) {
chrome.sockets.udp.onReceive.addListener(onReceive);
}
}
});
});
});
return deferred.promise();
}
};
})(window);

View file

@ -4,23 +4,26 @@
globalScope.MediaBrowser = {};
}
globalScope.MediaBrowser.generateDeviceId = function () {
globalScope.MediaBrowser.generateDeviceId = function (keyName, seed) {
var keys = [];
keys.push(navigator.userAgent);
keys.push((navigator.cpuClass || ""));
if (seed) {
keys.push(seed);
}
var randomId = '';
// Since the above is not guaranteed to be unique per device, add a little more
randomId = store.getItem('randomId');
randomId = store.getItem(keyName);
if (!randomId) {
randomId = new Date().getTime();
store.setItem('randomId', randomId.toString());
store.setItem(keyName, randomId.toString());
}
keys.push(randomId);

View file

@ -5,6 +5,7 @@
findServers: function (timeoutMs) {
var deferred = DeferredBuilder.Deferred();
var servers = [];
// Expected server properties

View file

@ -931,7 +931,8 @@
};
};
matched = jQuery.uaMatch(window.navigator.userAgent);
var userAgent = window.navigator.userAgent;
matched = jQuery.uaMatch(userAgent);
browser = {};
if (matched.browser) {
@ -950,10 +951,14 @@
browser.safari = true;
}
var md = new MobileDetect(window.navigator.userAgent);
var md = new MobileDetect(userAgent);
browser.mobile = md.mobile();
if (browser.msie && !browser.mobile && userAgent.toLowerCase().indexOf("xbox") != -1) {
browser.tv = true;
}
jQuery.browser = browser;
})(jQuery, window);

841
dashboard-ui/thirdparty/fastclick.js vendored Normal file
View file

@ -0,0 +1,841 @@
;(function () {
'use strict';
/**
* @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
*
* @codingstandard ftlabs-jsv2
* @copyright The Financial Times Limited [All Rights Reserved]
* @license MIT License (see LICENSE.txt)
*/
/*jslint browser:true, node:true*/
/*global define, Event, Node*/
/**
* Instantiate fast-clicking listeners on the specified layer.
*
* @constructor
* @param {Element} layer The layer to listen on
* @param {Object} [options={}] The options to override the defaults
*/
function FastClick(layer, options) {
var oldOnClick;
options = options || {};
/**
* Whether a click is currently being tracked.
*
* @type boolean
*/
this.trackingClick = false;
/**
* Timestamp for when click tracking started.
*
* @type number
*/
this.trackingClickStart = 0;
/**
* The element being tracked for a click.
*
* @type EventTarget
*/
this.targetElement = null;
/**
* X-coordinate of touch start event.
*
* @type number
*/
this.touchStartX = 0;
/**
* Y-coordinate of touch start event.
*
* @type number
*/
this.touchStartY = 0;
/**
* ID of the last touch, retrieved from Touch.identifier.
*
* @type number
*/
this.lastTouchIdentifier = 0;
/**
* Touchmove boundary, beyond which a click will be cancelled.
*
* @type number
*/
this.touchBoundary = options.touchBoundary || 10;
/**
* The FastClick layer.
*
* @type Element
*/
this.layer = layer;
/**
* The minimum time between tap(touchstart and touchend) events
*
* @type number
*/
this.tapDelay = options.tapDelay || 200;
/**
* The maximum time for a tap
*
* @type number
*/
this.tapTimeout = options.tapTimeout || 700;
if (FastClick.notNeeded(layer)) {
return;
}
// Some old versions of Android don't have Function.prototype.bind
function bind(method, context) {
return function() { return method.apply(context, arguments); };
}
var methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel'];
var context = this;
for (var i = 0, l = methods.length; i < l; i++) {
context[methods[i]] = bind(context[methods[i]], context);
}
// Set up event handlers as required
if (deviceIsAndroid) {
layer.addEventListener('mouseover', this.onMouse, true);
layer.addEventListener('mousedown', this.onMouse, true);
layer.addEventListener('mouseup', this.onMouse, true);
}
layer.addEventListener('click', this.onClick, true);
layer.addEventListener('touchstart', this.onTouchStart, false);
layer.addEventListener('touchmove', this.onTouchMove, false);
layer.addEventListener('touchend', this.onTouchEnd, false);
layer.addEventListener('touchcancel', this.onTouchCancel, false);
// Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
// which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick
// layer when they are cancelled.
if (!Event.prototype.stopImmediatePropagation) {
layer.removeEventListener = function(type, callback, capture) {
var rmv = Node.prototype.removeEventListener;
if (type === 'click') {
rmv.call(layer, type, callback.hijacked || callback, capture);
} else {
rmv.call(layer, type, callback, capture);
}
};
layer.addEventListener = function(type, callback, capture) {
var adv = Node.prototype.addEventListener;
if (type === 'click') {
adv.call(layer, type, callback.hijacked || (callback.hijacked = function(event) {
if (!event.propagationStopped) {
callback(event);
}
}), capture);
} else {
adv.call(layer, type, callback, capture);
}
};
}
// If a handler is already declared in the element's onclick attribute, it will be fired before
// FastClick's onClick handler. Fix this by pulling out the user-defined handler function and
// adding it as listener.
if (typeof layer.onclick === 'function') {
// Android browser on at least 3.2 requires a new reference to the function in layer.onclick
// - the old one won't work if passed to addEventListener directly.
oldOnClick = layer.onclick;
layer.addEventListener('click', function(event) {
oldOnClick(event);
}, false);
layer.onclick = null;
}
}
/**
* Windows Phone 8.1 fakes user agent string to look like Android and iPhone.
*
* @type boolean
*/
var deviceIsWindowsPhone = navigator.userAgent.indexOf("Windows Phone") >= 0;
/**
* Android requires exceptions.
*
* @type boolean
*/
var deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0 && !deviceIsWindowsPhone;
/**
* iOS requires exceptions.
*
* @type boolean
*/
var deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent) && !deviceIsWindowsPhone;
/**
* iOS 4 requires an exception for select elements.
*
* @type boolean
*/
var deviceIsIOS4 = deviceIsIOS && (/OS 4_\d(_\d)?/).test(navigator.userAgent);
/**
* iOS 6.0-7.* requires the target element to be manually derived
*
* @type boolean
*/
var deviceIsIOSWithBadTarget = deviceIsIOS && (/OS [6-7]_\d/).test(navigator.userAgent);
/**
* BlackBerry requires exceptions.
*
* @type boolean
*/
var deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0;
/**
* Determine whether a given element requires a native click.
*
* @param {EventTarget|Element} target Target DOM element
* @returns {boolean} Returns true if the element needs a native click
*/
FastClick.prototype.needsClick = function(target) {
switch (target.nodeName.toLowerCase()) {
// Don't send a synthetic click to disabled inputs (issue #62)
case 'button':
case 'select':
case 'textarea':
if (target.disabled) {
return true;
}
break;
case 'input':
// File inputs need real clicks on iOS 6 due to a browser bug (issue #68)
if ((deviceIsIOS && target.type === 'file') || target.disabled) {
return true;
}
break;
case 'label':
case 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames
case 'video':
return true;
}
return (/\bneedsclick\b/).test(target.className);
};
/**
* Determine whether a given element requires a call to focus to simulate click into element.
*
* @param {EventTarget|Element} target Target DOM element
* @returns {boolean} Returns true if the element requires a call to focus to simulate native click.
*/
FastClick.prototype.needsFocus = function(target) {
switch (target.nodeName.toLowerCase()) {
case 'textarea':
return true;
case 'select':
return !deviceIsAndroid;
case 'input':
switch (target.type) {
case 'button':
case 'checkbox':
case 'file':
case 'image':
case 'radio':
case 'submit':
return false;
}
// No point in attempting to focus disabled inputs
return !target.disabled && !target.readOnly;
default:
return (/\bneedsfocus\b/).test(target.className);
}
};
/**
* Send a click event to the specified element.
*
* @param {EventTarget|Element} targetElement
* @param {Event} event
*/
FastClick.prototype.sendClick = function(targetElement, event) {
var clickEvent, touch;
// On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24)
if (document.activeElement && document.activeElement !== targetElement) {
document.activeElement.blur();
}
touch = event.changedTouches[0];
// Synthesise a click event, with an extra attribute so it can be tracked
clickEvent = document.createEvent('MouseEvents');
clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
clickEvent.forwardedTouchEvent = true;
targetElement.dispatchEvent(clickEvent);
};
FastClick.prototype.determineEventType = function(targetElement) {
//Issue #159: Android Chrome Select Box does not open with a synthetic click event
if (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') {
return 'mousedown';
}
return 'click';
};
/**
* @param {EventTarget|Element} targetElement
*/
FastClick.prototype.focus = function(targetElement) {
var length;
// Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724.
if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') {
length = targetElement.value.length;
targetElement.setSelectionRange(length, length);
} else {
targetElement.focus();
}
};
/**
* Check whether the given target element is a child of a scrollable layer and if so, set a flag on it.
*
* @param {EventTarget|Element} targetElement
*/
FastClick.prototype.updateScrollParent = function(targetElement) {
var scrollParent, parentElement;
scrollParent = targetElement.fastClickScrollParent;
// Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the
// target element was moved to another parent.
if (!scrollParent || !scrollParent.contains(targetElement)) {
parentElement = targetElement;
do {
if (parentElement.scrollHeight > parentElement.offsetHeight) {
scrollParent = parentElement;
targetElement.fastClickScrollParent = parentElement;
break;
}
parentElement = parentElement.parentElement;
} while (parentElement);
}
// Always update the scroll top tracker if possible.
if (scrollParent) {
scrollParent.fastClickLastScrollTop = scrollParent.scrollTop;
}
};
/**
* @param {EventTarget} targetElement
* @returns {Element|EventTarget}
*/
FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) {
// On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.
if (eventTarget.nodeType === Node.TEXT_NODE) {
return eventTarget.parentNode;
}
return eventTarget;
};
/**
* On touch start, record the position and scroll offset.
*
* @param {Event} event
* @returns {boolean}
*/
FastClick.prototype.onTouchStart = function(event) {
var targetElement, touch, selection;
// Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
if (event.targetTouches.length > 1) {
return true;
}
targetElement = this.getTargetElementFromEventTarget(event.target);
touch = event.targetTouches[0];
if (deviceIsIOS) {
// Only trusted events will deselect text on iOS (issue #49)
selection = window.getSelection();
if (selection.rangeCount && !selection.isCollapsed) {
return true;
}
if (!deviceIsIOS4) {
// Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23):
// when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched
// with the same identifier as the touch event that previously triggered the click that triggered the alert.
// Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an
// immediately preceeding touch event (issue #52), so this fix is unavailable on that platform.
// Issue 120: touch.identifier is 0 when Chrome dev tools 'Emulate touch events' is set with an iOS device UA string,
// which causes all touch events to be ignored. As this block only applies to iOS, and iOS identifiers are always long,
// random integers, it's safe to to continue if the identifier is 0 here.
if (touch.identifier && touch.identifier === this.lastTouchIdentifier) {
event.preventDefault();
return false;
}
this.lastTouchIdentifier = touch.identifier;
// If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and:
// 1) the user does a fling scroll on the scrollable layer
// 2) the user stops the fling scroll with another tap
// then the event.target of the last 'touchend' event will be the element that was under the user's finger
// when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check
// is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42).
this.updateScrollParent(targetElement);
}
}
this.trackingClick = true;
this.trackingClickStart = event.timeStamp;
this.targetElement = targetElement;
this.touchStartX = touch.pageX;
this.touchStartY = touch.pageY;
// Prevent phantom clicks on fast double-tap (issue #36)
if ((event.timeStamp - this.lastClickTime) < this.tapDelay) {
event.preventDefault();
}
return true;
};
/**
* Based on a touchmove event object, check whether the touch has moved past a boundary since it started.
*
* @param {Event} event
* @returns {boolean}
*/
FastClick.prototype.touchHasMoved = function(event) {
var touch = event.changedTouches[0], boundary = this.touchBoundary;
if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) {
return true;
}
return false;
};
/**
* Update the last position.
*
* @param {Event} event
* @returns {boolean}
*/
FastClick.prototype.onTouchMove = function(event) {
if (!this.trackingClick) {
return true;
}
// If the touch has moved, cancel the click tracking
if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) {
this.trackingClick = false;
this.targetElement = null;
}
return true;
};
/**
* Attempt to find the labelled control for the given label element.
*
* @param {EventTarget|HTMLLabelElement} labelElement
* @returns {Element|null}
*/
FastClick.prototype.findControl = function(labelElement) {
// Fast path for newer browsers supporting the HTML5 control attribute
if (labelElement.control !== undefined) {
return labelElement.control;
}
// All browsers under test that support touch events also support the HTML5 htmlFor attribute
if (labelElement.htmlFor) {
return document.getElementById(labelElement.htmlFor);
}
// If no for attribute exists, attempt to retrieve the first labellable descendant element
// the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label
return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');
};
/**
* On touch end, determine whether to send a click event at once.
*
* @param {Event} event
* @returns {boolean}
*/
FastClick.prototype.onTouchEnd = function(event) {
var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
if (!this.trackingClick) {
return true;
}
// Prevent phantom clicks on fast double-tap (issue #36)
if ((event.timeStamp - this.lastClickTime) < this.tapDelay) {
this.cancelNextClick = true;
return true;
}
if ((event.timeStamp - this.trackingClickStart) > this.tapTimeout) {
return true;
}
// Reset to prevent wrong click cancel on input (issue #156).
this.cancelNextClick = false;
this.lastClickTime = event.timeStamp;
trackingClickStart = this.trackingClickStart;
this.trackingClick = false;
this.trackingClickStart = 0;
// On some iOS devices, the targetElement supplied with the event is invalid if the layer
// is performing a transition or scroll, and has to be re-detected manually. Note that
// for this to function correctly, it must be called *after* the event target is checked!
// See issue #57; also filed as rdar://13048589 .
if (deviceIsIOSWithBadTarget) {
touch = event.changedTouches[0];
// In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null
targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement;
targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent;
}
targetTagName = targetElement.tagName.toLowerCase();
if (targetTagName === 'label') {
forElement = this.findControl(targetElement);
if (forElement) {
this.focus(targetElement);
if (deviceIsAndroid) {
return false;
}
targetElement = forElement;
}
} else if (this.needsFocus(targetElement)) {
// Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through.
// Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37).
if ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window && targetTagName === 'input')) {
this.targetElement = null;
return false;
}
this.focus(targetElement);
this.sendClick(targetElement, event);
// Select elements need the event to go through on iOS 4, otherwise the selector menu won't open.
// Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others)
if (!deviceIsIOS || targetTagName !== 'select') {
this.targetElement = null;
event.preventDefault();
}
return false;
}
if (deviceIsIOS && !deviceIsIOS4) {
// Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled
// and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42).
scrollParent = targetElement.fastClickScrollParent;
if (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) {
return true;
}
}
// Prevent the actual click from going though - unless the target node is marked as requiring
// real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted.
if (!this.needsClick(targetElement)) {
event.preventDefault();
this.sendClick(targetElement, event);
}
return false;
};
/**
* On touch cancel, stop tracking the click.
*
* @returns {void}
*/
FastClick.prototype.onTouchCancel = function() {
this.trackingClick = false;
this.targetElement = null;
};
/**
* Determine mouse events which should be permitted.
*
* @param {Event} event
* @returns {boolean}
*/
FastClick.prototype.onMouse = function(event) {
// If a target element was never set (because a touch event was never fired) allow the event
if (!this.targetElement) {
return true;
}
if (event.forwardedTouchEvent) {
return true;
}
// Programmatically generated events targeting a specific element should be permitted
if (!event.cancelable) {
return true;
}
// Derive and check the target element to see whether the mouse event needs to be permitted;
// unless explicitly enabled, prevent non-touch click events from triggering actions,
// to prevent ghost/doubleclicks.
if (!this.needsClick(this.targetElement) || this.cancelNextClick) {
// Prevent any user-added listeners declared on FastClick element from being fired.
if (event.stopImmediatePropagation) {
event.stopImmediatePropagation();
} else {
// Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
event.propagationStopped = true;
}
// Cancel the event
event.stopPropagation();
event.preventDefault();
return false;
}
// If the mouse event is permitted, return true for the action to go through.
return true;
};
/**
* On actual clicks, determine whether this is a touch-generated click, a click action occurring
* naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or
* an actual click which should be permitted.
*
* @param {Event} event
* @returns {boolean}
*/
FastClick.prototype.onClick = function(event) {
var permitted;
// It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early.
if (this.trackingClick) {
this.targetElement = null;
this.trackingClick = false;
return true;
}
// Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target.
if (event.target.type === 'submit' && event.detail === 0) {
return true;
}
permitted = this.onMouse(event);
// Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through.
if (!permitted) {
this.targetElement = null;
}
// If clicks are permitted, return true for the action to go through.
return permitted;
};
/**
* Remove all FastClick's event listeners.
*
* @returns {void}
*/
FastClick.prototype.destroy = function() {
var layer = this.layer;
if (deviceIsAndroid) {
layer.removeEventListener('mouseover', this.onMouse, true);
layer.removeEventListener('mousedown', this.onMouse, true);
layer.removeEventListener('mouseup', this.onMouse, true);
}
layer.removeEventListener('click', this.onClick, true);
layer.removeEventListener('touchstart', this.onTouchStart, false);
layer.removeEventListener('touchmove', this.onTouchMove, false);
layer.removeEventListener('touchend', this.onTouchEnd, false);
layer.removeEventListener('touchcancel', this.onTouchCancel, false);
};
/**
* Check whether FastClick is needed.
*
* @param {Element} layer The layer to listen on
*/
FastClick.notNeeded = function(layer) {
var metaViewport;
var chromeVersion;
var blackberryVersion;
var firefoxVersion;
// Devices that don't support touch don't need FastClick
if (typeof window.ontouchstart === 'undefined') {
return true;
}
// Chrome version - zero for other browsers
chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];
if (chromeVersion) {
if (deviceIsAndroid) {
metaViewport = document.querySelector('meta[name=viewport]');
if (metaViewport) {
// Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89)
if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
return true;
}
// Chrome 32 and above with width=device-width or less don't need FastClick
if (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) {
return true;
}
}
// Chrome desktop doesn't need FastClick (issue #15)
} else {
return true;
}
}
if (deviceIsBlackBerry10) {
blackberryVersion = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/);
// BlackBerry 10.3+ does not require Fastclick library.
// https://github.com/ftlabs/fastclick/issues/251
if (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) {
metaViewport = document.querySelector('meta[name=viewport]');
if (metaViewport) {
// user-scalable=no eliminates click delay.
if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
return true;
}
// width=device-width (or less than device-width) eliminates click delay.
if (document.documentElement.scrollWidth <= window.outerWidth) {
return true;
}
}
}
}
// IE10 with -ms-touch-action: none or manipulation, which disables double-tap-to-zoom (issue #97)
if (layer.style.msTouchAction === 'none' || layer.style.touchAction === 'manipulation') {
return true;
}
// Firefox version - zero for other browsers
firefoxVersion = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];
if (firefoxVersion >= 27) {
// Firefox 27+ does not have tap delay if the content is not zoomable - https://bugzilla.mozilla.org/show_bug.cgi?id=922896
metaViewport = document.querySelector('meta[name=viewport]');
if (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) {
return true;
}
}
// IE11: prefixed -ms-touch-action is no longer supported and it's recomended to use non-prefixed version
// http://msdn.microsoft.com/en-us/library/windows/apps/Hh767313.aspx
if (layer.style.touchAction === 'none' || layer.style.touchAction === 'manipulation') {
return true;
}
return false;
};
/**
* Factory method for creating a FastClick object
*
* @param {Element} layer The layer to listen on
* @param {Object} [options={}] The options to override the defaults
*/
FastClick.attach = function(layer, options) {
return new FastClick(layer, options);
};
if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {
// AMD. Register as an anonymous module.
define(function() {
return FastClick;
});
} else if (typeof module !== 'undefined' && module.exports) {
module.exports = FastClick.attach;
module.exports.FastClick = FastClick;
} else {
window.FastClick = FastClick;
}
}());

390
dashboard-ui/thirdparty/headroom.js vendored Normal file
View file

@ -0,0 +1,390 @@
/*!
* headroom.js v0.7.0 - Give your page some headroom. Hide your header until you need it
* Copyright (c) 2014 Nick Williams - http://wicky.nillia.ms/headroom.js
* License: MIT
*/
(function(window, document) {
'use strict';
/* exported features */
var features = {
bind : !!(function(){}.bind),
classList : 'classList' in document.documentElement,
rAF : !!(window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame)
};
window.requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
/**
* Handles debouncing of events via requestAnimationFrame
* @see http://www.html5rocks.com/en/tutorials/speed/animations/
* @param {Function} callback The callback to handle whichever event
*/
function Debouncer (callback) {
this.callback = callback;
this.ticking = false;
}
Debouncer.prototype = {
constructor : Debouncer,
/**
* dispatches the event to the supplied callback
* @private
*/
update : function() {
this.callback && this.callback();
this.ticking = false;
},
/**
* ensures events don't get stacked
* @private
*/
requestTick : function() {
if(!this.ticking) {
requestAnimationFrame(this.rafCallback || (this.rafCallback = this.update.bind(this)));
this.ticking = true;
}
},
/**
* Attach this as the event listeners
*/
handleEvent : function() {
this.requestTick();
}
};
/**
* Check if object is part of the DOM
* @constructor
* @param {Object} obj element to check
*/
function isDOMElement(obj) {
return obj && typeof window !== 'undefined' && (obj === window || obj.nodeType);
}
/**
* Helper function for extending objects
*/
function extend (object /*, objectN ... */) {
if(arguments.length <= 0) {
throw new Error('Missing arguments in extend function');
}
var result = object || {},
key,
i;
for (i = 1; i < arguments.length; i++) {
var replacement = arguments[i] || {};
for (key in replacement) {
// Recurse into object except if the object is a DOM element
if(typeof result[key] === 'object' && ! isDOMElement(result[key])) {
result[key] = extend(result[key], replacement[key]);
}
else {
result[key] = result[key] || replacement[key];
}
}
}
return result;
}
/**
* Helper function for normalizing tolerance option to object format
*/
function normalizeTolerance (t) {
return t === Object(t) ? t : { down : t, up : t };
}
/**
* UI enhancement for fixed headers.
* Hides header when scrolling down
* Shows header when scrolling up
* @constructor
* @param {DOMElement} elem the header element
* @param {Object} options options for the widget
*/
function Headroom (elem, options) {
options = extend(options, Headroom.options);
this.lastKnownScrollY = 0;
this.elem = elem;
this.debouncer = new Debouncer(this.update.bind(this));
this.tolerance = normalizeTolerance(options.tolerance);
this.classes = options.classes;
this.offset = options.offset;
this.scroller = options.scroller;
this.initialised = false;
this.onPin = options.onPin;
this.onUnpin = options.onUnpin;
this.onTop = options.onTop;
this.onNotTop = options.onNotTop;
}
Headroom.prototype = {
constructor : Headroom,
/**
* Initialises the widget
*/
init : function() {
if(!Headroom.cutsTheMustard) {
return;
}
this.elem.classList.add(this.classes.initial);
// defer event registration to handle browser
// potentially restoring previous scroll position
setTimeout(this.attachEvent.bind(this), 100);
return this;
},
/**
* Unattaches events and removes any classes that were added
*/
destroy : function() {
var classes = this.classes;
this.initialised = false;
this.elem.classList.remove(classes.unpinned, classes.pinned, classes.top, classes.initial);
this.scroller.removeEventListener('scroll', this.debouncer, false);
},
/**
* Attaches the scroll event
* @private
*/
attachEvent : function() {
if(!this.initialised){
this.lastKnownScrollY = this.getScrollY();
this.initialised = true;
this.scroller.addEventListener('scroll', this.debouncer, false);
this.debouncer.handleEvent();
}
},
/**
* Unpins the header if it's currently pinned
*/
unpin : function() {
var classList = this.elem.classList,
classes = this.classes;
if(classList.contains(classes.pinned) || !classList.contains(classes.unpinned)) {
classList.add(classes.unpinned);
classList.remove(classes.pinned);
this.onUnpin && this.onUnpin.call(this);
}
},
/**
* Pins the header if it's currently unpinned
*/
pin : function() {
var classList = this.elem.classList,
classes = this.classes;
if(classList.contains(classes.unpinned)) {
classList.remove(classes.unpinned);
classList.add(classes.pinned);
this.onPin && this.onPin.call(this);
}
},
/**
* Handles the top states
*/
top : function() {
var classList = this.elem.classList,
classes = this.classes;
if(!classList.contains(classes.top)) {
classList.add(classes.top);
classList.remove(classes.notTop);
this.onTop && this.onTop.call(this);
}
},
/**
* Handles the not top state
*/
notTop : function() {
var classList = this.elem.classList,
classes = this.classes;
if(!classList.contains(classes.notTop)) {
classList.add(classes.notTop);
classList.remove(classes.top);
this.onNotTop && this.onNotTop.call(this);
}
},
/**
* Gets the Y scroll position
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window.scrollY
* @return {Number} pixels the page has scrolled along the Y-axis
*/
getScrollY : function() {
return (this.scroller.pageYOffset !== undefined)
? this.scroller.pageYOffset
: (this.scroller.scrollTop !== undefined)
? this.scroller.scrollTop
: (document.documentElement || document.body.parentNode || document.body).scrollTop;
},
/**
* Gets the height of the viewport
* @see http://andylangton.co.uk/blog/development/get-viewport-size-width-and-height-javascript
* @return {int} the height of the viewport in pixels
*/
getViewportHeight : function () {
return window.innerHeight
|| document.documentElement.clientHeight
|| document.body.clientHeight;
},
/**
* Gets the height of the document
* @see http://james.padolsey.com/javascript/get-document-height-cross-browser/
* @return {int} the height of the document in pixels
*/
getDocumentHeight : function () {
var body = document.body,
documentElement = document.documentElement;
return Math.max(
body.scrollHeight, documentElement.scrollHeight,
body.offsetHeight, documentElement.offsetHeight,
body.clientHeight, documentElement.clientHeight
);
},
/**
* Gets the height of the DOM element
* @param {Object} elm the element to calculate the height of which
* @return {int} the height of the element in pixels
*/
getElementHeight : function (elm) {
return Math.max(
elm.scrollHeight,
elm.offsetHeight,
elm.clientHeight
);
},
/**
* Gets the height of the scroller element
* @return {int} the height of the scroller element in pixels
*/
getScrollerHeight : function () {
return (this.scroller === window || this.scroller === document.body)
? this.getDocumentHeight()
: this.getElementHeight(this.scroller);
},
/**
* determines if the scroll position is outside of document boundaries
* @param {int} currentScrollY the current y scroll position
* @return {bool} true if out of bounds, false otherwise
*/
isOutOfBounds : function (currentScrollY) {
var pastTop = currentScrollY < 0,
pastBottom = currentScrollY + this.getViewportHeight() > this.getScrollerHeight();
return pastTop || pastBottom;
},
/**
* determines if the tolerance has been exceeded
* @param {int} currentScrollY the current scroll y position
* @return {bool} true if tolerance exceeded, false otherwise
*/
toleranceExceeded : function (currentScrollY, direction) {
return Math.abs(currentScrollY-this.lastKnownScrollY) >= this.tolerance[direction];
},
/**
* determine if it is appropriate to unpin
* @param {int} currentScrollY the current y scroll position
* @param {bool} toleranceExceeded has the tolerance been exceeded?
* @return {bool} true if should unpin, false otherwise
*/
shouldUnpin : function (currentScrollY, toleranceExceeded) {
var scrollingDown = currentScrollY > this.lastKnownScrollY,
pastOffset = currentScrollY >= this.offset;
return scrollingDown && pastOffset && toleranceExceeded;
},
/**
* determine if it is appropriate to pin
* @param {int} currentScrollY the current y scroll position
* @param {bool} toleranceExceeded has the tolerance been exceeded?
* @return {bool} true if should pin, false otherwise
*/
shouldPin : function (currentScrollY, toleranceExceeded) {
var scrollingUp = currentScrollY < this.lastKnownScrollY,
pastOffset = currentScrollY <= this.offset;
return (scrollingUp && toleranceExceeded) || pastOffset;
},
/**
* Handles updating the state of the widget
*/
update : function() {
var currentScrollY = this.getScrollY(),
scrollDirection = currentScrollY > this.lastKnownScrollY ? 'down' : 'up',
toleranceExceeded = this.toleranceExceeded(currentScrollY, scrollDirection);
if(this.isOutOfBounds(currentScrollY)) { // Ignore bouncy scrolling in OSX
return;
}
if (currentScrollY <= this.offset ) {
this.top();
} else {
this.notTop();
}
if(this.shouldUnpin(currentScrollY, toleranceExceeded)) {
this.unpin();
}
else if(this.shouldPin(currentScrollY, toleranceExceeded)) {
this.pin();
}
this.lastKnownScrollY = currentScrollY;
}
};
/**
* Default options
* @type {Object}
*/
Headroom.options = {
tolerance : {
up : 0,
down : 0
},
offset : 0,
scroller: window,
classes : {
pinned : 'headroom--pinned',
unpinned : 'headroom--unpinned',
top : 'headroom--top',
notTop : 'headroom--not-top',
initial : 'headroom'
}
};
Headroom.cutsTheMustard = typeof features !== 'undefined' && features.rAF && features.bind && features.classList;
window.Headroom = Headroom;
}(window, document));

View file

@ -14,23 +14,23 @@
var $w = $(window),
th = threshold || 0,
retina = window.devicePixelRatio > 1,
attrib = retina ? "data-src-retina" : "data-src",
attrib = "data-src",
images = this,
loaded;
this.one("unveil", function () {
var elemType = $(this).get(0).tagName;
var source = this.getAttribute(attrib);
source = source || this.getAttribute("data-src");
var elem = this;
var elemType = elem.tagName;
var source = elem.getAttribute(attrib);
if (source) {
if (elemType === "DIV") {
this.style.backgroundImage = "url('" + source + "')";
elem.style.backgroundImage = "url('" + source + "')";
} else {
this.setAttribute("src", source);
elem.setAttribute("src", source);
}
this.setAttribute("data-src", '');
if (typeof callback === "function") callback.call(this);
elem.setAttribute("data-src", '');
}
});
@ -62,7 +62,7 @@
$.fn.lazyChildren = function () {
$(".lazy", this).unveil(200);
$(".lazy", this).unveil(0);
return this;
};

View file

@ -10,10 +10,10 @@
<a href="tvlatest.html">${TabLatest}</a>
<a href="tvupcoming.html">${TabUpcoming}</a>
<a href="tvshows.html">${TabShows}</a>
<a href="episodes.html">${TabEpisodes}</a>
<a href="episodes.html" class="tvEpisodesTab">${TabEpisodes}</a>
<a href="#" class="ui-btn-active">${TabGenres}</a>
<a href="tvpeople.html">${TabPeople}</a>
<a href="tvstudios.html">${TabNetworks}</a>
<a href="tvpeople.html" class="tvPeopleTab">${TabPeople}</a>
<a href="tvstudios.html" class="tvStudiosTab">${TabNetworks}</a>
</div>
<div data-role="content">
<div class="viewSettings">

View file

@ -10,10 +10,10 @@
<a href="#" class="ui-btn-active">${TabLatest}</a>
<a href="tvupcoming.html">${TabUpcoming}</a>
<a href="tvshows.html">${TabShows}</a>
<a href="episodes.html">${TabEpisodes}</a>
<a href="episodes.html" class="tvEpisodesTab">${TabEpisodes}</a>
<a href="tvgenres.html">${TabGenres}</a>
<a href="tvpeople.html">${TabPeople}</a>
<a href="tvstudios.html">${TabNetworks}</a>
<a href="tvpeople.html" class="tvPeopleTab">${TabPeople}</a>
<a href="tvstudios.html" class="tvStudiosTab">${TabNetworks}</a>
</div>
<div data-role="content">
<div class="ehsContent">

View file

@ -10,10 +10,10 @@
<a href="tvlatest.html">${TabLatest}</a>
<a href="tvupcoming.html">${TabUpcoming}</a>
<a href="tvshows.html">${TabShows}</a>
<a href="episodes.html">${TabEpisodes}</a>
<a href="episodes.html" class="tvEpisodesTab">${TabEpisodes}</a>
<a href="tvgenres.html">${TabGenres}</a>
<a href="#" class="ui-btn-active">${TabPeople}</a>
<a href="tvstudios.html">${TabNetworks}</a>
<a href="tvstudios.html" class="tvStudiosTab">${TabNetworks}</a>
</div>
<div class="alphabetPicker">

View file

@ -8,7 +8,7 @@
<div class="libraryViewNav globalNav" style="display: none;">
<a href="index.html">${TabHome}</a>
<a href="homelatest.html">${TabLatest}</a>
<a href="homelatest.html" class="homeLatestTab">${TabLatest}</a>
<a href="#" class="ui-btn-active">${TabNextUp}</a>
<a href="favorites.html">${TabFavorites}</a>
<a href="tvupcoming.html">${TabUpcoming}</a>
@ -18,10 +18,10 @@
<a href="tvlatest.html">${TabLatest}</a>
<a href="tvupcoming.html">${TabUpcoming}</a>
<a href="tvshows.html">${TabShows}</a>
<a href="episodes.html">${TabEpisodes}</a>
<a href="episodes.html" class="tvEpisodesTab">${TabEpisodes}</a>
<a href="tvgenres.html">${TabGenres}</a>
<a href="tvpeople.html">${TabPeople}</a>
<a href="tvstudios.html">${TabNetworks}</a>
<a href="tvpeople.html" class="tvPeopleTab">${TabPeople}</a>
<a href="tvstudios.html" class="tvStudiosTab">${TabNetworks}</a>
</div>
<div data-role="content">
<div class="ehsContent">

View file

@ -10,10 +10,10 @@
<a href="tvlatest.html">${TabLatest}</a>
<a href="tvupcoming.html">${TabUpcoming}</a>
<a href="#" class="ui-btn-active">${TabShows}</a>
<a href="episodes.html">${TabEpisodes}</a>
<a href="episodes.html" class="tvEpisodesTab">${TabEpisodes}</a>
<a href="tvgenres.html">${TabGenres}</a>
<a href="tvpeople.html">${TabPeople}</a>
<a href="tvstudios.html">${TabNetworks}</a>
<a href="tvpeople.html" class="tvPeopleTab">${TabPeople}</a>
<a href="tvstudios.html" class="tvStudiosTab">${TabNetworks}</a>
</div>
<div class="alphabetPicker">
</div>

View file

@ -10,10 +10,10 @@
<a href="tvlatest.html">${TabLatest}</a>
<a href="tvupcoming.html">${TabUpcoming}</a>
<a href="tvshows.html">${TabShows}</a>
<a href="episodes.html">${TabEpisodes}</a>
<a href="episodes.html" class="tvEpisodesTab">${TabEpisodes}</a>
<a href="tvgenres.html">${TabGenres}</a>
<a href="tvpeople.html">${TabPeople}</a>
<a href="#" class="ui-btn-active">${TabNetworks}</a>
<a href="tvpeople.html" class="tvPeopleTab">${TabPeople}</a>
<a href="#" class="ui-btn-active tvStudiosTab">${TabNetworks}</a>
</div>
<div data-role="content">
<div class="viewSettings">

View file

@ -7,7 +7,7 @@
<div id="tvUpcomingPage" data-role="page" class="page libraryPage backdropPage" data-backdroptype="series">
<div class="libraryViewNav globalNav" style="display: none;">
<a href="index.html">${TabHome}</a>
<a href="homelatest.html">${TabLatest}</a>
<a href="homelatest.html" class="homeLatestTab">${TabLatest}</a>
<a href="tvrecommended.html">${TabNextUp}</a>
<a href="favorites.html">${TabFavorites}</a>
<a href="#" class="ui-btn-active">${TabUpcoming}</a>
@ -17,10 +17,10 @@
<a href="tvlatest.html">${TabLatest}</a>
<a href="tvupcoming.html" class="ui-btn-active">${TabUpcoming}</a>
<a href="tvshows.html">${TabShows}</a>
<a href="episodes.html">${TabEpisodes}</a>
<a href="episodes.html" class="tvEpisodesTab">${TabEpisodes}</a>
<a href="tvgenres.html">${TabGenres}</a>
<a href="tvpeople.html">${TabPeople}</a>
<a href="tvstudios.html">${TabNetworks}</a>
<a href="tvpeople.html" class="tvPeopleTab">${TabPeople}</a>
<a href="tvstudios.html" class="tvStudiosTab">${TabNetworks}</a>
</div>
<div data-role="content">
<div class="ehsContent">