aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorSam Stephenson <sam@37signals.com>2005-10-26 22:07:27 +0000
committerSam Stephenson <sam@37signals.com>2005-10-26 22:07:27 +0000
commitf15819e8f0cece48ccd5117a37cf6d37374d1bb1 (patch)
treecb1105f01e88132643458b35774f68b3093eec97 /railties
parentd6461bf9f5e82195d27eb198bcaef2b5a92464b8 (diff)
downloadrails-f15819e8f0cece48ccd5117a37cf6d37374d1bb1.tar.gz
rails-f15819e8f0cece48ccd5117a37cf6d37374d1bb1.tar.bz2
rails-f15819e8f0cece48ccd5117a37cf6d37374d1bb1.zip
Bump to Prototype 1.4.0_rc2
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2755 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r--railties/html/javascripts/prototype.js24
1 files changed, 13 insertions, 11 deletions
diff --git a/railties/html/javascripts/prototype.js b/railties/html/javascripts/prototype.js
index 120f4cb988..0ba70a77da 100644
--- a/railties/html/javascripts/prototype.js
+++ b/railties/html/javascripts/prototype.js
@@ -1,4 +1,4 @@
-/* Prototype JavaScript framework, version 1.4.0_rc0
+/* Prototype JavaScript framework, version 1.4.0_rc2
* (c) 2005 Sam Stephenson <sam@conio.net>
*
* THIS FILE IS AUTOMATICALLY GENERATED. When sending patches, please diff
@@ -11,7 +11,7 @@
/*--------------------------------------------------------------------------*/
var Prototype = {
- Version: '1.4.0_rc0',
+ Version: '1.4.0_rc2',
emptyFunction: function() {},
K: function(x) {return x}
@@ -607,8 +607,8 @@ Ajax.Request.prototype = Object.extend(new Ajax.Base(), {
try {
this.url = url;
- if (this.options.method == 'get')
- this.url += '?' + parameters;
+ if (this.options.method == 'get' && parameters.length > 0)
+ this.url += (this.url.match(/\?/) ? '&' : '?') + parameters;
Ajax.Responders.dispatch('onCreate', this, this.transport);
@@ -626,6 +626,8 @@ Ajax.Request.prototype = Object.extend(new Ajax.Base(), {
this.transport.send(this.options.method == 'post' ? body : null);
} catch (e) {
+ (this.options.onException || Prototype.emptyFunction)(this, e);
+ Ajax.Responders.dispatch('onException', this, e);
}
},
@@ -783,9 +785,9 @@ Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), {
}
});
document.getElementsByClassName = function(className, parentElement) {
- var children = (document.body || $(parentElement)).getElementsByTagName('*');
+ var children = ($(parentElement) || document.body).getElementsByTagName('*');
return $A(children).inject([], function(elements, child) {
- if (Element.hasClassName(child, className))
+ if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
elements.push(child);
return elements;
});
@@ -1129,7 +1131,7 @@ var Form = {
},
getElements: function(form) {
- var form = $(form);
+ form = $(form);
var elements = new Array();
for (tagName in Form.Element.Serializers) {
@@ -1141,7 +1143,7 @@ var Form = {
},
getInputs: function(form, typeName, name) {
- var form = $(form);
+ form = $(form);
var inputs = form.getElementsByTagName('input');
if (!typeName && !name)
@@ -1177,7 +1179,7 @@ var Form = {
},
focusFirstElement: function(form) {
- var form = $(form);
+ form = $(form);
var elements = Form.getElements(form);
for (var i = 0; i < elements.length; i++) {
var element = elements[i];
@@ -1195,7 +1197,7 @@ var Form = {
Form.Element = {
serialize: function(element) {
- var element = $(element);
+ element = $(element);
var method = element.tagName.toLowerCase();
var parameter = Form.Element.Serializers[method](element);
@@ -1205,7 +1207,7 @@ Form.Element = {
},
getValue: function(element) {
- var element = $(element);
+ element = $(element);
var method = element.tagName.toLowerCase();
var parameter = Form.Element.Serializers[method](element);