我们已经在文档库中编写了自定义doclib操作。我们正在使用alfresco 5.x;当单击自定义链接时,如果失败则调用“ onManifestAsset”操作,则应使用确定和取消按钮提示弹出窗口。当我单击“确定”按钮时,另一个ajax呼叫没有被呼叫。
YAHOO.Bubbling.fire("registerAction",
{
actionName: "onManifestAsset",
fn: function onManifestAsset(file) {
this.modules.actions.genericAction(
{
success:
{
message: this.msg("success")
},
failure:
{
callback :
{
scope: this,
fn: function(object)
{
Alfresco.util.PopupManager.displayPrompt(
{
text: "Your zip file does not include a metadata spreadsheet;",
buttons: [
{
text: "Ok",
handler: function()
{
this.destroy();
console.log("...start::::::it is normal zip without meta data template:")
//its coming here but below ajax is not getting called when I click ok button
Alfresco.util.Ajax.request(
{
url: Alfresco.constants.PROXY_URI+"xxxxx/manifestZIP?nodeRef="+file.nodeRef,
method: "GET",
successCallback:
{
fn: function dlA_onActionDetails_refreshSuccess(response) {
Alfresco.util.PopupManager.displayMessage({
text: "Success"
});
},
scope: this
},
failureMessage: this.msg("message.delete.failure", ".......")
});
}
},
{
text: "Cancel",
handler: function()
{
this.destroy();
},
isDefault: true
}
]
});
}
}
},
webscript:
{
name: "xxxx/extractAsset?nodeRef={nodeRef}",
stem: Alfresco.constants.PROXY_URI,
method: Alfresco.util.Ajax.GET,
params:
{
nodeRef: file.nodeRef
}
},
config:
{
}
});
}
})