From 043bee3338c83b0c409b5217d2f83aa732c0871a Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Wed, 8 Mar 2006 05:21:27 +0000 Subject: Re-added mixed-in helper methods for the JavascriptGenerator. Moved JavascriptGenerators methods to a module that is mixed in after the helpers are added. Also fixed that variables set in the enumeration methods like #collect are set correctly. Documentation added for the enumeration methods [Rick Olson]. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3814 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 7 + .../lib/action_view/helpers/prototype_helper.rb | 554 +++++++++++---------- actionpack/test/controller/new_render_test.rb | 17 +- actionpack/test/template/prototype_helper_test.rb | 51 +- 4 files changed, 342 insertions(+), 287 deletions(-) diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 7ebfb81a1a..ac34e2ef21 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,12 @@ *SVN* +* Re-added mixed-in helper methods for the JavascriptGenerator. Moved JavascriptGenerators methods to a module that is mixed in after the helpers are added. Also fixed that variables set in the enumeration methods like #collect are set correctly. Documentation added for the enumeration methods [Rick Olson]. Examples: + + page.select('#items li').collect('items') do |element| + element.hide + end + # => var items = $$('#items li').collect(function(value, index) { return value.hide(); }); + * Added plugin support for parameter parsers, which allows for better support for REST web services. By default, posts submitted with the application/xml content type is handled by creating a XmlSimple hash with the same name as the root element of the submitted xml. More handlers can easily be registered like this: # Assign a new param parser to a new content type diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb index 9a58f41821..113ddc8739 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -360,267 +360,287 @@ module ActionView end end - # JavaScriptGenerator generates blocks of JavaScript code that allow you - # to change the content and presentation of multiple DOM elements. Use - # this in your Ajax response bodies, either in a