Reset spinner even if no events returned.
authorJan Schneider <jan@horde.org>
Mon, 11 May 2009 07:30:51 +0000 (09:30 +0200)
committerJan Schneider <jan@horde.org>
Mon, 11 May 2009 07:30:51 +0000 (09:30 +0200)
kronolith/js/src/kronolith.js

index 84ac0c2..3f09adc 100644 (file)
@@ -366,8 +366,8 @@ KronolithCore = {
                               function(r) {
                                   if (r.response.events) {
                                       this._removeEvent(eventid, cal);
-                                      this._loadEventsCallback(r);
                                   }
+                                  this._loadEventsCallback(r);
                               }.bind(this));
             }.bind(this) });
             cell.down('.kronolithDay')
@@ -993,8 +993,8 @@ KronolithCore = {
             function(r) {
                 if (r.response.events) {
                     this._removeEvent(event.key, event.value.calendar);
-                    this._loadEventsCallback(r);
                 }
+                this._loadEventsCallback(r);
             }.bind(this));
     },
 
@@ -1255,12 +1255,10 @@ KronolithCore = {
                                       'view_end': end
                                   }),
                               function(r) {
-                                  if (r.response.events) {
-                                      if (eventid) {
-                                          this._removeEvent(eventid, cal);
-                                      }
-                                      this._loadEventsCallback(r);
+                                  if (r.response.events && eventid) {
+                                      this._removeEvent(eventid, cal);
                                   }
+                                  this._loadEventsCallback(r);
                                   this._closeRedBox();
                               }.bind(this));
                 e.stop();