diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-06-25 10:48:28 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-06-25 10:48:28 +0000 |
commit | e4ccbf28c815fefeeb90c45524feea7b57e5a6ae (patch) | |
tree | 2aa7c9f3e53145a3c037166772f87ccdc62c3ea4 | |
parent | 17928b73473c0e15d51969a1426253b70af9eb09 (diff) | |
download | rails-e4ccbf28c815fefeeb90c45524feea7b57e5a6ae.tar.gz rails-e4ccbf28c815fefeeb90c45524feea7b57e5a6ae.tar.bz2 rails-e4ccbf28c815fefeeb90c45524feea7b57e5a6ae.zip |
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]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1503 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/javascripts/prototype.js | 6 | ||||
-rw-r--r-- | railties/html/javascripts/prototype.js | 6 |
3 files changed, 6 insertions, 8 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index ea569c1c7c..c3a922604e 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* 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] * Added named routes (NEEDS BETTER DESCRIPTION) #1434 [Nicholas Seckar] diff --git a/actionpack/lib/action_view/helpers/javascripts/prototype.js b/actionpack/lib/action_view/helpers/javascripts/prototype.js index b7647f2714..ca772aa8fa 100644 --- a/actionpack/lib/action_view/helpers/javascripts/prototype.js +++ b/actionpack/lib/action_view/helpers/javascripts/prototype.js @@ -357,13 +357,11 @@ Form.Element = { Form.Element.Serializers = { input: function(element) { switch (element.type.toLowerCase()) { - case 'hidden': - case 'password': - case 'text': - return Form.Element.Serializers.textarea(element); case 'checkbox': case 'radio': return Form.Element.Serializers.inputSelector(element); + default: + return Form.Element.Serializers.textarea(element); } return false; }, diff --git a/railties/html/javascripts/prototype.js b/railties/html/javascripts/prototype.js index b7647f2714..ca772aa8fa 100644 --- a/railties/html/javascripts/prototype.js +++ b/railties/html/javascripts/prototype.js @@ -357,13 +357,11 @@ Form.Element = { Form.Element.Serializers = { input: function(element) { switch (element.type.toLowerCase()) { - case 'hidden': - case 'password': - case 'text': - return Form.Element.Serializers.textarea(element); case 'checkbox': case 'radio': return Form.Element.Serializers.inputSelector(element); + default: + return Form.Element.Serializers.textarea(element); } return false; }, |