03-06-2012 04:48 AM
<alfresco-config>
…
<config evaluator="string-compare" condition="DocLibActions">
<actions>
<action id="set-bill-type" type="javascript" label="label.action_setBillType">
<param name="function">onActionSetBillType</param>
<evaluator>evaluator.doclib.action.isContentType</evaluator>
</action>
</actions>
<actionGroups>
<actionGroup id="document-browse">
<action index="500" id="set-bill-type" />
</actionGroup>
</actionGroups>
</config>
…
03-07-2012 06:24 PM
03-08-2012 03:49 AM
<config evaluator="string-compare" condition="DocLibActions">
<actions>
<action id="change-type" type="javascript" label="label.my_action_changeType">
<param name="function">onActionChangeType</param>
<permissions>
<permission allow="true">Write</permission>
</permissions>
<evaluator>evaluator.doclib.action.isContentType</evaluator>
</action>
</actions>
<actionGroups>
<actionGroup id="document-browse">
<action index="400" id="change-type" />
</actionGroup>
</actionGroups>
</config>
<config evaluator="string-compare" condition="DocLibCustom" replace="true">
<dependencies>
<js src="/js/custom-documentlibrary-actions.js" />
</dependencies>
</config>
YAHOO.Bubbling.fire("registerAction", {
actionName: "onActionChangeType",
fn: function my_onActionChangeType(record) {
var jsNode = record.jsNode;
var currentType = jsNode.type;
var displayName = record.displayName;
var actionUrl = Alfresco.constants.PROXY_URI + "slingshot/doclib/type/node/" + jsNode.nodeRef.uri;
this.modules.changeType = new Alfresco.module.SimpleDialog(this.id + "-changeType").setOptions({
width: "30em",
templateUrl: Alfresco.constants.URL_SERVICECONTEXT + "modules/documentlibrary/change-type?currentType=" + encodeURIComponent(currentType),
actionUrl: actionUrl,
firstFocus: this.id + "-changeType-type",
onSuccess: {
fn: function my_onActionChangeType_success(response) {
YAHOO.Bubbling.fire("metadataRefresh", { highlightFile: displayName });
Alfresco.util.PopupManager.displayMessage({ text: "El tipus del document " + displayName + " s'ha canviat correctament" });
},
scope: this
},
onFailure: {
fn: function my_onActionChangeType_failure(response) {
Alfresco.util.PopupManager.displayMessage({ text: "Error en canviar el tipus del document " + displayName });
},
scope: this
}
});
this.modules.changeType.show();
}
});
<bean id="evaluator.doclib.action.isContentType" parent="evaluator.doclib.action.nodeType">
<property name="allowSubtypes">
<value>false</value>
</property>
<property name="types">
<list>
<value>cm:content</value>
</list>
</property>
</bean>
03-24-2012 12:32 PM
03-26-2012 06:53 AM
03-27-2012 06:15 AM
03-27-2012 06:43 AM
06-30-2012 07:14 AM
06-30-2012 02:00 PM
02-03-2014 01:50 AM
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.