From e4ccbf28c815fefeeb90c45524feea7b57e5a6ae Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 25 Jun 2005 10:48:28 +0000 Subject: 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 --- actionpack/CHANGELOG | 2 ++ actionpack/lib/action_view/helpers/javascripts/prototype.js | 6 ++---- 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; }, -- cgit v1.2.3