diff options
author | Sam Stephenson <sam@37signals.com> | 2005-10-18 02:48:33 +0000 |
---|---|---|
committer | Sam Stephenson <sam@37signals.com> | 2005-10-18 02:48:33 +0000 |
commit | d82c51bb16590090103f3d954e48fddd12c8ad45 (patch) | |
tree | 008bf1e531df2e85bf1abbb29a39ffbd3e938578 | |
parent | 966616db45de5210f1aa562f87dfced1496b22e9 (diff) | |
download | rails-d82c51bb16590090103f3d954e48fddd12c8ad45.tar.gz rails-d82c51bb16590090103f3d954e48fddd12c8ad45.tar.bz2 rails-d82c51bb16590090103f3d954e48fddd12c8ad45.zip |
Upgrade to Prototype 1.4.0_rc1
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2672 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | actionpack/lib/action_view/helpers/javascripts/prototype.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/helpers/javascripts/prototype.js b/actionpack/lib/action_view/helpers/javascripts/prototype.js index 120f4cb988..7fa1c7e33b 100644 --- a/actionpack/lib/action_view/helpers/javascripts/prototype.js +++ b/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); |