Ticket #8184: add_periodicalupdater_max_frequency_for_decay.diff
| File add_periodicalupdater_max_frequency_for_decay.diff, 1.0 kB (added by kampers, 1 year ago) |
|---|
-
src/ajax.js
old new 362 362 (this.onComplete || Prototype.emptyFunction).apply(this, arguments); 363 363 }, 364 364 365 updateComplete: function(response Text) {365 updateComplete: function(response) { 366 366 if (this.options.decay) { 367 this.decay = (responseText == this.lastText ? 368 this.decay * this.options.decay : 1); 369 370 this.lastText = responseText; 367 this.frequency = (response.responseText == this.lastText) ? 368 this.options.decay * this.frequency : this.options.frequency; 369 370 if (this.options.maxFrequency && 371 this.frequency > this.options.maxFrequency) { 372 this.frequency = this.options.maxFrequency; 373 } 374 375 this.lastText = response.responseText; 371 376 } 372 this.timer = this.onTimerEvent.bind(this).delay(this. decay * this.frequency);377 this.timer = this.onTimerEvent.bind(this).delay(this.frequency); 373 378 }, 374 379 375 380 onTimerEvent: function() {