Exit callback after hiding the spinner, if the response didn't contain a signature.
authorJan Schneider <jan@horde.org>
Mon, 7 Sep 2009 13:24:08 +0000 (15:24 +0200)
committerJan Schneider <jan@horde.org>
Mon, 7 Sep 2009 13:24:08 +0000 (15:24 +0200)
kronolith/js/kronolith.js

index b574766..9cd0b25 100644 (file)
@@ -809,7 +809,12 @@ KronolithCore = {
                 calendar = cal.join('|');
             this.startLoading(calendar, start, end);
             this._storeCache($H(), calendar);
-            this.doAction('ListEvents', { start: start, end: end, cal: calendar, view: view }, this._loadEventsCallback.bind(this));
+            this.doAction('ListEvents',
+                          { start: start,
+                            end: end,
+                            cal: calendar,
+                            view: view },
+                          this._loadEventsCallback.bind(this));
         }, this);
     },
 
@@ -826,6 +831,10 @@ KronolithCore = {
             $('kronolithLoading').hide();
         }
 
+        if (typeof r.response.sig == 'undefined') {
+            return;
+        }
+
         var start = this.parseDate(r.response.sig.substr(0, 8)),
             end = this.parseDate(r.response.sig.substr(8, 8)),
             dates = [start, end];
@@ -1308,7 +1317,10 @@ KronolithCore = {
 
             this.startLoading('tasks:' + taskList, taskType, '');
             this._storeTasksCache($H(), taskList);
-            this.doAction('ListTasks', { 'taskType': taskType, 'list': taskList }, this._loadTasksCallback.bind(this));
+            this.doAction('ListTasks',
+                          { 'taskType': taskType,
+                            'list': taskList },
+                          this._loadTasksCallback.bind(this));
         }, this);
     },