Hi,how can you move a document if you have the id of the document and the path of the destination folder?I need to move the document in a presentation template.I've tried with document.move(destination); or things like that…this is a part of the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="/alfresco/scripts/webdav.js"></script>
<script type="text/javascript">
…
function moveDocument(docId, path, folder){
alert(path + '/' + folder); // = test -> OK
alert(docId); // = test -> OK
********** DO THE MOVE HERE **********
}
…
</script>
</head>
<body>
…
<#list (space.children)! as c>
…
<#list c.parent.children as child>
…
<a href="#" onClick="javascript:moveDocument('${c.id}', '${child.displayPath}', '${child.properties.name}');" title="Move document to ${child.properties.name}"><b>${child.properties.name}</b></a>
…
</#list>
…
</body>
</html>
can someone help me?