Dragging fixes
This commit is contained in:
		
							parent
							
								
									3ef7caf20d
								
							
						
					
					
						commit
						2a5a6c12a0
					
				@ -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]
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
@ -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 {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user