mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-24 23:08:53 +01:00
query new notifications right after login and therefore also show up as "active" in session-status
This commit is contained in:
parent
4e89ed6520
commit
659ca5eb4f
@ -108,11 +108,14 @@ class notifications_email implements notifications_iface {
|
||||
$this->mail->AltExtended = $_attachments[0]->string;
|
||||
$this->mail->AltExtendedContentType = $_attachments[0]->type;
|
||||
unset($_attachments[0]);
|
||||
$this->mail->Body = $body_plain;
|
||||
}
|
||||
$this->mail->IsHTML(($isMeetingRequestNotif?false:true));
|
||||
else
|
||||
{
|
||||
$this->mail->IsHTML();
|
||||
$this->mail->Body = $body_html;
|
||||
$this->mail->AltBody = $body_plain;
|
||||
|
||||
}
|
||||
if(is_array($_attachments) && count($_attachments) > 0)
|
||||
{
|
||||
foreach($_attachments as $attachment)
|
||||
|
@ -24,10 +24,22 @@
|
||||
var notification_script = document.getElementById('notifications_script_id');
|
||||
var popup_poll_interval = notification_script && notification_script.getAttribute('data-poll-interval');
|
||||
this.setTimeout(popup_poll_interval || 60);
|
||||
var self = this;
|
||||
jQuery('#egwpopup_ok_button').click(function() { self.button_ok.apply(self); });
|
||||
jQuery('#egwpopup_close_button').click(function() { self.button_close.apply(self); });
|
||||
jQuery('#notificationbell').click(function() { self.display.apply(self); });
|
||||
jQuery('#egwpopup_ok_button').click(jQuery.proxy(this.button_ok, this));
|
||||
jQuery('#egwpopup_close_button').click(jQuery.proxy(this.button_close, this));
|
||||
jQuery('#notificationbell').click(jQuery.proxy(this.display, this));
|
||||
// query notifictions now
|
||||
this.get_notifications();
|
||||
};
|
||||
|
||||
/**
|
||||
* Poll server for new notifications
|
||||
*/
|
||||
notifications.prototype.get_notifications = function()
|
||||
{
|
||||
egw.json(
|
||||
"notifications.notifications_ajax.get_notifications",
|
||||
this.check_browser_notify()
|
||||
).sendRequest();
|
||||
};
|
||||
|
||||
/**
|
||||
@ -37,11 +49,7 @@
|
||||
notifications.prototype.setTimeout = function(_i) {
|
||||
var self = this;
|
||||
window.setTimeout(function(){
|
||||
var request = egw.json(
|
||||
"notifications.notifications_ajax.get_notifications",
|
||||
self.check_browser_notify()
|
||||
);
|
||||
request.sendRequest();
|
||||
self.get_notifications();
|
||||
self.setTimeout(_i);
|
||||
}, _i*1000);
|
||||
};
|
||||
@ -101,7 +109,7 @@
|
||||
/**
|
||||
* Display or hide notifcation-bell
|
||||
*
|
||||
* @param String mode "active"
|
||||
* @param {string} mode "active"
|
||||
*/
|
||||
notifications.prototype.bell = function(mode) {
|
||||
var notificationbell;
|
||||
|
Loading…
Reference in New Issue
Block a user