Let browser notification happen if verbosity is low

This commit is contained in:
Nathan Gray 2011-12-05 15:37:50 +00:00
parent 3ca6e6c523
commit c98e614c85
2 changed files with 13 additions and 10 deletions

View File

@ -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'];

View File

@ -131,6 +131,8 @@ function append_notification_message(_id, _message, _browser_notify) {
notifymessages[_id] = _message;
// Notification API
if(_browser_notify)
{
var notice = webkitNotifications.createHTMLNotification(_browser_notify);
notice.ondisplay = function() {
// Confirm when user gets to see it - no close needed
@ -141,3 +143,4 @@ function append_notification_message(_id, _message, _browser_notify) {
};
notice.show();
}
}