Update bootstrap, nicer add-remove buttons

This commit is contained in:
magnolia-fan
2011-11-26 19:25:51 +04:00
parent 9a79ae0527
commit f0e7e8f7a1
6 changed files with 370 additions and 292 deletions
+1 -10
View File
@@ -61,7 +61,7 @@ class window.Player
$('.playlist').append '
<li id="i' +Math.round(Math.random() * 999999)+ '" data-id="'+item.id+'" class="'+item_class+'">
<div class="song-duration">' +duration+ '</div>
<div class="remove">remove</div>
<div class="label important remove">remove</div>
<div class="artist-name">' +item.artist+ '</div>
<div class="song-title">' +item.name+ '</div>
</li>'
@@ -240,15 +240,6 @@ $('.do_empty').live 'click', ->
# Playlist Actions
$('.playlist li .artist-name, .playlist li .song-title, .playlist li .song-duration, .playlist li .remove').live 'mousemove mouseover mouseout', (e) ->
if e.type in ['mouseover', 'mousemove'] and $('.playlist').offset().left + $('.playlist').outerWidth() - e.clientX < 60
$(this).parent().find('.song-duration').hide()
$(this).parent().find('.remove').show()
else
$(this).parent().find('.remove').hide()
$(this).parent().find('.song-duration').show()
false
$('.playlist li .remove').live 'click', (e) ->
$li = $(this).parent()
if $li.hasClass 'now'