diff options
author | Thomas Fuchs <thomas@fesch.at> | 2005-10-29 15:01:39 +0000 |
---|---|---|
committer | Thomas Fuchs <thomas@fesch.at> | 2005-10-29 15:01:39 +0000 |
commit | 56ae4ab54783dd337bd909866b1461b306ceb175 (patch) | |
tree | 9c5bd62a555ec287e464d7273d5744557ad18884 /actionpack | |
parent | d8f0a3f93ca80fa64435dde8100d0eae6110207c (diff) | |
download | rails-56ae4ab54783dd337bd909866b1461b306ceb175.tar.gz rails-56ae4ab54783dd337bd909866b1461b306ceb175.tar.bz2 rails-56ae4ab54783dd337bd909866b1461b306ceb175.zip |
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
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/javascript_helper.rb | 1 | ||||
-rw-r--r-- | actionpack/test/template/javascript_helper_test.rb | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 453800dab1..f9611126bf 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -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] diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index 5637d7f5ce..e7109e92e8 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -377,6 +377,7 @@ module ActionView # 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 diff --git a/actionpack/test/template/javascript_helper_test.rb b/actionpack/test/template/javascript_helper_test.rb index 30528e1cc9..b09c055af5 100644 --- a/actionpack/test/template/javascript_helper_test.rb +++ b/actionpack/test/template/javascript_helper_test.rb @@ -125,6 +125,7 @@ class JavaScriptHelperTest < Test::Unit::TestCase 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 |