Permalink
Browse files

add color to the first part of the track slider. closes #15

  • Loading branch information...
1 parent 8e22ebb commit 61a1474ef2fac7e2ee0265f05d7d724b013c0178 @andrewrk committed Oct 15, 2012
Showing with 9 additions and 0 deletions.
  1. +6 −0 src/client/app.co
  2. +3 −0 src/client/styles/app.styl
  3. BIN src/public/img/bright-10.png
View
@@ -1318,6 +1318,10 @@ function queueSelection (event)
socket.emit 'Chat', message
return false
+!function updateSliderUi (value)
+ percent = value * 100
+ $track_slider.css('background-size', "#percent% 100%")
+
!function setUpNowPlayingUi
actions =
toggle: togglePlayback
@@ -1336,9 +1340,11 @@ function queueSelection (event)
min: 0
max: 1
change: !(event, ui) ->
+ updateSliderUi(ui.value)
return if not event.originalEvent?
mpd.seek ui.value * mpd.status.time
slide: !(event, ui) ->
+ updateSliderUi(ui.value)
$nowplaying_elapsed.html Util.formatTime(ui.value * mpd.status.time)
start: !(event, ui) -> user_is_seeking := true
stop: !(event, ui) -> user_is_seeking := false
@@ -30,6 +30,9 @@ body
#track-slider
margin 10px 10px 5px
+ background url("img/bright-10.png") left no-repeat
+ background-size 0% 100%
+
#nowplaying
margin 6px auto
text-align center
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 61a1474

Please sign in to comment.