From 0faa8b367eaa887ff511b18eacd972505380b0da Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 8 Jul 2020 14:28:21 +0200 Subject: [PATCH] * Mail: open notification email of own domain as popup --- mail/js/preview.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mail/js/preview.js b/mail/js/preview.js index ed47e9b522..6bb6771ab9 100644 --- a/mail/js/preview.js +++ b/mail/js/preview.js @@ -1,12 +1,11 @@ /** - * mail - handle mailto and other links in preview + * EGroupware Mail - handle mailto and other links in preview * * @link http://www.egroupware.org * @author EGroupware GmbH [info@egroupware.org] * @copyright (c) 2014 by EGroupware GmbH * @package mail * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License - * @version $Id$ */ /*egw:uses @@ -24,6 +23,13 @@ jQuery(function() return false; // cant do event.stopImediatePropagation() in on! } + // open links with own orgin and "index.php?" as popup (not eg. share.php or *dav.php) + else if ((this.href[0] === '/' || this.href.match(new RegExp('^'+location.protocol+'//'+location.host+'/'))) && + this.href.match(/\/index.php\?/)) + { + top.egw.openPopup(this.href.replace(/([?&])no_popup=[^&]*/, '\1'), 800, 600, '_blank'); + return false; + } else // add target=_blank to all other links, gives CSP error and would open in preview { this.target = '_blank';