Custom action to a callout in SharePoint 2013
During my POC, I was trying to add custom action to a callout same like, Share and follow. found easy way to do it with following script. SP.SOD.executeFunc("callout.js", "Callout", function () { var itemCtx = {}; itemCtx.Templates = {}; itemCtx.BaseViewID = 'Callout'; // Define the list template type itemCtx.ListTemplateType = 101; itemCtx.Templates.Footer = function (itemCtx) { return CalloutRenderFooterTemplate(itemCtx, AddCustomAction, true); }; SPClientTemplates.TemplateManager.RegisterTemplateOverrides(itemCtx); }); function AddCustomAction (renderCtx, calloutActionMenu) { // Add custom action calloutActionMenu.addAction (new CalloutAction ({ text: "Custom Action", tooltip: 'This is your custom action', onClickCallback: function() { console.log('Alert from custom action'); } })); } We are good to go!!