From b9aac88766af9a0949d24ae8e98f79136b0a7dbc Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 22 Jun 2014 01:52:31 -0400 Subject: [PATCH] dlna fixes --- dashboard-ui/css/chromecast.css | 21 +- dashboard-ui/css/icons.css | 11 +- .../css/images/currentuserdefaultblack.png | Bin 2624 -> 0 bytes dashboard-ui/css/images/icons/remote.png | Bin 0 -> 399 bytes dashboard-ui/css/images/remote.png | Bin 1520 -> 0 bytes dashboard-ui/css/librarymenu.css | 48 ++-- dashboard-ui/css/mediaplayer.css | 18 +- dashboard-ui/css/notifications.css | 29 ++- dashboard-ui/css/site.css | 80 +++---- dashboard-ui/dashboard.html | 3 +- dashboard-ui/livetvsettings.html | 2 +- dashboard-ui/metadatachapters.html | 36 +-- dashboard-ui/nowplaying.html | 2 +- dashboard-ui/scripts/chromecast.js | 16 +- dashboard-ui/scripts/dashboardpage.js | 23 +- dashboard-ui/scripts/itemlistpage.js | 2 +- dashboard-ui/scripts/librarymenu.js | 127 ++++++++-- dashboard-ui/scripts/mediacontroller.js | 11 +- dashboard-ui/scripts/mediaplayer-video.js | 216 +++++++++--------- dashboard-ui/scripts/mediaplayer.js | 17 +- dashboard-ui/scripts/notifications.js | 10 +- dashboard-ui/scripts/nowplayingbar.js | 3 + dashboard-ui/scripts/remotecontrol.js | 1 + dashboard-ui/scripts/site.js | 151 ++---------- dashboard-ui/scripts/useredit.js | 2 - dashboard-ui/scripts/userimagepage.js | 1 - dashboard-ui/scripts/userparentalcontrol.js | 2 - dashboard-ui/scripts/userprofilespage.js | 1 - 28 files changed, 410 insertions(+), 423 deletions(-) delete mode 100644 dashboard-ui/css/images/currentuserdefaultblack.png create mode 100644 dashboard-ui/css/images/icons/remote.png delete mode 100644 dashboard-ui/css/images/remote.png diff --git a/dashboard-ui/css/chromecast.css b/dashboard-ui/css/chromecast.css index 7553df0243..582bdc08f1 100644 --- a/dashboard-ui/css/chromecast.css +++ b/dashboard-ui/css/chromecast.css @@ -6,7 +6,8 @@ width: 28px; height: 100%; position: relative; - top: 1px; + top: 2px; + display: inline-block; } .btnDefaultCast .btnCastImage { @@ -20,3 +21,21 @@ .btnDisabledCast .btnCastImage { background-image: url(images/chromecast/ic_media_route_disabled_holo_dark.png); } + +.headerSelectedPlayer { + display: inline-block; + vertical-align: middle; + color: #ddd; + font-size: 11px; + margin-right: .5em; + height: 100%; + position: relative; + top: -19px; + font-family: "Open Sans"; +} + +@media all and (max-width: 800px) { + .headerSelectedPlayer { + display: none; + } +} diff --git a/dashboard-ui/css/icons.css b/dashboard-ui/css/icons.css index f0242d8710..4ca87ca627 100644 --- a/dashboard-ui/css/icons.css +++ b/dashboard-ui/css/icons.css @@ -130,4 +130,13 @@ .ui-nosvg .ui-icon-expand:after { background-image: url("images/icons/expand.png"); -} \ No newline at end of file +} + +.ui-icon-remote:after { + background-image: url("images/icons/remote.png"); +} + +/* Fallback */ +.ui-nosvg .ui-icon-remote:after { + background-image: url("images/icons/remote.png"); +} diff --git a/dashboard-ui/css/images/currentuserdefaultblack.png b/dashboard-ui/css/images/currentuserdefaultblack.png deleted file mode 100644 index fff3f51a23b2f47f89d1ec9a4340a5e25092716f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2624 zcmdVc`#;l<7YFe7%-Gzo8HSN)E0^$bOUym;VKgFlQ7e~_T!w8%P!%ADB7@1?={Z+TY)Efs(=bhu;J z=g2%q8vdBX<4JX-8OaH;3>&uSsgAZ0qGw``q9#!i+z8kgiypz7E*zH~=5$25@i9p$ zT?JeGBq2Ga*wC4Mm@q0w&fA1x(W6s4fJKk+D;yu{vU9eXWgpz}D8R=qC(xTvaLNb#4|c3GAjyAjFvj;(Q=Ell`}Dax_`e`A zDrn~v|LeM|O=v}!Ee%CZ^sWu-7&BavWy4|L=d(BzE{GaQ+#^3pyAK~{pH+^a$6}T+ zdgb^dk4mDIv1m27DnK-nIl;Jy?fwOnc)05IMahm3L0eW{S*8lwup1r>odA3hQEHg& znq4(UK5`NW=z#f3$EyLaPP&0w(C2?$RcXMkboA@=NKxSH2|uiWGlR-W%Z-;Oud!6o zShT2|i9y#WT!&1&>t5=Ble`^7)Hhm{#w7Yj)Em$|W5h~Xe#j%v0`G#1knL;3HkGES zr$h7JBeQw9^)yxAFZ@EE`L2xSG{p_fp*;l4gp6&Vv^kpE8x_t^U1pC^G{xg~j^+Gf z1zI?`e6qke92^@4s=tp(QUG>1OV=Ur$Mwg4mSzmuxjYwD1FoCfvL%Q8a~mjZv1*0? z&8x2pds1s4HtVBj>p@j~PIC?)h@Dv|@8&*LOp<+}gnIJU1%76^n)#CM@Xo9r_-uB} zYp?>}OXP!Vo8?v<)dq`48mw|@u}$Vu3M)UEY*0N}tVbd@??G9UIeZy<`aeuRpOn&` z{^0QvwvJRzwI5hBJuj}K8y8=Ma%hc9gGVmko!0#hbBRE`4+yAqgVvi{x)Zz}SH;A> zM8EEAsk(RL??ZF}q9=yv$~AA)ie&XKa*hT!4AKAAbe_BAF<~t8aq-|kL;U;xa4?tg z(G_bn$jWjl&}N!itY|eee8)S0e5O4;2f;c&39|$bb(QP3eL+r(F zvlG~A+2`B73SKYyY0kd~TJTvRwY|ExGMX+bxOB(TqZe&f>7fO~Row z7hzVFFk*4wQ4lu7{q2GU>$CEg#2nN}R<1q$U{^|OZKnKP)t-Vyu`N1PAYALu6A9w3 zq(~!f$fcr-;&^{bOQBA!N+HN`3A>O58N}tXPJH#5xWBfjqpAXuu| z!v;fHOhy(QyznLY^i^bBEF#$0ma>LkfMgDr6yt)Q{4 z+4~AR&&7+S2Qz*@envMqUEVhTs-gBJFJp$UL4*H;So(OtAS$O4J%jt z>q+6gZRGx+9kjL?pN2~NX-e>*2$$fD#ge`f^&8s1exVrZ^>j&W zvwE*>)>gZvvQrpRBn z;@g#HhD_3hcAtvNlZJ9r7PNUcbN#aJGSdEouxGk!Zt^jRiP`sgJ8)D&(;&XNzD)Ms zwC!Y=dSPC3N45(~e@O_I(ql8Zwox0$l#Y;9!93{z&_TVM-}Z~zTM~W6@YHV9GxsTA zH8l~Dxa{F}ty^(7*DiTrOq-A*Wn!gy{-vCDbR08_86#4l_d(OK*e1M_kEB=dDFT^W zXbavv4}&gfnv)<`^xEQQId}puVFYIbqr&Ww7p|K1rj&W2rz110B18yb?IH21mh`pJ2w9AJX$y<=3(kLgGynhq diff --git a/dashboard-ui/css/images/icons/remote.png b/dashboard-ui/css/images/icons/remote.png new file mode 100644 index 0000000000000000000000000000000000000000..a885ebf3c5ba9a38abd1edbe8826af30fc901e6c GIT binary patch literal 399 zcmV;A0dW3_P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0VGL8K~y+Tjgg^l z!cY{3+XjJ{L{v;pAb5lc1cD_<1hS7Xu{W5QKujVKJOBbQ!4d=llFA9h1d=QhlO;hw zdiVX8vt_Ih_>(W^@45f!?d=UD=UhF{^C`4^<5DrOWVk`?TI(_~(AE%K>zS97@Xv7X z1LwrR72$VS;2m|VFR|s*Qb+?5Lp{*BKY5HT@~go6guXgEb0|n_2+{WyMqd7XYDd)*MzFfT@*#H@(1FrHOSzR&@KF^N>Atg z0{`a=B9ySWg$+#14?#oX#iB*AIM{FG%J`WKbp$$dX0f8k=|10VK=U t&YRkd|Fe|i*YZ~co3H}y+O#$bf^QinLt^RRpJM<3002ovPDHLkV1j(Ytp@-A literal 0 HcmV?d00001 diff --git a/dashboard-ui/css/images/remote.png b/dashboard-ui/css/images/remote.png deleted file mode 100644 index 8bdfd77151117d4712eedf380d55fe2fae2b39cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1520 zcmZXUdpOg39LJX-_uC_K58)`X5F+Q8XcpEmR-NBDJ z)cfxx0tP63l>`AqFc|6#1%XKS#Q6b2fbT*&q3i)|Z*S*vxlAS#;OOWmKo*Mykj-WT zU+82E;BiwP07-4g#=N4Djw|8v(KGy>;br)_2MV(Hl&Rq;FhR7s9CmqVb0f>+ z0Ec9@$WX;M-t!_TijC|q@>G==wD<4|c3<>k-BK~@@I$U%PTH9ge=Ho%PG82cFMiIn zv(vWjvux~xW53?dNY)(ARg3MnS5Nu%(4dr&uar5V7rX8*mfm=xCp}>>c2h6#8E-_# z7}R?$cq@-wqSd1NinvX(^l$SlPS#=v8Hr6+n!v_v1b1T$vOEoyNS}V8*z+AG6HA`C zs4%#52U!EhwqTY$DltwTISP>{2UpA_t>x;ak`N=^qH3;TvGa7jv83Y#44Pj+m0Q(X zc5bj2X&!tuGr8=RckZRqVd1FrjV%?DZ^P>-uUP~3s^ysI0Wngw8cg@+&1M(-*4+!A zCeE&3)xuzZS$MkyHdl@u8oe}0!25SYc3;23^sx1;tH3k#>xH{n&xSUfHA(r3zIg>`#+it0)VfbCf>8`_zQBq@wgMLb8Z@ppBnM@rS`+oaB= zK^D7uPNDX@86*g`q}RWeh^rX$qd(A`=zEBgCd!LLi@eqXylV`DIt)dJk)-wMC4|)t z(d!t(lR=l5`^0gJj_z6G`~#Pjr5M&jhk7wuH<@V4VnTA?llDvHcg$86Lbb_So+|hR z+O~V!0fPROJINe^csq|%KUke!wmN5|KGkm7|E?9cYeBz6skNLES3H%-rLXHJvdAk( zULZtj9JlnWNw$=XcXL$RtzQ12&`mm1AiO{ZjZ35 Iu|?zm0@n&Ja{vGU diff --git a/dashboard-ui/css/librarymenu.css b/dashboard-ui/css/librarymenu.css index 7a49028c45..1f9b5169ff 100644 --- a/dashboard-ui/css/librarymenu.css +++ b/dashboard-ui/css/librarymenu.css @@ -62,7 +62,7 @@ border-width: 0 !important; } -.libraryMenuButton img { +.barsMenuButton img { border: 1px solid #444 !important; padding: .5em; background-color: #181818; @@ -70,16 +70,16 @@ height: 14px!important; } -.libraryMenuButton:hover { +.barsMenuButton:hover { opacity: 1!important; } -.libraryMenuButton img:hover { +.barsMenuButton img:hover { background-color: #38c; } @media all and (min-width: 600px) { - .libraryMenuButton { + .barsMenuButton { opacity: .9; } } @@ -126,26 +126,6 @@ } @media all and (max-width: 460px) { - .viewMenuBar, .headerButton { - height: 46px; - } - - .headerButton { - line-height: 46px; - } - - .libraryPage { - padding-top: 46px !important; - } - - .libraryPage:not(.metadataEditorPage):not(.noSecondaryNavPage) { - padding-top: 96px !important; - } - - .libraryViewNav { - top: 47px; - } - .headerButtonLeft img { height: 15px; } @@ -169,7 +149,7 @@ opacity: 1; } -.libraryMenuButton:hover { +.barsMenuButton:hover { opacity: .6; } @@ -322,3 +302,21 @@ display: none; } } + +@media all and (min-width: 750px) { + + .dashboardDocument .dashboardMenuButton { + display: none; + } +} + +@media all and (max-width: 750px) { + + .dashboardDocument .libraryMenuButton { + display: none; + } +} + +.libraryDocument .dashboardMenuButton { + display: none; +} diff --git a/dashboard-ui/css/mediaplayer.css b/dashboard-ui/css/mediaplayer.css index 2c6c47525b..130bed7081 100644 --- a/dashboard-ui/css/mediaplayer.css +++ b/dashboard-ui/css/mediaplayer.css @@ -1,7 +1,7 @@ /* Now playing bar */ .nowPlayingBar { padding: 6px 0 14px 0; - border-top: 2px solid green; + border-top: 1px solid green; } .nowPlayingBarImage { @@ -27,6 +27,7 @@ overflow: hidden; white-space: nowrap; text-overflow: ellipsis; + text-align: left; } .nowPlayingDoubleText { @@ -122,6 +123,10 @@ input[type="range"]::-ms-fill-upper { display: none; /* display and visibility only */ } +.remoteControlButton { + float: right; +} + @media all and (max-width: 800px) { #nowPlayingBar .mediaButton { @@ -129,7 +134,7 @@ input[type="range"]::-ms-fill-upper { margin-bottom: 0; } - #nowPlayingBar .mediaButton:not(#playButton):not(#pauseButton) { + #nowPlayingBar .mediaButton:not(#playButton):not(#pauseButton):not(.remoteControlButton) { display: none; } @@ -146,6 +151,13 @@ input[type="range"]::-ms-fill-upper { } } +/*@media all and (min-width: 800px) { + + .nowPlayingBar { + text-align: center; + } +}*/ + @media (min-width: 1440px) { #nowPlayingBar .positionSliderContainer { width: 300px; @@ -163,4 +175,4 @@ input[type="range"]::-ms-fill-upper { .mediaPlayerAudioContainerInner { padding: 1em; background: #222; -} \ No newline at end of file +} diff --git a/dashboard-ui/css/notifications.css b/dashboard-ui/css/notifications.css index 7056f76672..fa99ee430f 100644 --- a/dashboard-ui/css/notifications.css +++ b/dashboard-ui/css/notifications.css @@ -1,23 +1,30 @@ .btnNotifications { - text-decoration: none; + text-decoration: none!important; +} + +.btnNotificationsInner { + text-decoration: none!important; vertical-align: middle; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; - padding: 8px 12px; + padding: 0 12px; + line-height: 22px; + margin-top: 15px; text-align: center; text-decoration: none !important; -moz-user-select: none; -webkit-user-select: none; - background-color: #f5f5f5; - background-image: -webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#f1f1f1)); - background-image: -webkit-linear-gradient(top,#f5f5f5,#f1f1f1); - background-image: -moz-linear-gradient(top,#f5f5f5,#f1f1f1); - background-image: -ms-linear-gradient(top,#f5f5f5,#f1f1f1); - background-image: -o-linear-gradient(top,#f5f5f5,#f1f1f1); - background-image: linear-gradient(top,#f5f5f5,#f1f1f1); - border: 1px solid #dcdcdc; - color: #666; + background-color: #353535; + background-image: -webkit-gradient(linear,left top,left bottom,from(#353535),to(#313131)); + background-image: -webkit-linear-gradient(top,#353535,#313131); + background-image: -moz-linear-gradient(top,#353535,#313131); + background-image: -ms-linear-gradient(top,#353535,#313131); + background-image: -o-linear-gradient(top,#353535,#313131); + background-image: linear-gradient(top,#353535,#313131); + border: 1px solid #444; + color: #fff; + font-size: 12px; } .levelNormal { diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 49a1486b6d..d99a54e106 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -175,13 +175,6 @@ pre, textarea.pre { z-index: 99999; } -.headerButtons { - float: right; - position: absolute; - top: 10px; - right: 5px; -} - .header .imageLink { display: inline-block; } @@ -195,10 +188,6 @@ pre, textarea.pre { vertical-align: middle; } -.imageLink.supporterIcon { - display: none; -} - .btnCurrentUser { text-decoration: none; } @@ -226,6 +215,7 @@ h1 .imageLink { .pageTitle { margin-top: 0; + font-family: "Open Sans"; } .imageButton { @@ -278,12 +268,23 @@ h1 .imageLink { margin-bottom: 0!important; } +.content-primary { + padding-top: 55px; +} + .content-secondary { - z-index: 99996; - background: #222; + z-index: 1000; + background: #333; border: 0; - margin-top: 40px; + border-right: 1px solid #ddd; display: none; + text-align: left; + width: 25%; + position: fixed; + top: 51px; + left: 0; + bottom: 0; + margin: 0; } .content-secondary h1 { @@ -294,9 +295,9 @@ h1 .imageLink { .sidebarLinks a { display: block; - padding: 10px 20px 10px 30px; + padding: .6em 20px .6em 20px; text-decoration: none; - color: #fff!important; + color: #eee!important; text-shadow: none!important; font-weight: 400!important; font-size: 14px; @@ -310,11 +311,12 @@ h1 .imageLink { .sidebarLinks a.selectedSidebarLink { background: #38c!important; color: #fff!important; + margin-right: 0; } .sidebarDivider { height: 1px; - background: #383838; + background: #444; margin: .25em 0; } @@ -342,7 +344,7 @@ h1 .imageLink { } .dashboardPanelLink { - padding: .75em .5em .75em 1.25em; + padding: .5em .5em .5em 1.25em; display: block; text-decoration: none; color: #fff!important; @@ -391,10 +393,6 @@ h1 .imageLink { .imgLogoIcon { height: 50px; } - - .imageLink.supporterIcon { - display: inline-block; - } } @media all and (min-width: 750px) { @@ -416,11 +414,6 @@ h1 .imageLink { padding-bottom: 15px; } - .headerButtons { - top: 20px; - right: 20px; - } - .type-interior > .ui-content, .type-interior > .ui-panel-content-wrap > .ui-content { padding-right: 0; padding-left: 0; @@ -429,20 +422,13 @@ h1 .imageLink { } .content-secondary { - text-align: left; - width: 34%; - position: fixed; - top: 0; - left: 0; - bottom: 0; - margin: 0; display: block; } .content-primary { - width: 56%; + width: 65%; float: right; - padding: 10px 6% 3em 0; + padding: 80px 6% 3em 0; margin: 0; } @@ -451,13 +437,6 @@ h1 .imageLink { } } -@media all and (min-width: 850px) { - - .content-primary { - padding-top: 0; - } -} - @media all and (min-width: 900px) { .page:not(.standalonePage) .header { @@ -469,11 +448,11 @@ h1 .imageLink { .content-secondary { - width: 30%; + width: 20%; } .content-primary { - width: 60%; + width: 70%; } } @@ -481,11 +460,11 @@ h1 .imageLink { .content-secondary { - width: 25%; + width: 17%; } .content-primary { - width: 65%; + width: 74%; } } @@ -497,7 +476,7 @@ h1 .imageLink { } .content-primary { - width: 70%; + width: 71%; } } @@ -669,11 +648,6 @@ h1 .imageLink { } } -/* Startup wizard */ -.wizardPage { - background: #e2e2e2; -} - .wizardContent { max-width: 800px; padding: .5em 2em 1em; diff --git a/dashboard-ui/dashboard.html b/dashboard-ui/dashboard.html index 2965ea94c4..faf8058c19 100644 --- a/dashboard-ui/dashboard.html +++ b/dashboard-ui/dashboard.html @@ -14,7 +14,6 @@ ${TabGeneral} ${TabInfo} -
@@ -42,6 +41,8 @@

+

+

diff --git a/dashboard-ui/livetvsettings.html b/dashboard-ui/livetvsettings.html index 1478d94891..46c5359381 100644 --- a/dashboard-ui/livetvsettings.html +++ b/dashboard-ui/livetvsettings.html @@ -4,7 +4,7 @@ ${TitleLiveTV} -
+
diff --git a/dashboard-ui/metadatachapters.html b/dashboard-ui/metadatachapters.html index 7b21927b2f..d6155e43c1 100644 --- a/dashboard-ui/metadatachapters.html +++ b/dashboard-ui/metadatachapters.html @@ -19,26 +19,28 @@
-

${HeaderChapterDownloadingHelp}

+
+

${HeaderChapterDownloadingHelp}

- + -
-
-
-
  • diff --git a/dashboard-ui/nowplaying.html b/dashboard-ui/nowplaying.html index 3b3baa4f30..be2bf9fe53 100644 --- a/dashboard-ui/nowplaying.html +++ b/dashboard-ui/nowplaying.html @@ -4,7 +4,7 @@ ${TitleMediaBrowser} -
    +
    ${TabNowPlaying} diff --git a/dashboard-ui/scripts/chromecast.js b/dashboard-ui/scripts/chromecast.js index 48509be839..a56fe0f7ad 100644 --- a/dashboard-ui/scripts/chromecast.js +++ b/dashboard-ui/scripts/chromecast.js @@ -1260,16 +1260,16 @@ }; } - MediaController.registerPlayer(new chromecastPlayer()); + //MediaController.registerPlayer(new chromecastPlayer()); - $(MediaController).on('playerchange', function () { + //$(MediaController).on('playerchange', function () { - if (MediaController.getPlayerInfo().name == PlayerName) { + // if (MediaController.getPlayerInfo().name == PlayerName) { - if (CastPlayer.deviceState != DEVICE_STATE.ACTIVE && CastPlayer.isInitialized) { - CastPlayer.launchApp(); - } - } - }); + // if (CastPlayer.deviceState != DEVICE_STATE.ACTIVE && CastPlayer.isInitialized) { + // CastPlayer.launchApp(); + // } + // } + //}); })(window, window.chrome, console); \ No newline at end of file diff --git a/dashboard-ui/scripts/dashboardpage.js b/dashboard-ui/scripts/dashboardpage.js index 88f8cb7f32..1f2e04122a 100644 --- a/dashboard-ui/scripts/dashboardpage.js +++ b/dashboard-ui/scripts/dashboardpage.js @@ -26,11 +26,11 @@ $('#contribute', page).show(); } + DashboardPage.renderSupporterIcon(page, pluginSecurityInfo); }); DashboardPage.reloadSystemInfo(page); DashboardPage.reloadNews(page); - DashboardPage.sessionUpdateTimer = setInterval(DashboardPage.refreshSessionsLocally, 60000); }, @@ -55,7 +55,7 @@ var port = systemInfo.HttpServerPortNumber; if (port == systemInfo.WebSocketPortNumber) { - + $('#ports', page).html(Globalize.translate('LabelRunningOnPort').replace('{0}', '' + port + '')); } else { $('#ports', page).html(Globalize.translate('LabelRunningOnPorts').replace('{0}', '' + port + '').replace('{1}', '' + systemInfo.WebSocketPortNumber + '')); @@ -739,6 +739,25 @@ } }, + renderSupporterIcon: function (page, pluginSecurityInfo) { + + var imgUrl, text; + + if (pluginSecurityInfo.IsMBSupporter) { + + imgUrl = "css/images/supporter/supporterbadge.png"; + text = "Thank you for supporting Media Browser."; + + $('.supporterIconContainer', page).html('' + text + ''); + } else { + + imgUrl = "css/images/supporter/nonsupporterbadge.png"; + text = "Please support Media Browser."; + + $('.supporterIconContainer', page).html('' + text + ''); + } + }, + renderHasPendingRestart: function (page, hasPendingRestart) { $('#updateFail', page).hide(); diff --git a/dashboard-ui/scripts/itemlistpage.js b/dashboard-ui/scripts/itemlistpage.js index 1a4003f174..242719269c 100644 --- a/dashboard-ui/scripts/itemlistpage.js +++ b/dashboard-ui/scripts/itemlistpage.js @@ -43,7 +43,7 @@ else if (view == "Poster") { html = LibraryBrowser.getPosterViewHtml({ items: result.Items, - shape: "portrait", + shape: "auto", showTitle: true, centerText: true }); diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js index 7569357ec4..2dfa9b1a40 100644 --- a/dashboard-ui/scripts/librarymenu.js +++ b/dashboard-ui/scripts/librarymenu.js @@ -7,49 +7,56 @@ //html += ''; //html += ''; //html += ''; - html += ''; + + html += ''; + html += '
    MEDIABROWSER
    '; html += '
    '; - html += ''; - - html += ''; + html += ''; html += ''; - if (user.Configuration.IsAdministrator) { - html += ''; - } - - html += ''; + html += ''; + var userButtonHeight = 22; if (user.PrimaryImageTag) { var url = ApiClient.getUserImageUrl(user.Id, { - height: 18, + height: userButtonHeight, tag: user.PrimaryImageTag, type: "Primary" }); - html += ''; + html += ''; } else { - html += ''; + html += ''; } html += ''; + if (user.Configuration.IsAdministrator) { + html += ''; + } + html += '
    '; html += '
    '; $(document.body).prepend(html); + $('.viewMenuBar').trigger('create'); $(document).trigger('headercreated'); $('.libraryMenuButton').createHoverTouch().on('hovertouch', showLibraryMenu); + $('.dashboardMenuButton').createHoverTouch().on('hovertouch', showDashboardMenu); } function getItemHref(item) { @@ -76,9 +83,23 @@ function showLibraryMenu() { - var panel = getLibraryMenu(); + var page = $.mobile.activePage; + var panel; - updateLibraryNavLinks($.mobile.activePage); + panel = getLibraryMenu(); + updateLibraryNavLinks(page); + + $(panel).panel('toggle').off('mouseleave.librarymenu').on('mouseleave.librarymenu', function () { + + $(this).panel("close"); + + }); + } + + function showDashboardMenu() { + + var page = $.mobile.activePage; + var panel = getDashboardMenu(page); $(panel).panel('toggle').off('mouseleave.librarymenu').on('mouseleave.librarymenu', function () { @@ -100,7 +121,7 @@ var viewMenuCssClass = (i.CollectionType || 'general') + 'ViewMenu'; var itemId = i.Id; - + if (i.CollectionType == "channels") { itemId = "channels"; } @@ -131,6 +152,8 @@ }); } + var requiresLibraryMenuRefresh = false; + function getLibraryMenu() { var panel = $('#libraryPanel'); @@ -157,6 +180,33 @@ updateLibraryMenu(); } + else if (requiresLibraryMenuRefresh) { + updateLibraryMenu(); + requiresLibraryMenuRefresh = false; + } + + return panel; + } + + function getDashboardMenu(page) { + + var panel = $('#dashboardPanel', page); + + if (!panel.length) { + + var html = ''; + + html += '
    '; + + html += '
    '; + + html += '
    '; + + html += '
    '; + + $(document.body).append(html); + panel = $('#dashboardPanel').panel({}).trigger('create'); + } return panel; } @@ -187,10 +237,12 @@ if (info.isLocalPlayer) { $('.btnCast').addClass('btnDefaultCast').removeClass('btnActiveCast'); + $('.headerSelectedPlayer').html(''); } else { $('.btnCast').removeClass('btnDefaultCast').addClass('btnActiveCast'); + $('.headerSelectedPlayer').html(info.deviceName || info.name); } } @@ -257,12 +309,30 @@ $('.libraryMenuButtonText').html('' + name + ''); } - else if ($(page).hasClass('allLibraryPage')) { + //else if ($(page).hasClass('type-interior')) { + + // $('.libraryMenuButtonText').html('' + 'Dashboard' + ''); + + //} + else if ($(page).hasClass('allLibraryPage') || $(page).hasClass('type-interior')) { $('.libraryMenuButtonText').html('MEDIABROWSER'); } } - $(document).on('pageinit', ".libraryPage", function () { + function onWebSocketMessage(e, data) { + + var msg = data; + + if (msg.MessageType === "UserConfigurationUpdated") { + + if (msg.Data.Id == Dashboard.getCurrentUserId()) { + + requiresLibraryMenuRefresh = true; + } + } + } + + $(document).on('pageinit', ".page", function () { var page = this; @@ -274,10 +344,9 @@ }); - }).on('pagebeforeshow', ".libraryPage", function () { + }).on('pagebeforeshow', ".page:not(.standalonePage)", function () { var page = this; - if (!$('.viewMenuBar').length) { Dashboard.getCurrentUser().done(function (user) { @@ -294,14 +363,25 @@ updateLibraryNavLinks(page); } + var jpage = $(page); + + if (jpage.hasClass('libraryPage')) { + $(document.body).addClass('libraryDocument').removeClass('dashboardDocument'); + } + else if (jpage.hasClass('type-interior')) { + $(document.body).addClass('dashboardDocument').removeClass('libraryDocument'); + } else { + $(document.body).removeClass('dashboardDocument').removeClass('libraryDocument'); + } + }).on('pagebeforeshow', ".page", function () { var page = this; - if ($(page).hasClass('libraryPage')) { - $('.viewMenuBar').show(); - } else { + if ($(page).hasClass('standalonePage')) { $('.viewMenuBar').hide(); + } else { + $('.viewMenuBar').show(); } }).on('pageshow', ".libraryPage", function () { @@ -316,8 +396,6 @@ // Scroll back up so in case vertical scroll was messed with $(document).scrollTop(0); } - - }); $(function () { @@ -326,6 +404,7 @@ updateCastIcon(); }); + $(ApiClient).on('websocketmessage', onWebSocketMessage); }); })(window, document, jQuery); diff --git a/dashboard-ui/scripts/mediacontroller.js b/dashboard-ui/scripts/mediacontroller.js index 745f75b5a6..cbc0e7b7b6 100644 --- a/dashboard-ui/scripts/mediacontroller.js +++ b/dashboard-ui/scripts/mediacontroller.js @@ -291,7 +291,7 @@ currentPlayer.shuffle(id); }; - self.playlist = function() { + self.playlist = function () { return currentPlayer.playlist || []; }; @@ -430,7 +430,7 @@ var mirror = (!target.isLocalPlayer && target.supportedCommands.indexOf('DisplayContent') != -1) ? 'true' : 'false'; - html += ''; + html += ''; html += '
    '; $(document.body).append(html); @@ -506,6 +509,7 @@ var playerName = this.getAttribute('data-playername'); var targetId = this.getAttribute('data-targetid'); var targetName = this.getAttribute('data-targetname'); + var deviceName = this.getAttribute('data-deviceName'); var playableMediaTypes = this.getAttribute('data-mediatypes').split(','); var supportedCommands = this.getAttribute('data-commands').split(','); @@ -513,7 +517,8 @@ id: targetId, name: targetName, playableMediaTypes: playableMediaTypes, - supportedCommands: supportedCommands + supportedCommands: supportedCommands, + deviceName: deviceName }); }); diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index bf77481522..583777ebe2 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -1,21 +1,8 @@ (function () { - videoPlayer = function (mediaPlayer, item, mediaSource, startPosition, user) { - if (mediaPlayer == null) { - throw new Error("mediaPlayer cannot be null"); - } - if (item == null) { - throw new Error("item cannot be null"); - } - - if (user == null) { - throw new Error("user cannot be null"); - } - - var self = mediaPlayer; + function createVideoPlayer(self) { var timeout; - var video; var initialVolume; var fullscreenExited = false; var idleState = true; @@ -30,12 +17,6 @@ self.currentSubtitleStreamIndex = null; - self.initVideoPlayer = function () { - video = playVideo(item, mediaSource, startPosition); - - return video; - }; - self.getCurrentSubtitleStream = function () { return self.getSubtitleStream(self.currentSubtitleStreamIndex); }; @@ -219,7 +200,7 @@ return s.Type == 'Subtitle' && s.IsTextSubtitleStream; }); - var allTracks = video.textTracks; // get list of tracks + var allTracks = self.currentMediaElement.textTracks; // get list of tracks for (var i = 0; i < allTracks.length; i++) { @@ -239,7 +220,7 @@ return; } - var allTracks = video.textTracks; // get list of tracks + var allTracks = self.currentMediaElement.textTracks; // get list of tracks for (var i = 0; i < allTracks.length; i++) { @@ -256,7 +237,7 @@ } } - $('track', video).each(function () { + $('track', self.currentMediaElement).each(function () { var currentSrc = this.src; @@ -267,22 +248,6 @@ }); }; - $(document).on('webkitfullscreenchange mozfullscreenchange fullscreenchange', function (e) { - - var videoControls = $('#videoControls'); - - $('.itemVideo').off('mousemove keydown scroll', idleHandler); - - if (self.isFullScreen()) { - enterFullScreen(); - idleState = true; - $('.itemVideo').on('mousemove keydown scroll', idleHandler).trigger('mousemove'); - } else { - videoControls.removeClass("active inactive"); - exitFullScreenToWindow(); - } - }); - function onPositionSliderChange() { isPositionSliderActive = false; @@ -365,12 +330,6 @@ hideFlyout($('#video-qualityFlyout')); }); - $("body").on("mousemove", "#videoPlayer.fullscreenVideo #itemVideo", function () { - - idleHandler(this); - - }); - var trackChange = false; var tooltip = $('
    '); @@ -399,9 +358,18 @@ tooltip.remove(); }); + + $(".mediaFlyoutContainer").on("click", "a", function (e) { + if (confirm("This option will close the video player. Proceed?")) { + self.stop(); + } else { + e.preventDefault(); + } + }); }); function idleHandler() { + var video = $(".itemVideo"); var videoControls = $("#videoControls"); @@ -447,14 +415,6 @@ } - function changeHandler(event) { - - document.addEventListener(event, function () { - fullscreenExited = self.isFullScreen() == false; - }); - - } - function enterFullScreen() { var player = $("#videoPlayer"); @@ -512,6 +472,7 @@ $(document.body).off("mousedown.hidesearchhints"); } + function getChaptersFlyoutHtml() { var html = ''; @@ -577,7 +538,7 @@ return currentStream.Type == "Audio"; }); - var currentIndex = getParameterByName('AudioStreamIndex', video.currentSrc); + var currentIndex = getParameterByName('AudioStreamIndex', self.currentMediaElement.currentSrc); var html = ''; @@ -716,12 +677,12 @@ var html = ''; - var currentSrc = video.currentSrc.toLowerCase(); + var currentSrc = self.currentMediaElement.currentSrc.toLowerCase(); var isStatic = currentSrc.indexOf('static=true') != -1; var transcodingExtension = self.getTranscodingExtension(); - var currentAudioStreamIndex = getParameterByName('AudioStreamIndex', video.currentSrc); + var currentAudioStreamIndex = getParameterByName('AudioStreamIndex', self.currentMediaElement.currentSrc); var options = getVideoQualityOptions(self.currentMediaSource.MediaStreams, currentAudioStreamIndex, transcodingExtension); @@ -833,7 +794,66 @@ return options; } - function playVideo(item, mediaSource, startPosition) { + function bindEventsForPlayback() { + + $(document).on('webkitfullscreenchange.videoplayer mozfullscreenchange.videoplayer fullscreenchange.videoplayer', function (e) { + + $('.itemVideo').off('mousemove.videoplayer keydown.videoplayer scroll.videoplayer', idleHandler); + + if (self.isFullScreen()) { + enterFullScreen(); + idleState = true; + $('.itemVideo').on('mousemove.videoplayer keydown.videoplayer scroll.videoplayer', idleHandler).trigger('mousemove'); + + } else { + $('#videoControls').removeClass("active inactive"); + exitFullScreenToWindow(); + } + + fullscreenExited = self.isFullScreen() == false; + + }).on("msfullscreenchange.videoplayer", function (e) { + + fullscreenExited = self.isFullScreen() == false; + + }).on("keyup.videoplayer", function (e) { + + if (fullscreenExited) { + $("#videoPlayer", $("#mediaPlayer")).removeClass("fullscreenVideo"); + fullscreenExited = false; + return; + } + + if (e.keyCode == 27) { + self.stop(); + } + }); + + // Stop playback on browser back button nav + $(window).one("popstate.videoplayer", function () { + self.stop(); + return; + }); + + $(document.body).on("mousemove.videplayer", "#videoPlayer.fullscreenVideo #itemVideo", function () { + + idleHandler(this); + }); + } + + function unbindEventsForPlayback() { + + $(document).off('webkitfullscreenchange.videoplayer mozfullscreenchange.videoplayer fullscreenchange.videoplayer').off("msfullscreenchange.videoplayer").off("keyup.videoplayer"); + + // Stop playback on browser back button nav + $(window).off("popstate.videoplayer"); + + $(document.body).off("mousemove.videplayer", "#videoPlayer.fullscreenVideo #itemVideo"); + + $('.itemVideo').off('mousemove.videoplayer keydown.videoplayer scroll.videoplayer'); + } + + self.playVideo = function (item, mediaSource, startPosition) { var mediaStreams = mediaSource.MediaStreams || []; @@ -892,18 +912,15 @@ // None of the browsers seem to like this EnableAutoStreamCopy: false - })) + seekParam; var webmVideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.webm', $.extend({}, baseParams, { - VideoCodec: 'vpx', AudioCodec: 'Vorbis', maxWidth: webmQuality.maxWidth, videoBitrate: webmQuality.videoBitrate, audioBitrate: webmQuality.audioBitrate, EnableAutoStreamCopy: false - })) + seekParam; var hlsVideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.m3u8', $.extend({}, baseParams, { @@ -915,7 +932,6 @@ AudioCodec: m3U8Quality.audioCodec, profile: 'baseline', level: '3' - })) + seekParam; //======================================================================================> @@ -975,9 +991,8 @@ html += ''; - var mediaPlayer = $("#mediaPlayer").show(); - var videoPlayer = $("#videoPlayer", mediaPlayer); - var videoControls = $('#videoControls', mediaPlayer); + var mediaPlayerContainer = $("#mediaPlayer").show(); + var videoControls = $('#videoControls', mediaPlayerContainer); //show stop button $('#video-stopButton', videoControls).show(); @@ -985,7 +1000,8 @@ $('#video-pauseButton', videoControls).show(); $('#video-previousTrackButton', videoControls).hide(); $('#video-nextTrackButton', videoControls).hide(); - var videoElement = $('#videoElement', mediaPlayer).prepend(html); + + var videoElement = $('#videoElement', mediaPlayerContainer).prepend(html); $('#video-qualityButton', videoControls).show(); @@ -1000,7 +1016,8 @@ if (subtitleStreams.length) { $('#video-subtitleButton', videoControls).show().prop("disabled", false); } else { - $('#video-subtitleButton', videoControls).hide().prop("disabled", true);; + $('#video-subtitleButton', videoControls).hide().prop("disabled", true); + ; } if (item.Chapters && item.Chapters.length) { @@ -1026,17 +1043,17 @@ volumeSlider.val(initialVolume).slider('refresh'); updateVolumeButtons(initialVolume); - video.on("volumechange", function (e) { + video.on("volumechange.mediaplayerevent", function (e) { var vol = this.volume; updateVolumeButtons(vol); - }).one("playing", function () { + }).one("playing.mediaplayerevent", function () { self.onPlaybackStart(this, item, mediaSource); - }).on("pause", function (e) { + }).on("pause.mediaplayerevent", function (e) { $('#video-playButton', videoControls).show(); $('#video-pauseButton', videoControls).hide(); @@ -1050,7 +1067,7 @@ self.stop(); }, 5 * 60 * 1000); // 5 minutes - }).on("playing", function (e) { + }).on("playing.mediaplayerevent", function (e) { $('#video-playButton', videoControls).hide(); $('#video-pauseButton', videoControls).show(); @@ -1062,14 +1079,14 @@ // Remove pause setop timer self.clearPauseStop(); - }).on("timeupdate", function () { + }).on("timeupdate.mediaplayerevent", function () { if (!isPositionSliderActive) { self.setCurrentTime(self.getCurrentTicks(this), positionSlider, currentTimeElement); } - }).on("error", function () { + }).on("error.mediaplayerevent", function () { self.clearPauseStop(); @@ -1090,7 +1107,7 @@ message: errorMsg }); - }).on("click", function (e) { + }).on("click.mediaplayerevent", function (e) { if (this.paused) { self.unpause(); @@ -1098,23 +1115,23 @@ self.pause(); } - }).on("dblclick", function () { + }).on("dblclick.mediaplayerevent", function () { self.toggleFullscreen(); - }).on("seeking", function (e) { + }).on("seeking.mediaplayerevent", function (e) { $("html").css("cursor", "wait"); - }).on("seeked", function (e) { + }).on("seeked.mediaplayerevent", function (e) { $("html").css("cursor", "default"); - }).on("loadstart", function () { + }).on("loadstart.mediaplayerevent", function () { $("html").css("cursor", "progress"); - }).on("canplay", function () { + }).on("canplay.mediaplayerevent", function () { $("html").css("cursor", "default"); @@ -1124,47 +1141,22 @@ self.onPlaybackStopped.call(this); + unbindEventsForPlayback(); + }).on('ended.playnext', self.playNextAfterEnded); - // Stop playback on browser back button nav - $(window).on("popstate", function () { - self.stop(); - return; - }); + bindEventsForPlayback(); - $(".mediaFlyoutContainer").on("click", "a", function (e) { - if (confirm("This option will close the video player. Proceed?")) { - self.stop(); - } else { - e.preventDefault(); - } - }); - - changeHandler("fullscreenchange"); - changeHandler("mozfullscreenchange"); - changeHandler("webkitfullscreenchange"); - changeHandler("msfullscreenchange"); - - $(document).on("keyup.enhancePlayer", function (e) { - if (fullscreenExited) { - videoPlayer.removeClass("fullscreenVideo"); - fullscreenExited = false; - return; - } - - if (e.keyCode == 27) { - self.stop(); - $(this).off("keyup.enhancePlayer"); - } - }); - - mediaPlayer.trigger("create"); + mediaPlayerContainer.trigger("create"); fullscreenExited = false; self.currentSubtitleStreamIndex = mediaSource.DefaultSubtitleStreamIndex; return video[0]; - } - }; + }; + } + + createVideoPlayer(MediaPlayer); + })(); \ No newline at end of file diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index 06ea89557a..ae2cf43334 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -475,8 +475,7 @@ self.currentItem = item; self.currentMediaSource = getOptimalMediaSource(item.MediaType, item.MediaSources); - videoPlayer(self, item, self.currentMediaSource, startPosition, user); - mediaElement = self.initVideoPlayer(); + mediaElement = self.playVideo(item, self.currentMediaSource, startPosition); self.currentDurationTicks = self.currentMediaSource.RunTimeTicks; } else if (item.MediaType === "Audio") { @@ -940,7 +939,7 @@ var isVideo = self.currentItem.MediaType == "Video"; - $(elem).off("ended.playnext").on("ended", function () { + $(elem).off("ended.playnext").one("ended", function () { $(this).off(); @@ -1106,7 +1105,7 @@ var playerElement = this; - $(playerElement).off('ended.playbackstopped'); + $(playerElement).off('.mediaplayerevent').off('ended.playbackstopped'); clearProgressInterval(); @@ -1259,25 +1258,25 @@ this.volume = initialVolume; this.play(); - }).on("volumechange", function () { + }).on("volumechange.mediaplayerevent", function () { self.onVolumeChanged(this); - }).one("playing", function () { + }).one("playing.mediaplayerevent", function () { $('.mediaPlayerAudioContainer').hide(); self.onPlaybackStart(this, item, mediaSource); - }).on("pause", function () { + }).on("pause.mediaplayerevent", function () { self.onPlaystateChange(this); - }).on("playing", function () { + }).on("playing.mediaplayerevent", function () { self.onPlaystateChange(this); - }).on("timeupdate", function () { + }).on("timeupdate.mediaplayerevent", function () { self.setCurrentTime(self.getCurrentTicks(this)); diff --git a/dashboard-ui/scripts/notifications.js b/dashboard-ui/scripts/notifications.js index c416a6b948..92109cfd2b 100644 --- a/dashboard-ui/scripts/notifications.js +++ b/dashboard-ui/scripts/notifications.js @@ -19,7 +19,7 @@ self.getNotificationsSummary().done(function (summary) { - var item = $('.btnNotifications').removeClass('levelNormal').removeClass('levelWarning').removeClass('levelError').html(summary.UnreadCount); + var item = $('.btnNotificationsInner').removeClass('levelNormal').removeClass('levelWarning').removeClass('levelError').html(summary.UnreadCount); if (summary.UnreadCount) { item.addClass('level' + summary.MaxUnreadNotificationLevel); @@ -207,13 +207,9 @@ window.Notifications = new notifications(); - $(Dashboard).on('interiorheaderrendered', function (e, header, user) { + $(document).on('headercreated', function (e) { - if (!user || $('.notificationsButton', header).length) { - return; - } - - $('0').insertAfter($('.btnCurrentUser', header)).on('click', Notifications.showNotificationsFlyout); + $('
    0
    ').insertBefore($('.headerUserButton')).on('click', Notifications.showNotificationsFlyout); Notifications.updateNotificationCount(); }); diff --git a/dashboard-ui/scripts/nowplayingbar.js b/dashboard-ui/scripts/nowplayingbar.js index 1a61392c6a..081cc52550 100644 --- a/dashboard-ui/scripts/nowplayingbar.js +++ b/dashboard-ui/scripts/nowplayingbar.js @@ -24,6 +24,9 @@ html += '
    '; html += '' + Globalize.translate('ButtonPlaylist') + ''; html += ''; + + html += '' + Globalize.translate('ButtonRemoteControl') + ''; + html += ''; html += ''; diff --git a/dashboard-ui/scripts/remotecontrol.js b/dashboard-ui/scripts/remotecontrol.js index 20ab69852b..2107c66fa3 100644 --- a/dashboard-ui/scripts/remotecontrol.js +++ b/dashboard-ui/scripts/remotecontrol.js @@ -252,6 +252,7 @@ }).map(function (s) { return { name: s.DeviceName, + deviceName: s.DeviceName, id: s.Id, playerName: self.name, appName: s.Client, diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index f0800459c3..22ff375628 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -59,30 +59,13 @@ var Dashboard = { return Dashboard.getUserPromise; }, - validateCurrentUser: function (page) { + validateCurrentUser: function () { Dashboard.getUserPromise = null; if (Dashboard.getCurrentUserId()) { Dashboard.getCurrentUser(); } - - page = page || $.mobile.activePage; - - var header = $('.header', page); - - if (header.length) { - // Re-render the header - header.remove(); - - if (Dashboard.getUserPromise) { - Dashboard.getUserPromise.done(function (user) { - Dashboard.ensureHeader(page, user); - }); - } else { - Dashboard.ensureHeader(page); - } - } }, getCurrentUserId: function () { @@ -544,21 +527,21 @@ var Dashboard = { Dashboard.validateCurrentUser(); }, - ensureHeader: function (page, user) { + ensureHeader: function (page) { - if (!page.hasClass('libraryPage') && !$('.headerButtons', page).length) { + if (page.hasClass('standalonePage')) { - Dashboard.renderHeader(page, user); + Dashboard.renderHeader(page); } }, - renderHeader: function (page, user) { - - var headerHtml = ''; + renderHeader: function (page) { var header = $('.header', page); if (!header.length) { + var headerHtml = ''; + headerHtml += '
    '; headerHtml += ''; - if (page.hasClass('type-interior')) { - headerHtml += '
    '; - headerHtml += ''; - headerHtml += '
    '; - } - headerHtml += '
    '; page.prepend(headerHtml); - - header = $('.header', page).trigger('create'); } - - var imageColor = "black"; - - headerHtml = ''; - headerHtml += '
    '; - - if (user && !page.hasClass('wizardPage')) { - - headerHtml += '' + user.Name + ''; - - if (user.PrimaryImageTag) { - - var url = ApiClient.getUserImageUrl(user.Id, { - width: 28, - tag: user.PrimaryImageTag, - type: "Primary" - }); - - headerHtml += ''; - } else { - headerHtml += ''; - } - headerHtml += ''; - - if (user.Configuration.IsAdministrator) { - - var href = window.location.toString().toLowerCase().indexOf('dashboard.html') == -1 ? 'dashboard.html' : '#'; - - headerHtml += 'Tools'; - } - - } - - headerHtml += '
    '; - - header.append(headerHtml).trigger('create'); - - if (!$('.supporterIcon', header).length) { - - Dashboard.getPluginSecurityInfo().done(function (pluginSecurityInfo) { - - if (pluginSecurityInfo.IsMBSupporter) { - $('').insertBefore($('.btnTools', header)); - } else { - $('').insertBefore($('.btnTools', header)); - } - }); - } - - $(Dashboard).trigger('interiorheaderrendered', [header, user]); }, ensureToolsMenu: function (page, user) { @@ -645,12 +570,9 @@ var Dashboard = { var html = '
    '; - html += '

    MEDIABROWSER

    '; - - if (user.Configuration.IsAdministrator) { - html += ''; - } - + //html += '

    MEDIABROWSER

    '; + html += '
    '; + html += '