Custom Action in Share

I`ll extract the information from here; http://ecmarchitect.com/images/articles/alfresco-actions/actions-article-2ed.pdf  and here: http://wiki.alfresco.com/wiki/Custom_Actions
This post = just to be able to quickly grab the files I need to change to add more buttons.

In the Share project (part of the my personal Eclipse setup)

/web/share/components/documentlibrary/recalculate-workflow-action.css

CONTENT:
.doclist .onActionXopus a {    background-image: url(plaatje-16.gif) !important; }

/web/share/components/documentlibrary/recalculate-workflow-action.js

CONTENT:

/** DocumentList “Recalculate Workflow ” action **/
(function() {
Alfresco.doclib.Actions.prototype.onActionRecalculateWorkflow = function DL_onActionRecalculateWorkflow(asset)  {
nodeRef = new Alfresco.util.NodeRef(asset.nodeRef);
alert(“comment MJB=” + file.nodeRef);
}
} )  ( ) ;

/config/web-extensions/site-webscripts/org/alfresco/components/documentlibrary/actions-common.get.head.ftl

…..add this line …..
<#– WF Action –>
<@link rel=”stylesheet” type=”text/css” href=”${page.url.context}/res/components/documentlibrary/recalculate-workflow-action.css” />
<script type=”text/javascript” src=”${page.url.context}/res/components/documentlibrary/recalculate-workflow-action.js”></script>
……………………………..

/config/web-extensions/site-webscripts/org/alfresco/components/documentlibrary/documentlist.get.config.xml

…..add this line …..
<action type=”action-link” id=”onActionRecalculateWorkflow” permission=”edit” label=”actions.document.recalculateWorkflow” />
…………………………

 

… there is still something missing here….

..  i’ll figure that out soon….

Advertenties

Geef een reactie

Vul je gegevens in of klik op een icoon om in te loggen.

WordPress.com logo

Je reageert onder je WordPress.com account. Log uit / Bijwerken )

Twitter-afbeelding

Je reageert onder je Twitter account. Log uit / Bijwerken )

Facebook foto

Je reageert onder je Facebook account. Log uit / Bijwerken )

Google+ photo

Je reageert onder je Google+ account. Log uit / Bijwerken )

Verbinden met %s