From 443299c687f22c31e7999f34b049591e6ad57ed9 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 14 May 2013 01:36:36 -0400 Subject: [PATCH] #247 - Web client - Hide views that have no content --- ApiClient.js | 19 +++- dashboard-ui/boxsets.html | 4 +- dashboard-ui/css/images/views/games.png | Bin 0 -> 1011 bytes dashboard-ui/css/images/views/movies.png | Bin 0 -> 898 bytes dashboard-ui/css/images/views/music.png | Bin 0 -> 1326 bytes dashboard-ui/css/images/views/tvshows.png | Bin 0 -> 805 bytes dashboard-ui/css/librarybrowser.css | 73 +++++++++++++-- dashboard-ui/css/search.css | 29 +++--- dashboard-ui/gamegenres.html | 4 +- dashboard-ui/games.html | 4 +- dashboard-ui/gamesrecommended.html | 4 +- dashboard-ui/gamestudios.html | 4 +- dashboard-ui/gamesystems.html | 4 +- dashboard-ui/itembynamedetails.html | 8 +- dashboard-ui/itemdetails.html | 8 +- dashboard-ui/itemlist.html | 4 +- dashboard-ui/moviegenres.html | 4 +- dashboard-ui/moviepeople.html | 4 +- dashboard-ui/movies.html | 4 +- dashboard-ui/moviesrecommended.html | 4 +- dashboard-ui/moviestudios.html | 4 +- dashboard-ui/movietrailers.html | 22 +++-- dashboard-ui/musicalbums.html | 4 +- dashboard-ui/musicartists.html | 4 +- dashboard-ui/musicgenres.html | 4 +- dashboard-ui/musicrecommended.html | 4 +- dashboard-ui/playlist.html | 6 +- dashboard-ui/scripts/Itemdetailpage.js | 31 +------ dashboard-ui/scripts/indexpage.js | 59 ++++++------ dashboard-ui/scripts/itembynamedetailpage.js | 27 ------ dashboard-ui/scripts/librarybrowser.js | 90 +++++++++++++++++++ dashboard-ui/scripts/site.js | 35 +++----- dashboard-ui/songs.html | 4 +- dashboard-ui/tvgenres.html | 4 +- dashboard-ui/tvnextup.html | 4 +- dashboard-ui/tvpeople.html | 8 +- dashboard-ui/tvrecommended.html | 4 +- dashboard-ui/tvshows.html | 4 +- dashboard-ui/tvstudios.html | 4 +- packages.config | 2 +- 40 files changed, 267 insertions(+), 238 deletions(-) create mode 100644 dashboard-ui/css/images/views/games.png create mode 100644 dashboard-ui/css/images/views/movies.png create mode 100644 dashboard-ui/css/images/views/music.png create mode 100644 dashboard-ui/css/images/views/tvshows.png diff --git a/ApiClient.js b/ApiClient.js index b23e337efa..a44bdc4d22 100644 --- a/ApiClient.js +++ b/ApiClient.js @@ -102,7 +102,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) { self.encodeName = function (name) { name = name.split('/').join('-'); - + name = name.split('?').join('-'); var val = $.param({ name: name }); @@ -2279,6 +2279,23 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) { }); }; + self.getItemCounts = function (userId) { + + var options = {}; + + if (userId) { + options.userId = userId; + } + + var url = self.getUrl("Items/Counts", options); + + return self.ajax({ + type: "GET", + url: url, + dataType: "json" + }); + }; + /** Gets a variety of item counts that a person appears in */ diff --git a/dashboard-ui/boxsets.html b/dashboard-ui/boxsets.html index 7d6901b479..8797fe133c 100644 --- a/dashboard-ui/boxsets.html +++ b/dashboard-ui/boxsets.html @@ -4,9 +4,7 @@ Media Browser -
-

- Movies

+
Suggested diff --git a/dashboard-ui/css/images/views/games.png b/dashboard-ui/css/images/views/games.png new file mode 100644 index 0000000000000000000000000000000000000000..bd3db64905be9a2e0f9934f8f719673b0fe55c43 GIT binary patch literal 1011 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1BgjPK~!i%?U+AE zRZ$$r-+Ku)I5;>o7&JIII5-G36g;Rl1Bb>2BZt=zyrs<{kSJ&nWKzu)=uJNKM>&OJAkkdTm& z5Nr1L_dAd?mW>~KdwT_>&9d==z}t~E%f<_qO*6sIpzoV09uRaVl1DxxBMhL)T#bu8 z?Ga=R`GO21J?3s~2>z@E{ZMH$#|N!(f*-SN)ybHy84Tb8>b;kXAq=3!k_jgUYhDM` z5TdP8C+!=gpV?^qPX>bQCD?6r8QAAh%~rJWAh;HS+;Y(#PE}9dwCMnJqN%=wzJkuC z)9H)Oal+95CTg1g$I)}>-_B79DqZC%uAv(WV%k9US(xSEY(jMC?5ctv4G7W8_|r^v zgBXTU<(mPH$6k>j*cYsb%H+&kSBPWQLh?>x3|ixPr9;>;onj6CvSdvm#&zT=^3hBI zh$BnP{VqeHCNhiYQ2e7M+vizpPS(2A!<{u-0PK1vS~LSajHuHqUVjKmJI#`pbNJIG zh`AM&OEZ!|G6SC3HK1wx=H*<$W#p04__Vd&b`B3+M)Uxx`n^LRFKF`~$u81UhqaGy zQd6XBou5d@J@s{~IySU3g}k+F0PI`p2Pv4zL4HvItXjTEq${2pwtD{!ZIo63=^-=w z>5>nv_cai&mQaByI`3)&wpZkrEi1m0A5{XM8tPSAkUxd$!++f0BA02y?Ks49lk`hx z1^QSge-3e{F#ZYBH=I*o2%WYf_-nok(TA3CE4oendDa84Y9MTn57=&VPR-)ffeaxc3izHCQm@%*R2v8?%w{hTGL2}3dQg*+Wh!LLRSeKLPTS)Boq4n9BB)yxmN#*P4GCs6u?s0@YlwKtE1-3_#)#*l6+er#w~ zv#;Ncq4y2!TEYi=zmL!>WfAIXw4G=zksV$deIw~$tI20I{peDqL$w`grJo;YZ8Gcf hCnO{!BvhGH>JQ3}eT#QyQ}qA<002ovPDHLkV1j94*PH+V literal 0 HcmV?d00001 diff --git a/dashboard-ui/css/images/views/movies.png b/dashboard-ui/css/images/views/movies.png new file mode 100644 index 0000000000000000000000000000000000000000..356f37c24c3a253655d6e9782e4c7156972f875a GIT binary patch literal 898 zcmV-|1AY97P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0~bj|K~!i%?U*rW zQ&AL#UqXfs4jnpV5X|6^p+kp`9U^wfAh>jJ=-{ZEgM*70LFiD#QK4gp3|ZXTL20%+ z2rY=Hba4<`a4A%%dtUE3@7;IajZw~+=yW>E-EQ|0 zdJm~PcT{jXbC7HqRYgkXh@x|RtwNztM!zZ+i}#&B8<5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?G5Wc`-Ya5zjYXQElrvK#Q*>R07*qoM6N<$f`OHTc>n+a literal 0 HcmV?d00001 diff --git a/dashboard-ui/css/images/views/tvshows.png b/dashboard-ui/css/images/views/tvshows.png new file mode 100644 index 0000000000000000000000000000000000000000..a2b7357215b1934d0a401a564f0b8674e5dc6f58 GIT binary patch literal 805 zcmV+=1KRwFP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0=h{=K~!i%?U^xX z6hRb*?+%L;DN+cgut;HHVR7kFq)G}dWm=(pVbD1Z*pU!#5pO`{w>tQ1Q6&!-9ALQ|Kw$ybvNSZ(C4+fr*9#i%rf>>)!bl=yUb}{Rd0s918?PX z1p$9>na4^Lz!N#(#@|#eg0Zhak(0Mo_^YBfl~1F`0?H;x0VI)E*ma7t_zg=cE)pj= z0ZjHCFZCt9w9oPH@hkXcg=2)c0xy}ceH;4OmX8slfC>2?tV-%%bs-8^;`wwo>*C&U%#ide-z#ui;`GC>OPAxHsipFQjr#Vh#K3}gf+ zz$VYOnI->k;2{(3I!vOxnExUIW1Ujbo7632OQ>S5 zFpfRli>~I+uy^1=5v#x$>#TU@WB8+v7VR&gP3!})&r#!enBv}N@OHG=bWNi}-`>&U j@$q`uR9-;Esnz}gjmVfS32}o<00000NkvXXu0mjf^9O+l literal 0 HcmV?d00001 diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index a53c928676..961daf084e 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -3,18 +3,65 @@ background: none!important; } +.viewMenuBar { + background: #444; + background-image: linear-gradient(#444,#2d2d2d); + border-bottom: 1px solid #444; + font-size: 13px; + font-weight: bold; +} + +.viewMenuLink { + text-decoration: none; + color: #bbb; + padding: 7px .9em 6px; + display: inline-block; + vertical-align: middle; +} + + .viewMenuLink:hover { + color: #fff; + } + + .viewMenuLink:hover img { + opacity: .5; + } + + .viewMenuLink img { + height: 20px; + vertical-align: top; + } + +.viewMenuSecondary { + float: right; +} + +.viewMenuTextLink { + display: none; + height: 20px; + padding-top: 9px; + text-transform: uppercase; +} + +.viewName { + vertical-align: middle; +} + +.selectedViewLink { + color: #fff; +} + +.selectedViewIndicator { + margin-right: .25em; + vertical-align: middle; + position: relative; + top: -1px; +} + .libraryPage .header { padding-bottom: 0; } -.libraryPageHeader { - margin: -5px 0 0; -} - - .libraryPageHeader a { - margin-right: 15px; - } - .libraryPage .ui-content { padding: 10px; } @@ -192,6 +239,14 @@ .galleryImage { width: 150px; } + + .viewMenuTextLink { + display: inline-block; + } + + .viewMenuImageLink { + display: none; + } } @media all and (min-width: 1200px) { @@ -203,7 +258,7 @@ @media all and (min-width: 650px) { .libraryPage .ui-content { - padding: 0 20px 100px; + padding: 15px 20px 100px; } .viewControls, .listTopPaging { diff --git a/dashboard-ui/css/search.css b/dashboard-ui/css/search.css index fa2e5c7c6b..53c89131a3 100644 --- a/dashboard-ui/css/search.css +++ b/dashboard-ui/css/search.css @@ -1,17 +1,16 @@ .headerSearch { display: none; - margin-right: 3em; + margin-right: 1em; position: relative; } .txtSearch { vertical-align: middle; - font: 16px arial,sans-serif; - height: 28px; - line-height: 28px; + font: 13px arial,sans-serif; margin: 0 .15em 0 0; width: 150px; padding: 0; + border: 1px solid #4d90fe; } .btnSearch { @@ -30,7 +29,6 @@ -webkit-border-radius: 2px; border-radius: 2px; font-weight: bold; - height: 28px; min-width: 54px; padding: 0 8px; text-align: center; @@ -40,8 +38,13 @@ text-align: center; } +.txtSearch, .btnSearch { + height: 22px; + line-height: 22px; +} + .btnSearch img { - height: 28px; + height: 22px; margin: 0 auto; border: 0; } @@ -133,21 +136,11 @@ @media all and (min-width: 1200px) { .txtSearch { - width: 350px; + width: 300px; } .searchHints { - width: 348px; - } -} - -@media all and (min-width: 1440px) { - .txtSearch { - width: 400px; - } - - .searchHints { - width: 398px; + width: 298px; } } diff --git a/dashboard-ui/gamegenres.html b/dashboard-ui/gamegenres.html index ddcab8f7d9..f3a1cb5483 100644 --- a/dashboard-ui/gamegenres.html +++ b/dashboard-ui/gamegenres.html @@ -4,9 +4,7 @@ Media Browser -
-

- Games

+
Suggested diff --git a/dashboard-ui/games.html b/dashboard-ui/games.html index 166d91c72d..deb9e16742 100644 --- a/dashboard-ui/games.html +++ b/dashboard-ui/games.html @@ -4,9 +4,7 @@ Media Browser -
-

- Games

+
Suggested diff --git a/dashboard-ui/gamesrecommended.html b/dashboard-ui/gamesrecommended.html index 9431cc585b..51a16d9a37 100644 --- a/dashboard-ui/gamesrecommended.html +++ b/dashboard-ui/gamesrecommended.html @@ -4,9 +4,7 @@ Media Browser -
-

- Games

+
Suggested diff --git a/dashboard-ui/gamestudios.html b/dashboard-ui/gamestudios.html index 9253ca0841..9d07b0fda2 100644 --- a/dashboard-ui/gamestudios.html +++ b/dashboard-ui/gamestudios.html @@ -4,9 +4,7 @@ Media Browser -
-

- Games

+
Suggested diff --git a/dashboard-ui/gamesystems.html b/dashboard-ui/gamesystems.html index fa77c62088..19253914a4 100644 --- a/dashboard-ui/gamesystems.html +++ b/dashboard-ui/gamesystems.html @@ -4,9 +4,7 @@ Media Browser -
-

- Games

+
Suggested diff --git a/dashboard-ui/itembynamedetails.html b/dashboard-ui/itembynamedetails.html index fb49fee565..cc62d67b0d 100644 --- a/dashboard-ui/itembynamedetails.html +++ b/dashboard-ui/itembynamedetails.html @@ -4,13 +4,7 @@ -
-
- -
-

-

+