From 56de0cda8ab100dcb4c913fe2b39126fb84ed9ed Mon Sep 17 00:00:00 2001 From: steinm Date: Wed, 30 Jan 2013 20:01:34 +0000 Subject: [PATCH] - added onAddClipboard() which is called when an object is dropped on the clipboard --- styles/bootstrap/application.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/styles/bootstrap/application.js b/styles/bootstrap/application.js index 159b13d9e..e1aebacf7 100644 --- a/styles/bootstrap/application.js +++ b/styles/bootstrap/application.js @@ -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; + } +}