Permalink
Browse files

Upgrade to Prototype 1.4.0_rc1

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2672 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 966616d commit d82c51bb16590090103f3d954e48fddd12c8ad45 @sstephenson sstephenson committed Oct 18, 2005
Showing with 7 additions and 5 deletions.
  1. +7 −5 actionpack/lib/action_view/helpers/javascripts/prototype.js
View
12 actionpack/lib/action_view/helpers/javascripts/prototype.js
@@ -1,4 +1,4 @@
-/* Prototype JavaScript framework, version 1.4.0_rc0
+/* Prototype JavaScript framework, version 1.4.0_rc1
* (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_rc1',
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,7 +785,7 @@ 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))
elements.push(child);

0 comments on commit d82c51b

Please sign in to comment.