Hi Mike ,
Please find below code snippets:
Changes made in share-config-custom.xml—-
<config evaluator="string-compare" condition="DocLibActions" >
<actions>
<action id="content" type="javascript" label="content" >
<param name="function" >onActionContentDetail</param>
</action>
</actions>
<actionGroups >
<actionGroup id="folder-browse" >
<action index="100" id="content" />
</actionGroup>
</actionGroups>
</config>
<config evaluator="string-compare" condition="DocLibCustom" replace="true">
<!–
Custom Code dependencies.
Note: files specified in the "src" attribute resolve relative to the /share/res/ servlet context.
–>
<dependencies>
<js src="/custom-documentlibrary-actions.js" />
</dependencies>
</config>
Below is the code for Client side Javascript file located at <install-app>/tomcat/webapps/share
/**
* DocumentList "Backup" action
*
* @namespace Alfresco
* @class Alfresco.DocumentList
*/
(function()
{
/**
* Get detail information of content
*
* @method onActionContentDetail
* @param asset {object} represents the file to be actioned
*/
Alfresco.doclib.Actions.prototype.onActionContentDetail = function dlA_onActionContentDetail(asset)
{
//Get asset-content nodeRef
var nodeRef = asset.nodeRef,
actionUrl = " ";
//Create a new instance of dialog
this.modules.contentDetail = new Alfresco.module.SimpleDialog(this.id +
"-contentDetail").setOptions(
{
width: "30em",
//Define share webscripts for module pop-up
templateUrl: Alfresco.constants.URL_SERVICECONTEXT +
"modules/content-detail?contentRef=" + nodeRef,
actionUrl: actionUrl,
});
//Display module
this.modules.contentDetail.show();
};
})();