From 38056ea91833a55c55f67faf29944b13cc63618f Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Fri, 11 Jun 2010 01:15:40 +0200 Subject: [PATCH] Return before removing the event, if this is not the most recent response. --- kronolith/js/kronolith.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index c48bb10b1..1bf163169 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -4414,7 +4414,10 @@ KronolithCore = { view_end: end, att: $H({ offDays: diff }).toJSON() }, function(r) { - if (r.response.events) { + // Check if this is the still the result of the most + // current request. + if (r.response.events && + r.response.sig == this.eventsLoading[r.response.cal]) { var days; if ((this.view == 'month' && Kronolith.conf.max_events) || @@ -4552,7 +4555,10 @@ KronolithCore = { att: attributes.toJSON() }, function(r) { - if (r.response.events) { + // Check if this is the still the result of the most current + // request. + if (r.response.events && + r.response.sig == this.eventsLoading[r.response.cal]) { this.removeEvent(event.key, event.value.calendar); } this.loadEventsCallback(r); -- 2.11.0