I want to add a custom action on the default Callout for Document Libraries.
The only instructions I could find on this subject show how to override the entire FooterTemplate on an existing Callout panel. See here: http://www.estruyf.be/blog/hiding-the-social-actions-follow-share-from-the-document-libraries-in-sharepoint-2013/
The problem with this approach is that other custom actions added by other pieces of code are lost. So it is necessary to account for them. For example, the "Follow" action gets lost (I believe it is added by some SharePoint feature).
Is there a way of simply getting the current Callout from the context and invoke addAction on it? On what event should I do that?