Sha256: 6ada32839eec67acee6e9f33149f0c4433495a8e8d2433678c776604b446e0e5

Contents?: true

Size: 1.01 KB

Versions: 11

Compression:

Stored size: 1.01 KB

Contents

window.Alchemy = {} if typeof(window.Alchemy) is 'undefined'

Alchemy.Spinner =

  DEFAULTS:
    lines: 5
    corners: 0.75
    rotate: 54
    trail: 75
    speed: 1.25
    hwaccel: true

  tiny: (opts) ->
    defaults = $.extend({}, Alchemy.Spinner.DEFAULTS,
      length: 2
      width: 1
      radius: 1
    )
    new Spinner($.extend(defaults, opts))

  small: (opts) ->
    defaults = $.extend({}, Alchemy.Spinner.DEFAULTS,
      length: 2
      width: 3
      radius: 2
    )
    new Spinner($.extend(defaults, opts))

  medium: (opts) ->
    defaults = $.extend({}, Alchemy.Spinner.DEFAULTS,
      length: 4
      width: 6
      radius: 4
    )
    new Spinner($.extend(defaults, opts))

  large: (opts) ->
    defaults = $.extend({}, Alchemy.Spinner.DEFAULTS,
      length: 8
      width: 12
      radius: 8
    )
    new Spinner($.extend(defaults, opts))

  watch: (scope) ->
    $('a.spinner', scope).click ->
      spinner = Alchemy.Spinner.tiny()
      spinner.spin(this)
      $(this).css('background': 'none').off('click')

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
alchemy_cms-2.9.1 app/assets/javascripts/alchemy/alchemy.spinner.js.coffee
alchemy_cms-2.9.0 app/assets/javascripts/alchemy/alchemy.spinner.js.coffee
alchemy_cms-2.8.3 app/assets/javascripts/alchemy/alchemy.spinner.js.coffee
alchemy_cms-2.7.5 app/assets/javascripts/alchemy/alchemy.spinner.js.coffee
alchemy_cms-2.7.4 app/assets/javascripts/alchemy/alchemy.spinner.js.coffee
alchemy_cms-2.8.2 app/assets/javascripts/alchemy/alchemy.spinner.js.coffee
alchemy_cms-2.8.1 app/assets/javascripts/alchemy/alchemy.spinner.js.coffee
alchemy_cms-2.7.3 app/assets/javascripts/alchemy/alchemy.spinner.js.coffee
alchemy_cms-2.7.2 app/assets/javascripts/alchemy/alchemy.spinner.js.coffee
alchemy_cms-2.7.1 app/assets/javascripts/alchemy/alchemy.spinner.js.coffee
alchemy_cms-2.7.0 app/assets/javascripts/alchemy/alchemy.spinner.js.coffee