10-16-2013 09:37 AM
<config evaluator="string-compare" condition="DocLibActions">
<actions>
<action id="myCompany.doclib.action.openExternal"
icon="myCompanyIcon"
type="javascript"
label="actions.myCompany.openExternal">
<param name="function">onActionOpenExternal</param>
<param name="successMessage">message.openExternal.success</param>
<param name="failureMessage">message.openExternal.failure</param>
<evaluator>myCompany.doclib.action.openExternal</evaluator>
</action>
</actions>
<actionGroups>
<actionGroup id="document-browse">
<action index="400" id="myCompany.doclib.action.openExternal" />
</actionGroup>
<actionGroup id="document-details">
<action index="400" id="myCompany.doclib.action.openExternal" />
</actionGroup>
</actionGroups>
</config>
(function() {
YAHOO.Bubbling.fire("registerAction",
{
actionName: "onActionopenExternal",
fn: function myCompany_onActionOpenExternalProgram(file) {
this.modules.actions.genericAction(
{
success:
{
//window.open('<URL based on the webscript response below>') ???
message: this.msg("message.openExternal.success", file.displayName, Alfresco.constants.USERNAME)
},
failure:
{
message: this.msg("message.openExternal.failure", file.displayName, Alfresco.constants.USERNAME)
},
webscript:
{
name: "myCompany/openExternal?nodeRef={nodeRef}&userName={userName}",
stem: Alfresco.constants.PROXY_URI,
method: Alfresco.util.Ajax.GET,
params:
{
nodeRef: file.nodeRef,
userName: Alfresco.constants.USERNAME
}
},
config:
{
}
});
}
});
})();
10-17-2013 01:42 AM
success:
{
callback:
{
fn: function DL_oAEO_success(data)
{
// Navigate here
}
}
}
10-17-2013 07:57 AM
<action id="document-workitem" type="javascript" label="actions.document.addtoworkitem" icon="toworkitem">
<param name="function">onActionSimpleRepoAction</param>
<param name="action">imaging.toworkitem</param>
<param name="success">goToWorkItem</param>
<param name="failureMessage">message.addtoworkitem.failure</param>
<evaluator negate="true">evaluator.doclib.metadata.hasAspectWorkItem</evaluator>
</action>
10-17-2013 08:23 AM
…
this.modules.actions.genericAction(
{
success:
{
callback :
{
scope: this,
fn: function(object)
{
//var result = eval("(" +object.serverResponse.responseText+")");
window.open(object.serverResponse.responseText, "_new");
}
},
event:
{
name: "metadataRefresh"
}
},
failure:
{
message: this.msg("message.openExternal.failure", file.displayName, Alfresco.constants.USERNAME)
},
webscript:
{
…
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.