Playlist draft
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
$ ->
|
||||
$(".navbar-search input").focus ->
|
||||
$(this).animate(width: 249)
|
||||
$(".player").animate(width: 368)
|
||||
$(".navbar-search input").blur ->
|
||||
$(this).animate(width: 99)
|
||||
$(".player").animate(width: 518)
|
||||
|
||||
window.desired = $(".navbar-search input").autocomplete
|
||||
serviceUrl: "/api/search/complete.json"
|
||||
onSelect: (selected) ->
|
||||
Backbone.history.navigate("/search/"+selected.replace(/\s/g, "+"), true)
|
||||
@@ -7,6 +7,8 @@ $ ->
|
||||
BH.Player.pause()
|
||||
$(".player .controls .next").live "click", (e) ->
|
||||
BH.Player.next()
|
||||
$(".player .controls .playlist-toggle").live "click", (e) ->
|
||||
$(".playlist").toggle()
|
||||
|
||||
$(".player .move-it")
|
||||
.live "mousedown", (e) ->
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
$ ->
|
||||
$(".album-play").live "mouseup", (e) ->
|
||||
$(this).parents(".album").find(".tracks li:first .track-play").trigger("mouseup")
|
||||
$(".album-add").live "mouseup", (e) ->
|
||||
$(this).parents(".album").find(".tracks li .track-add").trigger("mouseup")
|
||||
@@ -1,9 +1,16 @@
|
||||
$ ->
|
||||
$(".track-play").live "click", (e) ->
|
||||
$(".track-play").live "mouseup", (e) ->
|
||||
e.preventDefault()
|
||||
id = parseInt($(this).parent().data("id"), 10)
|
||||
BH.Player.playlist_on = false
|
||||
BH.Player.tracks.get(id).play()
|
||||
$(".track-pause").live "click", (e) ->
|
||||
|
||||
$(".track-pause").live "mouseup", (e) ->
|
||||
e.preventDefault()
|
||||
id = parseInt($(this).parent().data("id"), 10)
|
||||
BH.Player.tracks.get(id).pause()
|
||||
|
||||
$(".track-add").live "mouseup", (e) ->
|
||||
e.preventDefault()
|
||||
id = parseInt($(this).parent().data("id"), 10)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user