- added onAddClipboard() which is called when an object is dropped on

the clipboard
This commit is contained in:
steinm 2013-01-30 20:01:34 +00:00
parent 4dc94c37b1
commit 56de0cda8a

View File

@ -120,6 +120,7 @@ $(document).ready( function() {
function allowDrop(ev) {
ev.preventDefault();
// console.log(ev);
}
function onDragStartDocument(ev) {
@ -151,3 +152,13 @@ function onDrop(ev) {
// console.log(attr_rel);
// console.log(ev.dataTransfer.getData("type") + ev.dataTransfer.getData("id"));
}
function onAddClipboard(ev) {
ev.preventDefault();
source_type = ev.dataTransfer.getData("type");
source_id = ev.dataTransfer.getData("id");
if(source_type == 'document' || source_type == 'folder') {
url = "../op/op.AddToClipboard.php?id="+source_id+"&type="+source_type;
document.location = url;
}
}