From: Jan Schneider Date: Tue, 2 Mar 2010 22:44:55 +0000 (+0100) Subject: Only remove the correct alarm from the alarms cache. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0d059de59cb474f7406b76a24dfba209d0cc6a6e;p=horde.git Only remove the correct alarm from the alarms cache. --- diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index 97d196e93..8da220840 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -161,10 +161,14 @@ KronolithCore = { log: false, sticky: true }); + growl.store('alarm', alarm.id); - document.observe('Growler:destroyed', function() { - this.alarms = this.alarms.without(alarm.id); - }.bind(this)); + document.observe('Growler:destroyed', function(e) { + var id = e.element().retrieve('alarm'); + if (id) { + this.alarms = this.alarms.without(id); + } + }.bindAsEventListener(this)); if (alarm.user) { select.observe('change', function() {