cancel
Showing results for 
Search instead for 
Did you mean: 

Custom document action javascript

pat9rv3sousa
Champ on-the-rise
Champ on-the-rise
Hi. I'm trying to create a custom document action in Alfresco. But, when i try to run the new "Button" created, nothing happens, the function is not called. I'm trying, in this time, make a button equal to the "Copy to…" only for testing, so, my code is this:

~/alfresco/tomcat/webapps/share/components/documentlibrary/actions.js

 
    (…)
    onActionSign : function dlA_onActionSign(record)
      {
         //testar upload de um documento
         this._copyMoveTo("copy", record);
      },
    (…)


~/alfresco/tomcat/webapps/share/WEB-INF/classes/alfresco/share-documentlibrary-config.xml


(…)
<action id="document-sign" type="javascript"  label="actions.document.document-sign">
            <param name="function">onActionSign</param>
            <evaluator>evaluator.doclib.action.editableByCurrentUser</evaluator>
</action>
(…)


I saw that in the ~/alfresco/tomcat/webapps/share/components/documentlibrary/actions-min.js my function not appears, i think that is because not works, but how i generate this file? What is my error?

Thanks.
1 REPLY 1

art99trash
Star Contributor
Star Contributor
If you remove actions-min.js and rebuild, does actions-min.js get recreated?