2006-09-07 09:04:15 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* eGroupWare - Notifications
|
|
|
|
* serves the hook "after_navbar" to create the notificationwindow
|
2008-08-15 11:38:58 +02:00
|
|
|
*
|
|
|
|
* @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
|
|
|
*/
|
2008-08-15 11:38:58 +02:00
|
|
|
$notification_config = config::read('notifications');
|
2011-06-15 12:05:11 +02:00
|
|
|
if ($GLOBALS['egw_info']['user']['apps']['notifications'])
|
2009-08-25 13:22:04 +02:00
|
|
|
{
|
2007-04-17 07:58:08 +02:00
|
|
|
$GLOBALS['egw']->translation->add_app('notifications');
|
2009-04-06 23:46:11 +02:00
|
|
|
$popup_poll_interval = empty($notification_config['popup_poll_interval']) ? 60 : $notification_config['popup_poll_interval'];
|
2009-03-24 10:33:28 +01:00
|
|
|
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>';
|
2013-04-01 21:14:52 +02:00
|
|
|
echo '<script type="text/javascript">var lab = egw.LAB || $LAB; lab.wait(function(){egwpopup_init("'.$popup_poll_interval.'");});</script>';
|
2006-09-07 09:04:15 +02:00
|
|
|
echo '
|
2009-02-23 21:45:31 +01:00
|
|
|
<div id="egwpopup" style="display: none; z-index: 999;">
|
2011-04-13 19:51:02 +02:00
|
|
|
<div id="egwpopup_header">'.lang('Notification'). '<span style="float:right;">'.
|
2011-06-15 12:05:11 +02:00
|
|
|
html::submit_button('egwpopup_close_button', 'X', 'egwpopup_button_close();',true,'', 'close.button') .
|
2011-04-13 19:51:02 +02:00
|
|
|
'</span></div>
|
2009-02-23 21:45:31 +01:00
|
|
|
<div id="egwpopup_message"></div>
|
2009-03-24 10:33:28 +01:00
|
|
|
<div id="egwpopup_footer">
|
2009-02-23 21:45:31 +01:00
|
|
|
<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
|
|
|
}
|
2011-04-13 19:51:02 +02:00
|
|
|
unset($notification_config);
|