1
0
Fork 0

Dragging fixes

This commit is contained in:
magnolia-fan 2011-12-07 09:39:55 +04:00
parent 3ef7caf20d
commit 2a5a6c12a0
3 changed files with 21 additions and 3 deletions

View File

@ -225,7 +225,10 @@ class window.Player
@library[track.id] = track
$('.track').draggable
helper: 'clone'
connectToSortable: '.playlist'
connectToSortable: '.playlist',
drag: (e, ui) ->
$('.ui-draggable-dragging').addClass('dragging-track')
true
false
@ -270,7 +273,8 @@ $ ->
if $(ui.item).prop("tagName") == "TR"
c = _player.generateTrackHtml(_player.library[$(ui.item).find('.s-add').data('id')])
ui.item.replaceWith(c.html)
false
return false
true
$('.playlist').droppable
accept: '.track'
drop: (e, ui) ->

View File

@ -62,7 +62,7 @@ class window.VkontakteMusic
this.trim string
.replace(/,\./, ' ')
.match(/[a-zA-Zа-яА-ЯёЁ0-9\s-']+/g).join(' ')
.replace(/(?:^|\s)?The\s/i, '')
.replace(/(?:^|\s)The\s/i, ' ')
.replace(/\(.*\)/i, '')
.split('/')[0]

View File

@ -27,6 +27,20 @@
cursor: pointer;
}
.dragging-track {
width: 278px !important;
background-color: #fff !important;
td {
border: none;
padding-top: 13px;
padding-bottom: 11px;
&:first-child {
width: 220px;
}
}
border: #ccc 1px solid;
}
.album {
margin-bottom: 20px;
.art {