07-18-2012 12:39 PM
07-19-2012 12:01 PM
(function() {
YAHOO.Bubbling.fire("registerAction",
{
actionName: "onActionZipExport",
fn: function vamirr_onActionZipExport(file) {
try{
nodeId = file.nodeRef.replace("workspace://SpacesStore/","");
console.log(nodeId);
this.widgets.popupMessage = Alfresco.util.PopupManager.displayMessage(
{ text: Alfresco.util.message("message.ZipExport.progress", file.displayName),
spanClass: "wait",
displayTime: 1000,
effect: null,
modal:true
});
//return;
}catch(err){alert(err);}
this.modules.actions.genericAction(
{
success:
{
message: this.msg("message.ZipExport.success", file.displayName),
callback : {
scope: this,
fn: function(object){
this.widgets.popupMessage.destroy();
var result = eval('(' + object.serverResponse.responseText + ')');
var newLocation = "/share/proxy/alfresco/api/node/content/workspace/SpacesStore/" + result.download;
window.open(window.location.protocol + "//" + window.location.hostname + newLocation, "_new");
}
},
event: { name: "metadataRefresh" }
},
failure:
{
message: this.msg("message.ZipExport.failure", file.displayName),
callback : {
scope: this,
fn: function(object){ this.widgets.popupMessage.destroy();}
},
event: { name: "metadataRefresh" }
},
webscript:
{
name: "vamirr/zipexport/{nodeRef}.json",
stem: Alfresco.constants.PROXY_URI,
method: Alfresco.util.Ajax.GET,
params:
{
nodeRef: nodeId
}
},
config:
{
}
});
}
});
})();
(function() {
YAHOO.Bubbling.fire("registerAction",
{
actionName: "onActionZipImport",
fn: function vamirr_onActionZipImport(file) {
this.widgets.popupMessage = Alfresco.util.PopupManager.displayMessage(
{
text: Alfresco.util.message("message.ZipImport.progress", file.displayName),
spanClass: "wait",
displayTime: 1000,
effect: null,
modal: true
});
//return;
this.modules.actions.genericAction(
{
success:
{
message: this.msg("message.ZipImport.success", file.displayName),
callback : {
scope: this,
fn: function(object){
this.widgets.popupMessage.destroy();
}
},
event: { name: "metadataRefresh" }
},
failure:
{
message: this.msg("message.ZipImport.failure", file.displayName),
callback : {
scope: this,
fn: function(object){ this.widgets.popupMessage.destroy();}
},
event: { name: "metadataRefresh" }
},
webscript:
{
name: "vamirr/zipimport?nodeRef={nodeRef}",
method: Alfresco.util.Ajax.GET,
stem: Alfresco.constants.PROXY_URI,
params:
{
nodeRef: file.nodeRef
}
},
config:
{
}
});
}
});
})();
07-20-2012 11:51 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.