mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
added configureable poll interval for egwpopup - default is 60 seconds
This commit is contained in:
parent
fcb8f3497c
commit
6f7c9611ea
@ -15,9 +15,10 @@
|
||||
$notification_config = config::read('notifications');
|
||||
if ($notification_config['popup_enable']) {
|
||||
$GLOBALS['egw']->translation->add_app('notifications');
|
||||
$popup_poll_interval = empty($notification_config['popup_poll_interval']) ? 60 : $notification_config['popup_poll_interval'];
|
||||
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>';
|
||||
echo '<script type="text/javascript">egwpopup_init("'.$popup_poll_interval.'");</script>';
|
||||
echo '
|
||||
<div id="egwpopup" style="display: none; z-index: 999;">
|
||||
<div id="egwpopup_header">'.lang('Notification').'</div>
|
||||
|
@ -10,16 +10,16 @@
|
||||
|
||||
var notifymessages = new Array();
|
||||
|
||||
function egwpopup_init() {
|
||||
window.setTimeout("egwpopup_refresh();", 1000);
|
||||
function egwpopup_init(_i) {
|
||||
window.setTimeout("egwpopup_refresh(" + _i + ");", 1000);
|
||||
}
|
||||
|
||||
function egwpopup_setTimeout() {
|
||||
window.setTimeout("egwpopup_refresh();", 60000);
|
||||
function egwpopup_setTimeout(_i) {
|
||||
window.setTimeout("egwpopup_refresh(" + _i + ");", _i*1000);
|
||||
}
|
||||
function egwpopup_refresh() {
|
||||
function egwpopup_refresh(_i) {
|
||||
xajax_doXMLHTTP("notifications.notifications_ajax.get_notifications");
|
||||
egwpopup_setTimeout();
|
||||
egwpopup_setTimeout(_i);
|
||||
}
|
||||
|
||||
function egwpopup_display() {
|
||||
|
@ -13,7 +13,7 @@
|
||||
<tr class="th">
|
||||
<td colspan="2"> <b>{lang_eGroupWare-Popup_backend}</b></td>
|
||||
</tr>
|
||||
<tr bgcolor="{row_on}">
|
||||
<tr class="row_on">
|
||||
<td>{lang_Enable_eGroupWare-Popup_backend}</td>
|
||||
<td>
|
||||
<select name="newsettings[popup_enable]">
|
||||
@ -22,10 +22,20 @@
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row_off">
|
||||
<td>{lang_Poll_interval}</td>
|
||||
<td>
|
||||
<select name="newsettings[popup_poll_interval]">
|
||||
<option value="60"{selected_popup_poll_interval_60}>1 {lang_minute}</option>
|
||||
<option value="120"{selected_popup_poll_interval_120}>2 {lang_minutes}</option>
|
||||
<option value="300"{selected_popup_poll_interval_300}>5 {lang_minutes}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="th">
|
||||
<td colspan="2"> <b>{lang_Windows-Popup_backend}</b></td>
|
||||
</tr>
|
||||
<tr bgcolor="{row_on}">
|
||||
<tr class="row_on">
|
||||
<td>{lang_Enable_Windows-Popup_backend}</td>
|
||||
<td>
|
||||
<select name="newsettings[winpopup_enable]">
|
||||
@ -37,7 +47,7 @@
|
||||
<tr class="th">
|
||||
<td colspan="2"> <b>{lang_SMS_backend}</b></td>
|
||||
</tr>
|
||||
<tr bgcolor="{row_on}">
|
||||
<tr class="row_on">
|
||||
<td>{lang_Enable_SMS_backend}</td>
|
||||
<td>
|
||||
<select name="newsettings[sms_enable]">
|
||||
@ -46,13 +56,13 @@
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="{row_off}">
|
||||
<tr class="row_off">
|
||||
<td>{lang_Maximum_SMS_messages_per_notification}</td>
|
||||
<td>
|
||||
<select name="newsettings[sms_maxmessages]">
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="1"{selected_sms_maxmessages_1}>1</option>
|
||||
<option value="2"{selected_sms_maxmessages_2}>2</option>
|
||||
<option value="3"{selected_sms_maxmessages_3}>3</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
Loading…
Reference in New Issue
Block a user