mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
* Notifications: if deleting all (visible) messages, directly return the next junk, to ease cleaning them up
This commit is contained in:
parent
5c6313448e
commit
ef67e21930
@ -570,9 +570,11 @@
|
||||
|
||||
notifications.prototype.delete_all = function () {
|
||||
if (!notifymessages || Object.entries(notifymessages).length == 0) return false;
|
||||
egw.request("notifications.notifications_ajax.delete_message", [notifymessages.map(d => d.id)]);
|
||||
egw.request("notifications.notifications_ajax.delete_message", [Object.keys(notifymessages)]);
|
||||
notifymessages = {};
|
||||
_currentRawData = []; // otherwise response from delete_message/get_notifications might not get parsed
|
||||
this.total = 0;
|
||||
this.counterUpdate();
|
||||
jQuery("#egwpopup_list").empty();
|
||||
egw.loading_prompt('popup_notifications', false);
|
||||
this.bell("inactive");
|
||||
@ -590,6 +592,7 @@
|
||||
var keepLoadingPrompt = false;
|
||||
delete (notifymessages[id]);
|
||||
this.total -= 1;
|
||||
this.counterUpdate();
|
||||
if (nextNode.length > 0 && nextNode[0].id.match(/egwpopup_message_/ig) && egwpopup_message.hasClass('egwpopup_expanded'))
|
||||
{
|
||||
nextNode.trigger('click');
|
||||
|
Loading…
Reference in New Issue
Block a user