diff --git a/app/assets/javascripts/me-add-to-playlist.coffee b/app/assets/javascripts/me-add-to-playlist.coffee index 5bdc7e3..0e91aa6 100644 --- a/app/assets/javascripts/me-add-to-playlist.coffee +++ b/app/assets/javascripts/me-add-to-playlist.coffee @@ -135,10 +135,10 @@ later_markers.first().before(new_marker) else $('#markers').append(new_marker) - offset_percent = if isNaN(parseFloat(offset)) then 0 else Math.min(1, offset / currentPlayer.media.duration) - offset = Math.round($('.mejs-time-total').width() * offset_percent)+'px' + offset_percent = if isNaN(parseFloat(offset)) then 0 else Math.min(100,Math.round(100*offset / currentPlayer.media.duration)) + marker_title = String(response.marker.title).replace(/"/g, '"')+' ['+offset_str+']' - $('.mejs-time-rail').append('') + $('.mejs-time-total').append('') new_marker.find('button.edit_marker').click(enableMarkerEditForm); new_marker.find('.edit_avalon_marker').on('ajax:success', handle_edit_save).on 'ajax:error', (e, xhr, status, error) -> alert 'Request failed.' diff --git a/app/assets/stylesheets/me-add-to-playlist.css.scss.erb b/app/assets/stylesheets/me-add-to-playlist.css.scss.erb index 749260b..fcc98db 100644 --- a/app/assets/stylesheets/me-add-to-playlist.css.scss.erb +++ b/app/assets/stylesheets/me-add-to-playlist.css.scss.erb @@ -1,3 +1,9 @@ +.scrubber-marker { + width: 1em !important; + bottom: 0; + transform: translate(-50%,100%) +} + .mejs-controls .mejs-add-to-playlist button, .mejs-controls .mejs-add-marker-to-playlist-item button { background-size: 23pt !important; background-position: 50% !important;