mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-12-12 13:48:00 +01:00
675ba17901
Fixed show songs playing wrong track
38 lines
No EOL
988 B
CoffeeScript
38 lines
No EOL
988 B
CoffeeScript
window.handleResize = () ->
|
|
windowHeight = $(window).height()
|
|
$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
|
|
if newHeight > 0
|
|
$this.height newHeight
|
|
|
|
$('.revealable').each () ->
|
|
$this = $ this
|
|
return if $this.data 'real-height'
|
|
$this.data 'real-height', $this.height()
|
|
$this.css
|
|
height: '15em'
|
|
|
|
$this.find('.reveal').click (e) ->
|
|
e.preventDefault()
|
|
$this.css {height: 'auto'}
|
|
$(this).fadeOut 200
|
|
|
|
window.alignVertically = (element) ->
|
|
$element = $(element)
|
|
$parent = $element.parent()
|
|
$element.css 'top', $parent.height() / 2 - $element.height() / 2
|
|
|
|
window.handleResize()
|
|
$(window).resize window.handleResize
|
|
|
|
$('.site-content').empty() |