Poll for alarms and keep session fresh.
authorJan Schneider <jan@horde.org>
Thu, 25 Nov 2010 15:07:49 +0000 (16:07 +0100)
committerJan Schneider <jan@horde.org>
Thu, 25 Nov 2010 15:07:49 +0000 (16:07 +0100)
kronolith/js/kronolith.js
kronolith/lib/Ajax/Application.php

index f7b83f0..1b04530 100644 (file)
@@ -5956,6 +5956,9 @@ KronolithCore = {
             Horde_ToolTips.detach(button);
             Horde_ToolTips.attach(button);
         }.bindAsEventListener(this));
+
+        /* Start polling. */
+        new PeriodicalExecuter(this.doAction.bind(this, 'poll'), 5);
     }
 
 };
index 8d88f49..11a9fc3 100644 (file)
@@ -34,6 +34,14 @@ class Kronolith_Ajax_Application extends Horde_Core_Ajax_Application
     }
 
     /**
+     * Just polls for alarm messages and keeps session fresh for now.
+     */
+    public function poll()
+    {
+        return false;
+    }
+
+    /**
      * TODO
      */
     public function listEvents()