$help_link = Horde::widget($help_link, _("Help"), 'helplink', 'help', Horde::popupJs($help_link, array('urlencode' => true)) . 'return false;');
}
$today = new Horde_Date($_SERVER['REQUEST_TIME']);
+
+/* Suppress menus in options screen and indicate that notifications should use
+ * the ajax mode. */
Horde_Core_Prefs_Ui::hideMenu(true);
+$_SESSION['horde_notification']['override'] = array(
+ KRONOLITH_BASE . '/lib/Notification/Listener/AjaxStatus.php',
+ 'Kronolith_Notification_Listener_AjaxStatus'
+);
$alarm_methods = $alarm_params = '';
foreach (Horde_Alarm::notificationMethods() as $method => $params) {
--- /dev/null
+<?php
+/**
+ * The Ajax status class provides a method to display Growler messages using
+ * the KronolithCore javascript notification framework.
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author Michael Slusarz <slusarz@horde.org>
+ * @package Kronolith
+ */
+class Kronolith_Notification_Listener_AjaxStatus extends Horde_Notification_Listener_Status
+{
+ /**
+ * Outputs the status line if there are any messages on the 'status'
+ * message stack.
+ *
+ * @param array $events The list of events to handle.
+ * @param array $options An array of options. Not used.
+ */
+ public function notify($events, $options = array())
+ {
+ Horde::addInlineScript(array(
+ 'if (window.KronolithCore || parent.KronolithCore) { (window.KronolithCore || parent.KronolithCore).showNotifications(' . Horde_Serialize::serialize($events, Horde_Serialize::JSON) . ') }'
+ ), 'dom');
+ }
+
+}