diff options
author | Peter Grassberger <petertheone@gmail.com> | 2016-06-27 23:17:12 (GMT) |
---|---|---|
committer | Peter Grassberger <petertheone@gmail.com> | 2016-06-27 23:17:12 (GMT) |
commit | 06bd47c0bed25779d679eab1385b74345f7f153b (patch) | |
tree | 42042792530b715fbc70c4f94ae87a136ef99075 | |
parent | 7f14cd762b6a3381c5f3f926ed68c3c0e8cdf4d2 (diff) |
uploadModal: hide input, fix duplicate events
-rw-r--r-- | www/js/importer.js | 8 | ||||
-rw-r--r-- | www/styles/main-style.css | 4 |
2 files changed, 8 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; diff --git a/www/styles/main-style.css b/www/styles/main-style.css index 9ee1b83..b76c32f 100644 --- a/www/styles/main-style.css +++ b/www/styles/main-style.css @@ -94,6 +94,10 @@ body { background-position: center center; } +#uploadModal div.modal-body .drop form input { + display: none; +} + #uploadModal div.modal-body form { display: block; width: 100%; |