Hi,I am using 4.1.4 enterprise version and trying to deploy the Share Backup Action Addon which was created for earlier versions of Alfresco.I have changed the action registration as follows:
(function()
{
/**
* Backup single document.
*
* @method onActionBackup
* @param file {object} Object literal representing one or more file(s) or folder(s) to be actioned
*/
YAHOO.Bubbling.fire("registerAction",
{
actionName: "onActionBackup",
fn: function MBP_onActionBackup(file)
{
this.modules.actions.genericAction(
{
success:
{
message: this.msg("message.backup.success", file.displayName)
},
failure:
{
message: this.msg("message.backup.failure", file.displayName)
},
webscript:
{
name: "backup/site/{site}/{container}",
method: Alfresco.util.Ajax.POST,
params:
{
site: this.options.siteId,
container: this.options.containerId
}
},
config:
{
requestContentType: Alfresco.util.Ajax.JSON,
dataObj:
{
nodeRefs: [file.nodeRef]
}
}
});
}
});
})();
The url defined by the descriptor is/slingshot/doclib/action/backup/site/{site}/{container} I also configured the action in share and declared the js and css dependencies. I have deployed the data webscript in the data dictionary. Now action appears in share with the label and icon defined by the properties file and stylesheet file respectively. The PROBLEM is when the action is clicked I get error generated by the client-side js (Couldn't backup ..) and to me it does not seem to be able to call the webscript. Please help.Kind regards