* Notifications: Add refresh handler for notifications (click on Notifications header)

This commit is contained in:
Hadi Nategh 2021-03-31 16:45:48 +02:00
parent 37e5e12c3c
commit 11c747ed20

View File

@ -88,6 +88,14 @@
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(POLL_INTERVAL || 60);
jQuery('#notificationbell').click(jQuery.proxy(this.display, this)); jQuery('#notificationbell').click(jQuery.proxy(this.display, this));
// add click handler for refreshing Notifications
let $egwpopup_header = jQuery('#egwpopup_header')
.css({cursor:'pointer'})
.attr('title', egw.lang('Refresh Notifications'))
.click(jQuery.proxy(this.run_notifications, this));
$egwpopup_header.children('.button_right_toggle').attr('title', egw.lang('close'));
// query notifictions now // query notifictions now
this.run_notifications(); this.run_notifications();