[extensions-web] js: Remove drop functionality from uploader



commit 909c26593528ba787023436e46b871fa32e4de36
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Apr 2 09:56:34 2012 -0400

    js: Remove drop functionality from uploader
    
    It never worked properly

 sweettooth/static/js/uploader.js |   43 ++++++++------------------------------
 1 files changed, 9 insertions(+), 34 deletions(-)
---
diff --git a/sweettooth/static/js/uploader.js b/sweettooth/static/js/uploader.js
index 0d2a33b..18c0638 100644
--- a/sweettooth/static/js/uploader.js
+++ b/sweettooth/static/js/uploader.js
@@ -65,41 +65,16 @@ define(['jquery'], function($) {
             return false;
         }
 
-        var $drop = $('<span>', { 'class': 'drop' }).hide().appendTo($elem);
-
         var inClick = false;
-        $elem.on({
-            click: function() {
-                // Prevent the handler from running twice from bubbling.
-                if (inClick)
-                    return;
-
-                inClick = true;
-                $input[0].click();
-                inClick = false;
-                return false;
-            },
-
-            dragover: function() {
-                // Have to prevent default action to define a drop target.
-                return false;
-            },
-
-            dragenter: function(e) {
-                if (e.relatedTarget == $elem[0])
-                    $drop.fadeIn();
-
-                return false;
-            },
-
-            dragleave: function(e) {
-                if (e.relatedTarget == $elem[0])
-                    $drop.fadeOut();
-
-                return false;
-            },
-
-            drop: upload
+        $elem.on('click', function() {
+            // Prevent the handler from running twice from bubbling.
+            if (inClick)
+                return;
+
+            inClick = true;
+            $input[0].click();
+            inClick = false;
+            return false;
         });
 
         $input.on('change', upload);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]