From 56bba60b6e958573b05c3c5a46c5b6b6f27206d8 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 16 Feb 2018 12:02:43 +0100 Subject: [PATCH] Do not show open_notified button if there's no link available --- notifications/js/notificationajaxpopup.js | 14 ++++++++------ notifications/lang/egw_de.lang | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/notifications/js/notificationajaxpopup.js b/notifications/js/notificationajaxpopup.js index 42256940dc..b67805d143 100644 --- a/notifications/js/notificationajaxpopup.js +++ b/notifications/js/notificationajaxpopup.js @@ -201,12 +201,14 @@ .addClass('egwpopup_message_date') .prependTo($top_toolbar) .text(notifymessages[id]['created']); - // OPEN entry button - $open_entry = jQuery(document.createElement('span')) - .addClass('egwpopup_message_open') - .attr('title',egw.lang('open notified entry')) - .click(jQuery.proxy(this.open_entry, this,[$message])) - .prependTo($top_toolbar); + if (notifymessages[id]['data']['id'] || notifymessages[id]['data']['url']) { + // OPEN entry button + $open_entry = jQuery(document.createElement('span')) + .addClass('egwpopup_message_open') + .attr('title',egw.lang('open notified entry')) + .click(jQuery.proxy(this.open_entry, this,[$message])) + .prependTo($top_toolbar); + } // Delete button $delete = jQuery(document.createElement('span')) .addClass('egwpopup_delete') diff --git a/notifications/lang/egw_de.lang b/notifications/lang/egw_de.lang index 3d953b365f..ac74eb3f14 100644 --- a/notifications/lang/egw_de.lang +++ b/notifications/lang/egw_de.lang @@ -59,7 +59,7 @@ mark all as read notifications de Alle als gelesen markieren mark as read notifications de Als gelesen markieren message from notifications de Nachricht von minutes notifications de Minuten -more info notifications de Mehr ... +more info notifications de Mehr notification common de Benachrichtigung notifier notifications de Benachrichtiger notify me by notifications de Benachrichtige mich per