Fixed dropdown layout issue

Fixed show songs playing wrong track
This commit is contained in:
nelsonlaquet 2013-09-24 00:47:00 -05:00
parent 010836e69d
commit 675ba17901
5 changed files with 20 additions and 5 deletions

View file

@ -64,7 +64,7 @@
$tracks = [];
$ids = [];
foreach ($query->get() as $track) {
foreach ($query->get(['tracks.*']) as $track) {
$tracks[] = Track::mapPublicTrackSummary($track);
$ids[] = $track->id;
}
@ -93,7 +93,6 @@
return Response::json(Track::mapPrivateTrackShow($track), 200);
}
private function applyFilters($query) {
if (Input::has('order')) {
$order = \Input::get('order');
@ -127,7 +126,6 @@
$join->on('tracks.id', '=', 'show_song_track.track_id');
});
$query->whereIn('show_song_track.show_song_id', Input::get('songs'));
$query->select('tracks.*');
}
return $query;

View file

@ -24,7 +24,7 @@
</script>
<header>
<a href="/">pony.fm</a>
<a href="/">pony.fm <small>(beta)</small></a>
<div class="now-playing">
@if (Auth::check())
<div class="user-details dropdown">

View file

@ -3,6 +3,12 @@ window.handleResize = () ->
$siteBody = $ '.site-body'
$siteBody.height windowHeight - $('header').height()
$('.dropdown-menu').each () ->
$this = $ this
newMaxHeight = windowHeight - $this.parent().offset().top - $this.parent().height() - 5
$this.css
'max-height': newMaxHeight
$('.stretch-to-bottom').each () ->
$this = $ this
newHeight = windowHeight - $this.offset().top

View file

@ -217,6 +217,7 @@ html body {
html .dropdown-menu {
.border-radius(0px);
padding: 0px;
overflow-y: auto;
> li {
margin: 0px;

View file

@ -18,7 +18,7 @@ header {
float: left;
width: (@pfm-sidebar-size - 25);
height: 64px;
line-height: 52px;
line-height: 42px;
background: #84528A;
color: #fff;
font-size: 24pt;
@ -27,12 +27,22 @@ header {
position: relative;
z-index: 600;
font-family: 'Josefin Sans', sans-serif;
position: relative;
&:hover {
background: darken(#84528A, 25%);
color: #fff;
text-decoration: none;
}
small {
font-family: 'Arial';
font-size: 8pt;
color: #eee;
position: absolute;
top: 30px;
left: 33px;
}
}
.user-details {