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
+6 -2
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) ->
@@ -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]