diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-01-03 04:11:51 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-01-03 04:11:51 +0000 |
commit | 10cf9ecafc4b1953cf8289e530cab7a0a751b9c4 (patch) | |
tree | 53c4ad06e6b897d3bebd368e1701d0b264a816e9 /railties/html/javascripts/controls.js | |
parent | 987d9dbf31b6bb4fe1547bca17af920aa3d72ac5 (diff) | |
download | rails-10cf9ecafc4b1953cf8289e530cab7a0a751b9c4.tar.gz rails-10cf9ecafc4b1953cf8289e530cab7a0a751b9c4.tar.bz2 rails-10cf9ecafc4b1953cf8289e530cab7a0a751b9c4.zip |
Added assignment of the Autocompleter object created by JavaScriptMacroHelper#auto_complete_field to a local javascript variables [DHH] Added :on option for PrototypeHelper#observe_field that allows you to specify a different callback hook to have the observer trigger on [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3378 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/html/javascripts/controls.js')
-rw-r--r-- | railties/html/javascripts/controls.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/html/javascripts/controls.js b/railties/html/javascripts/controls.js index 3307f2e2fa..86f34a24f7 100644 --- a/railties/html/javascripts/controls.js +++ b/railties/html/javascripts/controls.js @@ -152,6 +152,12 @@ Autocompleter.Base.prototype = { setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000); }, + activate: function() { + this.changed = false; + this.hasFocus = true; + this.getUpdatedChoices(); + }, + onHover: function(event) { var element = Event.findElement(event, 'LI'); if(this.index != element.autocompleteIndex) |