Shuffle, repeat, empty playlist buttons. Working!

This commit is contained in:
Gregory Eremin
2011-09-19 16:44:15 +04:00
parent 9305237bac
commit 54032a4ad3
5 changed files with 36 additions and 14 deletions
+5 -5
View File
@@ -147,10 +147,10 @@ class window.Player
false
onShuffle: ->
#return $('#shuffle').hasClass 'active'
return $('.shuffle').hasClass 'on'
onRepeat: ->
#return $('#repeat').hasClass 'active'
return $('.repeat').hasClass 'on'
updateNowListening: (track) ->
if _session.getUser().lastfm_username
@@ -184,11 +184,11 @@ $('.player .progress').live 'click', (e) ->
# Player Additional Controls
$('#repeat, #shuffle').live 'click', ->
$(this).toggleClass 'active'
$('.repeat, .shuffle').live 'click', ->
$(this).toggleClass 'on'
false
$('#empty-playlist').live 'click', ->
$('.do_empty').live 'click', ->
if confirm('Are you sure?')
$('.playlist li').remove()
$('#jplayer').jPlayer 'clearMedia'