* Mail: open notification email of own domain as popup

This commit is contained in:
Ralf Becker 2020-07-08 14:28:21 +02:00
parent 7428e2d7cd
commit 0faa8b367e

View File

@ -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 * @link http://www.egroupware.org
* @author EGroupware GmbH [info@egroupware.org] * @author EGroupware GmbH [info@egroupware.org]
* @copyright (c) 2014 by EGroupware GmbH <info-AT-egroupware.org> * @copyright (c) 2014 by EGroupware GmbH <info-AT-egroupware.org>
* @package mail * @package mail
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/ */
/*egw:uses /*egw:uses
@ -24,6 +23,13 @@ jQuery(function()
return false; // cant do event.stopImediatePropagation() in on! 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 else // add target=_blank to all other links, gives CSP error and would open in preview
{ {
this.target = '_blank'; this.target = '_blank';