Created
October 18, 2016 03:21
-
-
Save d30jeff/72dd30d0363eeb95d8da2d75c4196e2e to your computer and use it in GitHub Desktop.
What is this front end bullshit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
dropzoneBody.ondrop = function(e) { | |
e.stopPropagation(); | |
e.preventDefault(); | |
var self = this; | |
self.className = 'dropzone'; // adds the border placeholder | |
var file = e.dataTransfer.files[0]; | |
var reader = new FileReader(); | |
$("#loader").show(); | |
reader.onload = function(event) { | |
var result = event.target.result; | |
var lines = result.split('\n'); | |
setTimeout(function() { | |
lines.forEach(function(perLine) { | |
readData(perLine); | |
}); | |
$("#loader").hide(); | |
}, 0); | |
}; | |
reader.readAsText(file); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment