-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
executable file
·74 lines (61 loc) · 2.47 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!doctype html>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<html lang="no">
<head>
<title>NBIC</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<script lang="javascript" src="lib/js-xlsx/dist/xlsx.full.min.js"></script>
<script lang="javascript" src="lib/papaparse/papaparse.min.js"></script>
<link rel="stylesheet" href="lib/bootstrap-modal/bootstrap-modal.css"/>
<link rel="stylesheet" href="lib/bootstrap/css/bootstrap.min.css"/>
<link rel="stylesheet" href="lib/font-awesome/css/font-awesome.min.css"/>
<link rel="stylesheet" href="lib/durandal/css/durandal.css"/>
<link rel="stylesheet" href="lib/bootstrap/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/bootstrap_callout.css">
<link rel="stylesheet" href="css/custom.css"/>
<link rel="stylesheet" href="lib/jquery-ui/jquery-ui.min.css"/>
<script src="lib/require/require.js" data-main="app/main"></script>
<script src="lang/lang.js" data-main="app/main"></script>
<script lang="javascript">
var dragged_csv = "";
var clicked = 0;
function handleDrop(e) {
e.stopPropagation(); e.preventDefault();
var files = e.dataTransfer.files, f = files[0];
var reader = new FileReader();
reader.onload = function(e) {
var data = new Uint8Array(e.target.result);
var workbook = XLSX.read(data, {type: 'array'});
dragged_csv = XLSX.utils.sheet_to_csv(workbook.Sheets[workbook.SheetNames[0]]);
};
reader.readAsArrayBuffer(f);
}
function allowDrop(e) {
e.preventDefault();
}
function showUploader() {
clicked++;
if (clicked > 6) {
console.log("Showing");
$('#uploader').show();
}
}
function handleFile(e) {
var files = e.target.files, f = files[0];
var reader = new FileReader();
reader.onload = function(e) {
var data = new Uint8Array(e.target.result);
var workbook = XLSX.read(data, {type: 'array'});
dragged_csv = XLSX.utils.sheet_to_csv(workbook.Sheets[workbook.SheetNames[0]]);
};
reader.readAsArrayBuffer(f);
}
</script>
</head>
<body>
<div class="pageContainer" id="applicationHost">
<h2 style="padding: 50px;">Loading...</h2>
</div>
</body>
</html>