Shuffle, repeat, empty playlist buttons. Working!
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -34,6 +34,24 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.secondary-buttons {
|
||||
margin: 10px 0;
|
||||
text-align: center;
|
||||
a {
|
||||
font-size: 11px;
|
||||
color: #cacaca;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: #b0b0b0;
|
||||
}
|
||||
&.on {
|
||||
color: #a0a0a0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.playlist {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
%a#logo{ :href => "#/" } BeatHaven
|
||||
%ul.nav
|
||||
%li
|
||||
%a{ :href => "http://blog.beathaven.org/" }= I18n.t 'global.news'
|
||||
%a{ :href => "http://blog.beathaven.org/", :target => "_blank" }= I18n.t 'global.news'
|
||||
%li
|
||||
%a.about{ :href => "#/about/" }= I18n.t 'global.about'
|
||||
%form#search-form{ :action => "" }
|
||||
@@ -61,6 +61,10 @@
|
||||
%a.btn.large.play ►
|
||||
%a.btn.large.pause II
|
||||
%a.btn.small-round.next »
|
||||
.secondary-buttons
|
||||
%a.shuffle= I18n.t 'player.shuffle'
|
||||
%a.repeat= I18n.t 'player.repeat'
|
||||
%a.do_empty= I18n.t 'player.do_empty'
|
||||
|
||||
%ul.playlist
|
||||
|
||||
|
||||
Reference in New Issue
Block a user