mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +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->AltExtended = $_attachments[0]->string;
|
||||||
$this->mail->AltExtendedContentType = $_attachments[0]->type;
|
$this->mail->AltExtendedContentType = $_attachments[0]->type;
|
||||||
unset($_attachments[0]);
|
unset($_attachments[0]);
|
||||||
|
$this->mail->Body = $body_plain;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->mail->IsHTML();
|
||||||
|
$this->mail->Body = $body_html;
|
||||||
|
$this->mail->AltBody = $body_plain;
|
||||||
}
|
}
|
||||||
$this->mail->IsHTML(($isMeetingRequestNotif?false:true));
|
|
||||||
$this->mail->Body = $body_html;
|
|
||||||
$this->mail->AltBody = $body_plain;
|
|
||||||
|
|
||||||
if(is_array($_attachments) && count($_attachments) > 0)
|
if(is_array($_attachments) && count($_attachments) > 0)
|
||||||
{
|
{
|
||||||
foreach($_attachments as $attachment)
|
foreach($_attachments as $attachment)
|
||||||
|
@ -24,10 +24,22 @@
|
|||||||
var notification_script = document.getElementById('notifications_script_id');
|
var notification_script = document.getElementById('notifications_script_id');
|
||||||
var popup_poll_interval = notification_script && notification_script.getAttribute('data-poll-interval');
|
var popup_poll_interval = notification_script && notification_script.getAttribute('data-poll-interval');
|
||||||
this.setTimeout(popup_poll_interval || 60);
|
this.setTimeout(popup_poll_interval || 60);
|
||||||
var self = this;
|
jQuery('#egwpopup_ok_button').click(jQuery.proxy(this.button_ok, this));
|
||||||
jQuery('#egwpopup_ok_button').click(function() { self.button_ok.apply(self); });
|
jQuery('#egwpopup_close_button').click(jQuery.proxy(this.button_close, this));
|
||||||
jQuery('#egwpopup_close_button').click(function() { self.button_close.apply(self); });
|
jQuery('#notificationbell').click(jQuery.proxy(this.display, this));
|
||||||
jQuery('#notificationbell').click(function() { self.display.apply(self); });
|
// 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) {
|
notifications.prototype.setTimeout = function(_i) {
|
||||||
var self = this;
|
var self = this;
|
||||||
window.setTimeout(function(){
|
window.setTimeout(function(){
|
||||||
var request = egw.json(
|
self.get_notifications();
|
||||||
"notifications.notifications_ajax.get_notifications",
|
|
||||||
self.check_browser_notify()
|
|
||||||
);
|
|
||||||
request.sendRequest();
|
|
||||||
self.setTimeout(_i);
|
self.setTimeout(_i);
|
||||||
}, _i*1000);
|
}, _i*1000);
|
||||||
};
|
};
|
||||||
@ -101,7 +109,7 @@
|
|||||||
/**
|
/**
|
||||||
* Display or hide notifcation-bell
|
* Display or hide notifcation-bell
|
||||||
*
|
*
|
||||||
* @param String mode "active"
|
* @param {string} mode "active"
|
||||||
*/
|
*/
|
||||||
notifications.prototype.bell = function(mode) {
|
notifications.prototype.bell = function(mode) {
|
||||||
var notificationbell;
|
var notificationbell;
|
||||||
|
Loading…
Reference in New Issue
Block a user