summaryrefslogtreecommitdiff
path: root/js/cabinet.js
diff options
context:
space:
mode:
authorJuuso Lapinlampi <wub@partyvan.eu>2015-10-09 17:04:21 +0200
committerJuuso Lapinlampi <wub@partyvan.eu>2015-10-09 17:04:21 +0200
commit575b78b9d679db2243083f9ecc8b1543b2a1af02 (patch)
treefff0b99152a97cdfd5212ae05b7c1382b4f4afb6 /js/cabinet.js
parent59502c86ceba164c3ccf1a7fa58bf33560157d2b (diff)
Lint cheesesteak.js and cabinet.js id-length < 2
Fixes ESLint id-length errors using airbnb/legacy config. Variable "i" is ignored as an exception. I've also avoided creating new errors with these changes, so this also fixes some no-unused-vars and avoids creating vars-on-top errors.
Diffstat (limited to 'js/cabinet.js')
-rw-r--r--js/cabinet.js14
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();
});
};