Merge pull request #4 from ltribolet/master

Fix Drag'n drop
This commit is contained in:
Tobias Reich 2013-05-24 05:24:13 -07:00
commit 1204ef63f4

View File

@ -118,16 +118,11 @@ $(document).ready(function(){
.bind("mouseleave", lychee.hideControls); .bind("mouseleave", lychee.hideControls);
/* Upload */ /* Upload */
document.documentElement.ondrop = function (e) { $(document.documentElement)
.on("dragover", function(event) { event.preventDefault();}, false)
e.stopPropagation(); .on("drop", function (e) { e.stopPropagation(); e.preventDefault(); lychee.upload(event.dataTransfer.files); return true;});
e.preventDefault();
lychee.upload(event.dataTransfer.files);
return true;
}
/* Init */ /* Init */
lychee.ready(); lychee.ready();
}); });