Permalink
Browse files

Added support for the queue option on visual_effect

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2807 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent d8f0a3f commit 56ae4ab54783dd337bd909866b1461b306ceb175 @madrobby madrobby committed Oct 29, 2005
View
@@ -1,5 +1,7 @@
*SVN*
+* Added support for the queue option on visual_effect [Thomas Fuchs]
+
* Update script.aculo.us to V1.5_rc4 [Thomas Fuchs]
* Fix that render :text didn't interpolate instance variables #2629, #2626 [skaes]
@@ -377,6 +377,7 @@ def observe_form(form_id, options = {})
# http://script.aculo.us for more documentation.
def visual_effect(name, element_id = false, js_options = {})
element = element_id ? "'#{element_id}'" : "element"
+ js_options[:queue] = "'#{js_options[:queue]}'" if js_options[:queue]
"new Effect.#{name.to_s.camelize}(#{element},#{options_for_javascript(js_options)});"
end
@@ -125,6 +125,7 @@ def test_effect
assert_equal "new Effect.Highlight('posts',{});", visual_effect(:highlight, :posts)
assert_equal "new Effect.Fade('fademe',{duration:4.0});", visual_effect(:fade, "fademe", :duration => 4.0)
assert_equal "new Effect.Shake(element,{});", visual_effect(:shake)
+ assert_equal "new Effect.DropOut('dropme',{queue:'end'});", visual_effect(:drop_out, 'dropme', :queue => :end)
end
def test_sortable_element

0 comments on commit 56ae4ab

Please sign in to comment.