From 5231240f52e2d32024005536bdb98cce7861ba36 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 16 Feb 2020 11:08:28 +0100 Subject: [PATCH] add extra_link_target attribute to r/w link-entry to allow opening link in new tab (for mserver) --- api/js/etemplate/et2_widget_link.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/et2_widget_link.js b/api/js/etemplate/et2_widget_link.js index 3cd64c1d74..791fd068f0 100644 --- a/api/js/etemplate/et2_widget_link.js +++ b/api/js/etemplate/et2_widget_link.js @@ -1232,7 +1232,13 @@ var et2_link = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDe "type": "string", "default": "", "description": "Optional parameter to be passed to egw().open in order to open links in specified application" - } + }, + "extra_link_target": { + "name": "Link target", + "type": "string", + "default": null, + "description": "Link target descriptor" + }, }, legacyOptions: ["only_app"], @@ -1307,7 +1313,8 @@ var et2_link = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDe if( !self.options.target_app ){ self.options.target_app = _value.app; } - self.egw().open(_value, "", self.options.link_hook,_value.extra_args,_value.app, self.options.target_app); + const target = self.options.extra_link_target || _value.app; + self.egw().open(_value, "", self.options.link_hook, _value.extra_args, target, self.options.target_app); e.stopImmediatePropagation(); }); }