12-16-2013 08:11 AM
<!– Custom DocLibActions config section –>
<config evaluator="string-compare" condition="DocLibActions">
<actions>
<action id="my-document-new-publish" icon="publish" type="javascript" label="actions.mycompany.mynewpublish">
<param name="function">onActionFormDialog</param>
<param name="itemKind">action</param>
<param name="itemId">my-newpublish-action</param>
<param name="mode">create</param>
<param name="destination">{node.nodeRef}</param>
<param name="successMessage">message.mycompany.mynewpublish.success</param>
<param name="failureMessage">message.mycompany.mynewpublish.failure</param>
</action>
</actions>
<actionGroups>
<actionGroup id="document-browse">
<action index="366" id="my-document-new-publish" />
</actionGroup>
</actionGroups>
</config>
<config evaluator="string-compare" condition="my-newpublish-action">
<forms>
<form>
<field-visibility>
<show id="myTarget"/>
</field-visibility>
<appearance>
<field id="myTarget" label="Choose destination">
<control template="/org/alfresco/components/form/controls/selectone.ftl">
<control-param name="options">0|Intranet,1|Public Site</control-param>
</control>
</field>
</appearance>
</form>
</forms>
</config>
?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<bean id="my-newpublish-action" parent="script">
<property name="scriptLocation">
<bean class="org.alfresco.repo.jscript.ClasspathScriptLocation">
<constructor-arg>
<value>alfresco/extension/scripts/mynewpublish.js</value>
</constructor-arg>
</bean>
</property>
</bean>
</beans>
05-21-2014 02:59 PM
09-04-2014 05:54 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.