diff options
Diffstat (limited to 'actionpack/lib/action_view/helpers/scriptaculous_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/scriptaculous_helper.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/scriptaculous_helper.rb b/actionpack/lib/action_view/helpers/scriptaculous_helper.rb index 105d89d337..fac628caef 100644 --- a/actionpack/lib/action_view/helpers/scriptaculous_helper.rb +++ b/actionpack/lib/action_view/helpers/scriptaculous_helper.rb @@ -38,6 +38,23 @@ module ActionView js_options[:queue] = "'#{js_options[:queue]}'" if js_options[:queue] "new Effect.#{name.to_s.camelize}(#{element},#{options_for_javascript(js_options)});" end + + # Needs more work so + isn't required for concation of effects. Currently, you have to do: + # + # page.parallel_effects do + # page.visual_effect(:highlight, 'dom_id') + + # page.visual_effect(:fade, 'dom_id') + # end + # + # ...naturally, it would be better just to do + # + # page.parallel_effects do + # page.visual_effect :highlight, 'dom_id' + # page.visual_effect :fade, 'dom_id' + # end + def parallel_effects(js_options = {}) #:nodoc: + "new Effect.Parallel([" + yield + "], #{options_for_javascript(js_options)})" + end # Makes the element with the DOM ID specified by +element_id+ sortable # by drag-and-drop and make an Ajax call whenever the sort order has |