Sha256: 5307e10e6604f2f803c185397277f59026b622e0f5f2d898541a9d0fb70a400b

Contents?: true

Size: 420 Bytes

Versions: 5

Compression:

Stored size: 420 Bytes

Contents

module Nitro

# Add Scriptaculous methods to the ScriptGenerator.

module ScriptGenerator

  def visual_effect(name, id = false, options = {})
    element = id ? "'#{id}'" : "element"
    options[:queue] = "'#{options[:queue]}'" if options[:queue]
    js "new Effect.#{name.to_s.camelize}(#{element}, #{hash_to_js(options)});"
  end
  alias_method :effect, :visual_effect

end

end

# * George Moschovitis <gm@navel.gr>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
nitro-0.27.0 lib/nitro/helper/javascript/scriptaculous.rb
nitro-0.28.0 lib/nitro/helper/javascript/scriptaculous.rb
nitro-0.29.0 lib/nitro/helper/javascript/scriptaculous.rb
nitro-0.30.0 lib/nitro/helper/javascript/scriptaculous.rb
nitro-0.31.0 lib/nitro/helper/javascript/scriptaculous.rb