Skip to content

Commit

Permalink
Upgrade to Prototype 1.4.0_rc1
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2672 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
sstephenson committed Oct 18, 2005
1 parent 966616d commit d82c51b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions actionpack/lib/action_view/helpers/javascripts/prototype.js
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -11,7 +11,7 @@
/*--------------------------------------------------------------------------*/

var Prototype = {
Version: '1.4.0_rc0',
Version: '1.4.0_rc1',

emptyFunction: function() {},
K: function(x) {return x}
Expand Down Expand Up @@ -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);

Expand All @@ -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);
}
},

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit d82c51b

Please sign in to comment.