Shuffle, repeat, empty playlist buttons. Working!
This commit is contained in:
parent
9305237bac
commit
54032a4ad3
|
@ -147,10 +147,10 @@ class window.Player
|
||||||
false
|
false
|
||||||
|
|
||||||
onShuffle: ->
|
onShuffle: ->
|
||||||
#return $('#shuffle').hasClass 'active'
|
return $('.shuffle').hasClass 'on'
|
||||||
|
|
||||||
onRepeat: ->
|
onRepeat: ->
|
||||||
#return $('#repeat').hasClass 'active'
|
return $('.repeat').hasClass 'on'
|
||||||
|
|
||||||
updateNowListening: (track) ->
|
updateNowListening: (track) ->
|
||||||
if _session.getUser().lastfm_username
|
if _session.getUser().lastfm_username
|
||||||
|
@ -184,11 +184,11 @@ $('.player .progress').live 'click', (e) ->
|
||||||
|
|
||||||
# Player Additional Controls
|
# Player Additional Controls
|
||||||
|
|
||||||
$('#repeat, #shuffle').live 'click', ->
|
$('.repeat, .shuffle').live 'click', ->
|
||||||
$(this).toggleClass 'active'
|
$(this).toggleClass 'on'
|
||||||
false
|
false
|
||||||
|
|
||||||
$('#empty-playlist').live 'click', ->
|
$('.do_empty').live 'click', ->
|
||||||
if confirm('Are you sure?')
|
if confirm('Are you sure?')
|
||||||
$('.playlist li').remove()
|
$('.playlist li').remove()
|
||||||
$('#jplayer').jPlayer 'clearMedia'
|
$('#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 {
|
.playlist {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
%a#logo{ :href => "#/" } BeatHaven
|
%a#logo{ :href => "#/" } BeatHaven
|
||||||
%ul.nav
|
%ul.nav
|
||||||
%li
|
%li
|
||||||
%a{ :href => "http://blog.beathaven.org/" }= I18n.t 'global.news'
|
%a{ :href => "http://blog.beathaven.org/", :target => "_blank" }= I18n.t 'global.news'
|
||||||
%li
|
%li
|
||||||
%a.about{ :href => "#/about/" }= I18n.t 'global.about'
|
%a.about{ :href => "#/about/" }= I18n.t 'global.about'
|
||||||
%form#search-form{ :action => "" }
|
%form#search-form{ :action => "" }
|
||||||
|
@ -61,6 +61,10 @@
|
||||||
%a.btn.large.play ►
|
%a.btn.large.play ►
|
||||||
%a.btn.large.pause II
|
%a.btn.large.pause II
|
||||||
%a.btn.small-round.next »
|
%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
|
%ul.playlist
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,6 @@ en:
|
||||||
logout: "Log out"
|
logout: "Log out"
|
||||||
do_add: "Add some music to playlist"
|
do_add: "Add some music to playlist"
|
||||||
do_login: "Don't forget to log in, please. It's simple."
|
do_login: "Don't forget to log in, please. It's simple."
|
||||||
repeat: "Repeat"
|
|
||||||
shuffle: "Shuffle"
|
|
||||||
do_empty: "Empty playlist"
|
|
||||||
hello: "Hi there"
|
hello: "Hi there"
|
||||||
settings: "Settings"
|
settings: "Settings"
|
||||||
your_ad_here: "Your ad couldn't<br/>be here"
|
your_ad_here: "Your ad couldn't<br/>be here"
|
||||||
|
@ -49,3 +46,6 @@ en:
|
||||||
|
|
||||||
player:
|
player:
|
||||||
add: "Add to Now Playing"
|
add: "Add to Now Playing"
|
||||||
|
repeat: "REPEAT"
|
||||||
|
shuffle: "SHUFFLE"
|
||||||
|
do_empty: "EMPTY"
|
|
@ -7,9 +7,6 @@ ru:
|
||||||
logout: "Выйти"
|
logout: "Выйти"
|
||||||
do_add: "Добавьте музыку в плей-лист"
|
do_add: "Добавьте музыку в плей-лист"
|
||||||
do_login: "Авторизуйтесь, пожалуйста. Это действительно просто."
|
do_login: "Авторизуйтесь, пожалуйста. Это действительно просто."
|
||||||
repeat: "Повторять"
|
|
||||||
shuffle: "Перемешать"
|
|
||||||
do_empty: "Очистить"
|
|
||||||
hello: "Привет"
|
hello: "Привет"
|
||||||
settings: "Настройки"
|
settings: "Настройки"
|
||||||
your_ad_here: "Здесь не могла бы<br/>быть Ваша реклама"
|
your_ad_here: "Здесь не могла бы<br/>быть Ваша реклама"
|
||||||
|
@ -49,3 +46,6 @@ ru:
|
||||||
|
|
||||||
player:
|
player:
|
||||||
add: "Добавить в плей-лист"
|
add: "Добавить в плей-лист"
|
||||||
|
repeat: "ПОВТОРЯТЬ"
|
||||||
|
shuffle: "ПЕРЕМЕШАТЬ"
|
||||||
|
do_empty: "ОЧИСТИТЬ"
|
Loading…
Reference in New Issue