Skip to content

Instantly share code, notes, and snippets.

@billerby
Created June 25, 2014 08:40
Show Gist options
  • Save billerby/82ea2a6070fdd698e7f5 to your computer and use it in GitHub Desktop.
Save billerby/82ea2a6070fdd698e7f5 to your computer and use it in GitHub Desktop.
Share documentlibrary type renderer
(function() {
if (Alfresco.DocumentList)
{
YAHOO.Bubbling.fire("registerRenderer",
{
propertyName: "type",
renderer: function(record, label)
{
var key = 'type.' + record.jsNode.type.replace(":", "_");
return '<span class="item">' + Alfresco.util.message('label.nodeType') +': '+ Alfresco.util.message(key)+'</span>';
}
});
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment