From 5d3fd6f3b752a456b19752cba7e3d38a1a9e665c Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Tue, 21 Aug 2007 16:18:07 +0000 Subject: [PATCH] prototype: Fix Ajax.PeriodicalUpdater for compatibility with Ajax.Response. Closes #9321. --- CHANGELOG | 2 ++ src/ajax.js | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 8833204..de207b3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fix Ajax.PeriodicalUpdater for compatibility with Ajax.Response. Closes #9321. [kampers] + * Ensure that classes always have an initialize method. [Mislav Marohnić] * Update Template, Selector, Ajax.*, and ObjectRange classes to use the new class system. [Mislav Marohnić] diff --git a/src/ajax.js b/src/ajax.js index e2a8998..9a63358 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -362,12 +362,12 @@ Ajax.PeriodicalUpdater = Class.create(Ajax.Base, { (this.onComplete || Prototype.emptyFunction).apply(this, arguments); }, - updateComplete: function(responseText) { + updateComplete: function(response) { if (this.options.decay) { - this.decay = (responseText == this.lastText ? + this.decay = (response.responseText == this.lastText ? this.decay * this.options.decay : 1); - this.lastText = responseText; + this.lastText = response.responseText; } this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency); },