Made play/pause and scrubber look even more disabled when disabled.

This commit is contained in:
Nick Winter 2014-03-27 15:07:37 -07:00
parent 2677751dc5
commit b0b37aa9d8
2 changed files with 7 additions and 2 deletions
app
styles/play/level
views/play/level

View file

@ -58,6 +58,8 @@
li:hover li:hover
background: #add8e6 background: #add8e6
#play-button.disabled i
@include opacity(0.5)
#play-button.playing i.icon-pause #play-button.playing i.icon-pause
display: inline-block display: inline-block
#play-button.paused i.icon-play #play-button.paused i.icon-play
@ -96,6 +98,9 @@
border-radius: 0 border-radius: 0
border: 0 border: 0
&.disabled
cursor: default
.progress-bar .progress-bar
@include transition(width .0s linear) @include transition(width .0s linear)
position: relative position: relative

View file

@ -58,11 +58,11 @@ module.exports = class PlaybackView extends View
onSetLetterbox: (e) -> onSetLetterbox: (e) ->
if e.on if e.on
$('.scrubber .progress', @$el).slider('disable', true) $('.scrubber .progress', @$el).slider('disable', true).addClass('disabled')
$('#play-button', @$el).addClass('disabled') $('#play-button', @$el).addClass('disabled')
$('.scrubber-handle', @$el).css('visibility', 'hidden') $('.scrubber-handle', @$el).css('visibility', 'hidden')
else else
$('.scrubber .progress', @$el).slider('enable', true) $('.scrubber .progress', @$el).slider('enable', true).removeClass('disabled')
$('#play-button', @$el).removeClass('disabled') $('#play-button', @$el).removeClass('disabled')
$('.scrubber-handle', @$el).css('visibility', 'visible') $('.scrubber-handle', @$el).css('visibility', 'visible')
@disabled = e.on @disabled = e.on