From 11c747ed204849bddfee7dc0756f6998c62ef219 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 31 Mar 2021 16:45:48 +0200 Subject: [PATCH] * Notifications: Add refresh handler for notifications (click on Notifications header) --- notifications/js/notificationajaxpopup.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/notifications/js/notificationajaxpopup.js b/notifications/js/notificationajaxpopup.js index 62e6e93d6b..7fa5a266d0 100644 --- a/notifications/js/notificationajaxpopup.js +++ b/notifications/js/notificationajaxpopup.js @@ -88,6 +88,14 @@ CURRENT_INTERVAL = POLL_INTERVAL = notification_script && notification_script.getAttribute('data-poll-interval'); TIMEOUT = this.setTimeout(POLL_INTERVAL || 60); 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 this.run_notifications();