aboutsummaryrefslogtreecommitdiffstats
path: root/addon/js_upload/file-uploader/tests/test-drop-zone.htm
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2011-01-27 07:14:55 +0100
committerfabrixxm <fabrix.xm@gmail.com>2011-01-27 07:14:55 +0100
commit444d82a5328433fbe48e18b928d35218905a756c (patch)
tree84bd92072bf37eee3b54ebf7cb9ccaf408562e67 /addon/js_upload/file-uploader/tests/test-drop-zone.htm
parent6558ee1e2210fb41b1f4d95f806ee441a565087d (diff)
parentd2dddd995abef2d0805901b278647bef0ce50f88 (diff)
downloadvolse-hubzilla-444d82a5328433fbe48e18b928d35218905a756c.tar.gz
volse-hubzilla-444d82a5328433fbe48e18b928d35218905a756c.tar.bz2
volse-hubzilla-444d82a5328433fbe48e18b928d35218905a756c.zip
Merge branch 'friendika-master'
Diffstat (limited to 'addon/js_upload/file-uploader/tests/test-drop-zone.htm')
-rw-r--r--addon/js_upload/file-uploader/tests/test-drop-zone.htm48
1 files changed, 48 insertions, 0 deletions
diff --git a/addon/js_upload/file-uploader/tests/test-drop-zone.htm b/addon/js_upload/file-uploader/tests/test-drop-zone.htm
new file mode 100644
index 000000000..d7f0accf7
--- /dev/null
+++ b/addon/js_upload/file-uploader/tests/test-drop-zone.htm
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <style>
+ .drop-zone {height:100px; width:256px; background:gray; margin:20px;}
+ </style>
+ <script src="jquery-1.4.2.min.js" type="text/javascript"></script>
+ <script src="../client/fileuploader.js" type="text/javascript" ></script>
+ <script>
+
+function createDropZone(selector){
+ var element = $(selector)[0];
+
+ new qq.UploadDropZone({
+ element: element,
+ onEnter: function(){
+ console.log('enter')
+ $(element).css('background', 'green');
+ },
+ onLeave: function(){
+ console.log('leave')
+ },
+ onLeaveNotDescendants: function(){
+ console.log('onLeaveNotDescendants')
+ $(element).css('background', 'gray');
+ },
+ onDrop: function(e){
+ $(element).css('background', 'gray');
+ console.log('drop');
+ console.log(e.dataTransfer.files);
+ }
+ });
+}
+
+jQuery(function(){
+ createDropZone('#drop-zone1');
+ createDropZone('#drop-zone2');
+});
+
+ </script>
+</head>
+<body>
+ <div id="drop-zone1" class="drop-zone"><p>drop-zone1</p></div>
+ <div id="drop-zone2" class="drop-zone"><p>drop-zone2</p></div>
+</body>
+</html>
+
+