AnsweredAssumed Answered

Alfresco Share 4.0 Client Side Js

Question asked by amitabhandari1 on Jan 17, 2012
Latest reply on Jan 18, 2012 by amitabhandari1
Hi,

I  have create custom action to be added in the Document Library Browse view . Below is the code.
<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>
Now I want to call client side JS. As per Alfresco 4.0 ,  there is  option to  definecustom Java script  through configuration.
The DocLibCustom config section is where dependencies on custom client-side assets can be defined.
<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>

I have created this js file directly under <install-app>/tomcat/webapps/share folder .
On click of custom action , the Java script method  is not called.

Can anyone please help in this.

Thanks,

Outcomes