mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
Allow browser to notify even if verbosity is low, in case browser is not visible
This commit is contained in:
parent
e9ba37173a
commit
4283e1122e
@ -263,7 +263,7 @@ class notifications_ajax {
|
||||
if ($rs->NumRows() > 0) {
|
||||
foreach ($rs as $notification) {
|
||||
$message = null;
|
||||
if($browserNotify && $this->preferences[self::_appname]['egwpopup_verbosity'] != 'low')
|
||||
if($browserNotify)
|
||||
{
|
||||
$message = $notification['notify_message'];
|
||||
|
||||
|
@ -131,13 +131,16 @@ function append_notification_message(_id, _message, _browser_notify) {
|
||||
notifymessages[_id] = _message;
|
||||
|
||||
// Notification API
|
||||
var notice = webkitNotifications.createHTMLNotification(_browser_notify);
|
||||
notice.ondisplay = function() {
|
||||
// Confirm when user gets to see it - no close needed
|
||||
// Wait a bit to let it load first, or it might not be there when requested.
|
||||
window.setTimeout( function() {
|
||||
xajax_doXMLHTTP("notifications.notifications_ajax.confirm_message", _id);
|
||||
}, 2000);
|
||||
};
|
||||
notice.show();
|
||||
if(_browser_notify)
|
||||
{
|
||||
var notice = webkitNotifications.createHTMLNotification(_browser_notify);
|
||||
notice.ondisplay = function() {
|
||||
// Confirm when user gets to see it - no close needed
|
||||
// Wait a bit to let it load first, or it might not be there when requested.
|
||||
window.setTimeout( function() {
|
||||
xajax_doXMLHTTP("notifications.notifications_ajax.confirm_message", _id);
|
||||
}, 2000);
|
||||
};
|
||||
notice.show();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user