summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorPeter Grassberger <petertheone@gmail.com>2016-06-27 23:17:12 (GMT)
committerPeter Grassberger <petertheone@gmail.com>2016-06-27 23:17:12 (GMT)
commit06bd47c0bed25779d679eab1385b74345f7f153b (patch)
tree42042792530b715fbc70c4f94ae87a136ef99075 /www/js
parent7f14cd762b6a3381c5f3f926ed68c3c0e8cdf4d2 (diff)
uploadModal: hide input, fix duplicate events
Diffstat (limited to 'www/js')
-rw-r--r--www/js/importer.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/www/js/importer.js b/www/js/importer.js
index 09f5db5..dd8913f 100644
--- a/www/js/importer.js
+++ b/www/js/importer.js
@@ -137,20 +137,20 @@ Rdxport.Importer.prototype.openModal = function(group, groupView, cartNumber, ne
var $form = $('form', $drop);
var $fileInput = $('input[type="file"]', $form);
- $drop.on('click', function(event) {
+ $drop.off('click').on('click', function(event) {
$fileInput.get(0).click();
});
- $fileInput.on('change', function() {
+ $fileInput.off('change').on('change', function() {
handleFiles($(this).get(0).files);
});
- $drop.on('dragenter dragover', function(event) {
+ $drop.off('dragenter dragover').on('dragenter dragover', function(event) {
event.stopPropagation();
event.preventDefault();
});
- $drop.on('drop', function(event) {
+ $drop.off('drop').on('drop', function(event) {
event.stopPropagation();
event.preventDefault();
var dataTransfer = event.dataTransfer;