mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
defer first poll by 10 seconds, to speed up start race and make sure status app is loaded
(to not cause a double load of status app.js)
This commit is contained in:
parent
e03fb45b0e
commit
fc0ad53916
@ -90,7 +90,7 @@
|
|||||||
function notifications() {
|
function notifications() {
|
||||||
var notification_script = document.getElementById('notifications_script_id');
|
var notification_script = document.getElementById('notifications_script_id');
|
||||||
CURRENT_INTERVAL = POLL_INTERVAL = notification_script && notification_script.getAttribute('data-poll-interval');
|
CURRENT_INTERVAL = POLL_INTERVAL = notification_script && notification_script.getAttribute('data-poll-interval');
|
||||||
TIMEOUT = this.setTimeout(POLL_INTERVAL || 60);
|
TIMEOUT = this.setTimeout(10); // defer first poll
|
||||||
jQuery('#notificationbell').click(jQuery.proxy(this.display, this));
|
jQuery('#notificationbell').click(jQuery.proxy(this.display, this));
|
||||||
|
|
||||||
// add click handler for refreshing Notifications
|
// add click handler for refreshing Notifications
|
||||||
@ -100,13 +100,10 @@
|
|||||||
.click(jQuery.proxy(this.run_notifications, this));
|
.click(jQuery.proxy(this.run_notifications, this));
|
||||||
$egwpopup_header.children('.button_right_toggle').attr('title', egw.lang('close'));
|
$egwpopup_header.children('.button_right_toggle').attr('title', egw.lang('close'));
|
||||||
|
|
||||||
// query notifictions now
|
|
||||||
this.run_notifications();
|
|
||||||
|
|
||||||
this.filter = '';
|
this.filter = '';
|
||||||
// total number of notifications
|
// total number of notifications
|
||||||
this.total = 0;
|
this.total = 0;
|
||||||
};
|
}
|
||||||
|
|
||||||
notifications.prototype.run_notifications = function ()
|
notifications.prototype.run_notifications = function ()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user