Sha256: 3671d38e15fc76c8f928f7293cdb0d27ed38a18cc6692248010adbe51e72a17d

Contents?: true

Size: 906 Bytes

Versions: 1

Compression:

Stored size: 906 Bytes

Contents

ajax_spinner = null

ajax_spinner_opts =
    lines: 13   # The number of lines to draw
    length: 7   # The length of each line
    width: 3    # The line thickness
    radius: 10  # The radius of the inner circle
    corners: 1  # Corner roundness (0..1)
    rotate: 0   # The rotation offset
    direction: 1    # 1: clockwise, -1: counterclockwise
    color: '#fff'   # #rgb or #rrggbb or array of colors
    speed: 1    # Rounds per second
    trail: 60   # Afterglow percentage
    shadow: false   # Whether to render a shadow
    hwaccel: false  # Whether to use hardware acceleration

# Shows ajax spinner in a +target+ element specified by selector.
#
( exports ? this ).ajax_spinner_show = (target) ->
    target = $(target).get( 0 )
    ajax_spinner = new Spinner( ajax_spinner_opts ).spin target

# Hides current ajax spinner.
#
( exports ? this ).ajax_spinner_hide = ->
    ajax_spinner.stop()

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
aerogel-admin-1.4.4 assets/javascripts/utils/ajax-spinner.js.coffee