diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index c3a922604e1bdc6ab78b96ad68d1e6fbbb0a795f..ae8de12988df283d226f121c70bcaaa65d8162ed 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Added script.aculo.us Javascripts (controls.js, dragdrop.js, effects.js) (NEEDS MORE DESCRIPTION) #1509 [Thomas Fuchs] + * Fixed prototype to consider all fields it doesn't know as text (such as Safari's search) just like the browser in its serialization #1497 [Sean Treadway] * Improved performance of Routes generation by a factor of 5 #1434 [Nicholas Seckar] diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index d5e2a8b2dccb7fcae822312794d652dda7209b35..31c15d222c8ad1d09dc2046d435f717c52fe238d 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -16,7 +16,8 @@ module Helpers # the use of form_remote_tag. module JavascriptHelper unless const_defined? :CALLBACKS - CALLBACKS = [:uninitialized, :loading, :loaded, :interactive, :complete] + CALLBACKS = [ :uninitialized, :loading, :loaded, :interactive, :complete ] + AJAX_OPTIONS = [ :url, :asynchronous, :method, :insertion, :form, :with ].concat(CALLBACKS) JAVASCRIPT_PATH = File.join(File.dirname(__FILE__), 'javascripts') end @@ -146,8 +147,10 @@ def remote_function(options) #:nodoc: for now return function end - # Includes the Action Pack Javascript library inside a single ' end # Observes the field with the DOM ID specified by +field_id+ and makes - # an Ajax when its contents have changed. + # an Ajax call when its contents have changed. # # Required +options+ are: # :frequency:: The frequency (in seconds) at which changes to @@ -190,13 +203,111 @@ def observe_field(field_id, options = {}) def observe_form(form_id, options = {}) build_observer('Form.Observer', form_id, options) end + + + # Adds Ajax autocomplete functionality to the text input field with the + # DOM ID specified by +field_id+. + # + # This function expects that the called action returns a HTML