Commit a470d9f4 authored by Vitor Freitas's avatar Vitor Freitas
Browse files

minor changes

parent 2d7815dc
......@@ -130,13 +130,31 @@ $ ->
cache: false
success: (data) ->
$('div.players ul').html data
$('div.players ul li').loadSheetControl();
$('div.players ul li button').loadSheetControl()
complete:
window.setTimeout $.fn.loadPlayers, 5000
$.fn.loadPlayers()
$.fn.closeSheetControl = ->
$(this).click ->
$('div.sheet').slideUp 'fast', ->
$('div.players').slideDown('fast')
$('div.sheet').hide()
$.fn.loadSheetControl = ->
$(this).click ->
$('div.players').slideUp('fast')
$('div.players').slideUp 'fast', ->
$('div.sheet').slideDown('fast')
$.ajax
url: '/users/' + $(this).attr('data-id')
cache: false
beforeSend: ->
$('div.sheet').html 'Loading...'
success: (data) ->
$('div.sheet').html data
$('div.sheet button.close').closeSheetControl()
error: ->
$('div.players').slideDown('fast')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment