-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
150 lines (118 loc) · 5.8 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!DOCTYPE html>
<html>
<head>
<title>Probando CSV-Jquery</title>
<link href="css/bootstrap.css" rel="stylesheet" />
<link href="css/csv_importer.css" rel="stylesheet" />
<script>
Function.prototype.applyAsync = function(params, cb) {
var function_context = this;
setTimeout(function() {
var val = function_context.apply(this, params);
if (cb) cb(val);
}, 0);
};
</script>
</head>
<body>
<div class="container">
<h1>Loading CSV</h1>
<div class="panel panel-default">
<div class="panel-heading">
<h2>Import file:</h2>
</div>
<div class="panel-body">
<div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
<input id="csv_file_input" type="file" accept=".csv" />
</div>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 text-right">
<a id="see_source_btn" class="btn btn-primary" role="button" data-toggle="collapse" href="#div_file_content" aria-expanded="false" aria-controls="div_file_content">See source file content <span class=" glyphicon glyphicon-chevron-down"></span></a>
</div>
</div>
<br />
<div id="div_file_content" class="collapse">
<textarea id="file_content" class="form-control" style="min-height:100px"></textarea>
</div>
<br>
</div>
<div class="panel panel-default">
<div class="panel-heading form-group">
<h3>Mapping</h3>
<div class="row">
<div class="col-lg-6 col-md-6">
<label>Select FORM to send data:</label>
<select class="form-control form-control" style='max-width:500px;' id="form_names">
<option id="0">Select...</option>
</select>
<br>
<input id="first_row_checker" type="checkbox" text="" /> <span> Is first row columns names?</span>
</div>
<div class="col-lg-6 col-md-6"></div>
<label>Select a saved mapping for this FORM</label>
<select class="form-control form-control" style='max-width:500px;' id="mapping_names">
<option id="0">Select...</option>
</select>
</div>
</div>
<div id="table_container" class="panel-body">
<table id="table_mapping" class="table">
<thead>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
<div class="panel-footer">
<label>Write a name for this mapping.</label><br>
<input id="mapNameText" type="text" class="form-control" style='max-width:500px;' required/><br>
<button id="send_data_btn" class="btn btn-primary">Send Data to App Base</button>
</div>
</div>
</div>
<div class="modal fade" id="modal-progress">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Sending data to AppBase</h4>
</div>
<div class="modal-body">
<progress id="sendingProgress" class="form-control"></progress>
<div id="saving-trace">
<div style="margin:10px ">
<span id="currentItem"></span>
</div>
<button id="btn-expand" class="btn btn-default btn-circle" type="button" data-toggle="collapse" data-target="#stackTraceContiner" aria-expanded="false" aria-controls="stackTraceContiner">
<span class="glyphicon glyphicon-chevron-down"></span>
</button>
<div class="collapse" id="stackTraceContiner">
<div class="well">
<ul id="stackTrace">
</ul>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<script src="js/jquery-1.12.4.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/csv_loader.js"></script>
<script src="js/papaparse.min.js"></script>
<script src="js/mocks.js"></script>
<script src="js/appBaseService.js"></script>
<script src="js/indexImport.js">
</script>
<!--script src="js/mocks.js"></script-->
<!--script src="js/test/appBaseServiceTest.js"></script-->
<script src="js/csv_importer.js"></script>
</body>
</html>