From d82c51bb16590090103f3d954e48fddd12c8ad45 Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Tue, 18 Oct 2005 02:48:33 +0000 Subject: Upgrade to Prototype 1.4.0_rc1 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2672 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/javascripts/prototype.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'actionpack/lib/action_view/helpers/javascripts') 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 * * 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); -- cgit v1.2.3