From b0e2e1f1be09f3684deb2c2669b70dbf4c96cbe3 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 29 Oct 2020 11:47:16 +0100 Subject: [PATCH] Open crm view for contact link --- addressbook/inc/class.addressbook_hooks.inc.php | 4 +++- api/js/jsapi/egw_open.js | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/addressbook/inc/class.addressbook_hooks.inc.php b/addressbook/inc/class.addressbook_hooks.inc.php index dba69b9b30..5b29fe86dd 100644 --- a/addressbook/inc/class.addressbook_hooks.inc.php +++ b/addressbook/inc/class.addressbook_hooks.inc.php @@ -363,7 +363,9 @@ class addressbook_hooks 'titles' => 'api.EGroupware\\Api\\Contacts.link_titles', 'view' => array( 'menuaction' => 'addressbook.addressbook_ui.view', - 'ajax' => 'true' + 'ajax' => 'true', + 'target' => 'tab', + 'crm_list' => 'infolog' ), 'view_id' => 'contact_id', 'list' => array( diff --git a/api/js/jsapi/egw_open.js b/api/js/jsapi/egw_open.js index f7d900eb4d..b7475ca7f3 100644 --- a/api/js/jsapi/egw_open.js +++ b/api/js/jsapi/egw_open.js @@ -224,6 +224,13 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd) url = this.link(url, params); } if (target == '_tab') return {url: url}; + if (type == 'view' && params.target == 'tab') { + return this.openTab(params[app_registry['view_id']], app, type, params, { + id: params[app_registry['view_id']] + '-' + this.appName, + icon: params['icon'], + displayName: id_data['title'] + " (" + egw.lang(this.appName) + ")", + }); + } return this.open_link(url, target, popup, target_app, _check_popup_blocker); },