egroupware_official/notifications/inc/hook_after_navbar.inc.php

31 lines
1.3 KiB
PHP
Raw Normal View History

2006-09-07 09:04:15 +02:00
<?php
/**
* eGroupWare - Notifications
* serves the hook "after_navbar" to create the notificationwindow
*
* @abstract notificatonwindow is an empty and non displayed 1px div which gets rezised
2006-09-07 09:04:15 +02:00
* and populated if a notification is about to be displayed.
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package notifications
* @subpackage ajaxpoup
* @link http://www.egroupware.org
* @author Cornelius Weiss <nelius@cwtech.de>
2006-09-25 12:20:46 +02:00
* @version $Id$
2006-09-07 09:04:15 +02:00
*/
$notification_config = config::read('notifications');
if ($notification_config['popup_enable']) {
2007-04-17 07:58:08 +02:00
$GLOBALS['egw']->translation->add_app('notifications');
echo '<script src="'. $GLOBALS['egw_info']['server']['webserver_url']. '/notifications/js/notificationajaxpopup.js?'.
filemtime(EGW_SERVER_ROOT.'/notifications/js/notificationajaxpopup.js'). '" type="text/javascript"></script>';
echo '<script type="text/javascript">egwpopup_init();</script>';
2006-09-07 09:04:15 +02:00
echo '
<div id="egwpopup" style="display: none; z-index: 999;">
<div id="egwpopup_header">'.lang('Notification').'</div>
<div id="egwpopup_message"></div>
<div id="egwpopup_footer">
<input id="egwpopup_ok_button" type="submit" value="'. lang('ok'). '" onClick="egwpopup_button_ok();">
2006-09-07 09:04:15 +02:00
</div>
</div>
';
2006-09-25 10:23:30 +02:00
}
unset($notification_config);