Open crm view for contact link

This commit is contained in:
Hadi Nategh 2020-10-29 11:47:16 +01:00
parent 9021220f14
commit b0e2e1f1be
2 changed files with 10 additions and 1 deletions

View File

@ -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(

View File

@ -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);
},