mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-14 10:28:31 +02:00
- Use link registry to open notification links
- Fix mark all notifications as read on popup close
This commit is contained in:
@ -83,6 +83,20 @@
|
||||
egwpopup_message.style.maxHeight = (Browserheight/2) + "px";
|
||||
for(var show in notifymessages) break;
|
||||
egwpopup_message.innerHTML = notifymessages[show];
|
||||
|
||||
// Activate links
|
||||
$j('div[data-id],div[data-url]', egwpopup_message).on('click',
|
||||
function() {
|
||||
if(this.dataset.id)
|
||||
{
|
||||
egw.open(this.dataset.id,this.dataset.app);
|
||||
}
|
||||
else
|
||||
{
|
||||
egw.open_link(this.dataset.url,'_blank',this.dataset.popup);
|
||||
}
|
||||
}
|
||||
).addClass('et2_link');
|
||||
var num = 0;
|
||||
for(var id in notifymessages) ++num;
|
||||
if(num-1 > 0 ) {
|
||||
@ -154,7 +168,7 @@
|
||||
for(var id in notifymessages) {
|
||||
ids.push(id);
|
||||
}
|
||||
var request = egw.json("notifications.notifications_ajax.confirm_message", ids);
|
||||
var request = egw.json("notifications.notifications_ajax.confirm_message", [ids]);
|
||||
request.sendRequest();
|
||||
notifymessages = {};
|
||||
var egwpopup = document.getElementById("egwpopup");
|
||||
|
Reference in New Issue
Block a user