1
0
Fork 0

Playlist remove button fixes

This commit is contained in:
magnolia-fan 2011-06-29 04:02:42 +04:00
parent 088435452b
commit 9d7770b282
4 changed files with 9 additions and 12 deletions

View File

@ -66,11 +66,9 @@ class Player
</div>
</li>'
$('.playlist').html($('.playlist-tracks')).scrollbar
$('.playlist').html($('.playlist-tracks')).scrollbar()
$('.playlist-tracks').sortable axis: 'y', handle: '.dragbox'
console.log _player.hasTrack()
console.log initial_count
if autoplay
_player.setTrack($('.playlist-tracks li').last().attr('id').split('i')[1])
else if initial_count == 0 and not _player.hasTrack()
@ -203,8 +201,8 @@ $('#empty-playlist').live 'click', ->
# Playlist Actions
$('.playlist-tracks li .fade, .playlist-tracks li .duration, .playlist-tracks li .remove').live 'mouseover mouseout', (e) ->
if e.type == 'mouseover'
$('.playlist-tracks li .fade, .playlist-tracks li .duration, .playlist-tracks li .remove').live 'mousemove mouseover mouseout', (e) ->
if e.type in ['mouseover', 'mousemove'] and ($(window).width() - e.clientX) < 60
$(this).parent().find('.duration').hide()
$(this).parent().find('.remove').show()
else

View File

@ -75,13 +75,11 @@ Player = (function() {
</div>\
</li>');
}
$('.playlist').html($('.playlist-tracks')).scrollbar;
$('.playlist').html($('.playlist-tracks')).scrollbar();
$('.playlist-tracks').sortable({
axis: 'y',
handle: '.dragbox'
});
console.log(_player.hasTrack());
console.log(initial_count);
if (autoplay) {
_player.setTrack($('.playlist-tracks li').last().attr('id').split('i')[1]);
} else if (initial_count === 0 && !_player.hasTrack()) {
@ -241,8 +239,9 @@ $('#empty-playlist').live('click', function() {
}
return false;
});
$('.playlist-tracks li .fade, .playlist-tracks li .duration, .playlist-tracks li .remove').live('mouseover mouseout', function(e) {
if (e.type === 'mouseover') {
$('.playlist-tracks li .fade, .playlist-tracks li .duration, .playlist-tracks li .remove').live('mousemove mouseover mouseout', function(e) {
var _ref;
if (((_ref = e.type) === 'mouseover' || _ref === 'mousemove') && ($(window).width() - e.clientX) < 60) {
$(this).parent().find('.duration').hide();
$(this).parent().find('.remove').show();
} else {

View File

@ -157,7 +157,7 @@ $icons_dir: "/images/icns/";
top: 0;
right: 0;
z-index: 20;
width: 100px;
width: 80px;
height: 26px;
@include alpha_gradient(32, 32, 32, '202020');
}

View File

@ -124,7 +124,7 @@
top: 0;
right: 0;
z-index: 20;
width: 100px;
width: 80px;
height: 26px;
background: -moz-linear-gradient(left, rgba(32, 32, 32, 0) 0%, #202020 50%, #202020 100%);
background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(32, 32, 32, 0)), color-stop(50%, #202020), color-stop(100%, #202020));