diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index 6419722785..bc25dc4772 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -2162,6 +2162,15 @@ window.egw_LAB.wait(function() { )); } $content['index'] = $query['start']; + + // Infolog nextmatch is already there, just update the filter + if($contact_id && egw_json_request::isJSONRequest()) + { + egw_json_response::get()->apply('app.addressbook.view_set_infolog',Array($contact_id)); + + // Clear contact_id, it's used as a flag to send infolog + unset($contact_id); + } break; } } diff --git a/addressbook/js/app.js b/addressbook/js/app.js index 8776f958d0..db6756175e 100644 --- a/addressbook/js/app.js +++ b/addressbook/js/app.js @@ -92,6 +92,25 @@ app.classes.addressbook = AppJS.extend( this.egw.open(id, 'addressbook', 'view', {index: index}, '_self', 'addressbook'); }, + /** + * Set link filter for the already open & rendered infolog list + * + * @param {string} contact_id New contact ID + */ + view_set_infolog: function(contact_id) + { + // Find the infolog list + var infolog = etemplate2.getById( + $j(this.et2.getInstanceManager().DOMContainer).next('.et2_container').attr('id') + ); + var nm = null; + if(infolog != null && (nm = infolog.widgetContainer.getWidgetById('nm'))) + { + // Update the link filter to new contact + nm.applyFilters({col_filter: {linked: 'addressbook:'+contact_id}}); + } + }, + /** * Run an action from CRM view toolbar *