/**
* Copy single document or folder.
*
* @method onActionCopyTo
* @param asset {object} Object literal representing the file or folder to be actioned
*/
onActionCopyTo: function dlA_onActionCopyTo(asset)
{
this._copyMoveTo("copy", asset);
},
/**
* Move single document or folder.
*
* @method onActionMoveTo
* @param asset {object} Object literal representing the file or folder to be actioned
*/
onActionMoveTo: function dlA_onActionMoveTo(asset)
{
this._copyMoveTo("move", asset);
},
/**
* Copy/Move To implementation.
*
* @method _copyMoveTo
* @param mode {String} Operation mode: copy|move
* @param asset {object} Object literal representing the file or folder to be actioned
* @private
*/
_copyMoveTo: function dlA__copyMoveTo(mode, asset)
{
// Check mode is an allowed one
if (!mode in
{
copy: true,
move: true
})
{
throw new Error("'" + mode + "' is not a valid Copy/Move to mode.");
}
if (!this.modules.copyMoveTo)
{
this.modules.copyMoveTo = new Alfresco.module.DoclibCopyMoveTo(this.id + "-copyMoveTo");
}
this.modules.copyMoveTo.setOptions(
{
mode: mode,
siteId: this.options.siteId,
containerId: this.options.containerId,
path: this.currentPath,
files: asset,
workingMode: this.options.workingMode,
rootNode: this.options.rootNode,
parentId: this.doclistMetadata.parent.nodeRef
}).showDialog();
},
e il web script copy-move-to. Mi date qualche suggerimento che serve almeno per localizzare il codice per pensare alla modifica? Grazie a tutti.
onOK: function DLCMT_onOK(e, p_obj)
{
var files, multipleFiles = [], params, i, j,
eventSuffix =
{
copy: "Copied",
move: "Moved"
};
// Single/multi files into array of nodeRefs
if (YAHOO.lang.isArray(this.options.files))
{
files = this.options.files;
}
else
{
files = [this.options.files];
}
for (i = 0, j = files.length; i < j; i++)
{
multipleFiles.push(files[i].nodeRef);
}
// Success callback function
var fnSuccess = function DLCMT__onOK_success(p_data)
{
var result,
successCount = p_data.json.successCount,
failureCount = p_data.json.failureCount;
this.widgets.dialog.hide();
// Did the operation succeed?
if (!p_data.json.overallSuccess)
{
Alfresco.util.PopupManager.displayMessage(
{
text: "COPIATO O SPOSTATO"//this.msg("message.failure")
});
return;
}
YAHOO.Bubbling.fire("files" + eventSuffix[this.options.mode],
{
destination: this.currentPath,
successCount: successCount,
failureCount: failureCount
});
for (var i = 0, j = p_data.json.totalResults; i < j; i++)
{
result = p_data.json.results[i];
if (result.success)
{
YAHOO.Bubbling.fire((result.type == "folder" ? "folder" : "file") + eventSuffix[this.options.mode],
{
multiple: true,
nodeRef: result.nodeRef,
destination: this.currentPath
});
}
}
Alfresco.util.PopupManager.displayMessage(
{
text: "COPIATO O SPOSTATO!!!!!!"//this.msg("message.success", successCount)
});
};
Archive content from product discussions in Italian.
This group is now closed and content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.