diff options
Diffstat (limited to 'js/cabinet.js')
| -rw-r--r-- | js/cabinet.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/js/cabinet.js b/js/cabinet.js index 2e2408b..09f4e71 100644 --- a/js/cabinet.js +++ b/js/cabinet.js @@ -31,7 +31,7 @@ var _this = this; var passthrough = function(outer, inner, prevent, fn) { - _this.on(outer, function(e) { + _this.on(outer, function(evt) { if (inner === 'click') { $input[0].click(); } else { @@ -39,19 +39,19 @@ } if (prevent) { - e.preventDefault(); + evt.preventDefault(); } if (fn) { - fn(e); + fn(evt); } }, false); }; $input[0].filelist = Object.create(FileList); - $input.on('change', function(e) { - this.filelist = e.target.files; + $input.on('change', function(evt) { + this.filelist = evt.target.files; _this.change(); }); @@ -59,8 +59,8 @@ passthrough('dragover', 'dragover', true); passthrough('dragleave', 'dragleave', true); passthrough('click', 'click', false); - passthrough('drop', 'dragleave', true, function(e) { - $input[0].filelist = e.dataTransfer.files; + passthrough('drop', 'dragleave', true, function(evt) { + $input[0].filelist = evt.dataTransfer.files; _this.change(); }); }; |
