forked from aniav/ynab-csv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
123 lines (113 loc) · 5.06 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
<!DOCTYPE html>
<!-- vim: set tabstop=2 shiftwidth=2 softtabstop=2 expandtab : -->
<html lang="en">
<head>
<title>YNAB CSV Converter</title>
<link rel="icon" type="image/png" href="images/icon16.png" />
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
<link rel="stylesheet" type="text/css" href="./app.css" />
<script type="text/javascript" src="lib/papaparse.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.6.7/angular.js"></script>
<script src="src/data_object.js"></script>
<script src="src/app.js"></script>
<script src="https://d3tvtfb6518e3e.cloudfront.net/3/opbeat.min.js"
data-org-id="1e81854d04cb41269d776ad75dd01a9c"
data-app-id="6fd115e6f0">
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-112130993-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-112130993-1');
</script>
</head>
<body ng-controller='ParseController' ng-class="{angular_loaded: angular_loaded}">
<div id='header_nav' class='show_on_load'>
<div class='container'>
<!-- <h1>YNAB CSV</h1> -->
<div class='pull-right' ng-if='data_object.base_json'>
<div class='btn btn-default' ng-click='reloadApp()'><i class='fa fa-refresh'></i> Load a different file</div>
<div class='btn btn-primary' ng-click='downloadFile()'><i class='fa fa-cloud-download'></i> Save YNAB Data</div>
</div>
<a href='https://github.com/aniav/ynab-csv/issues/new' target='_blank' class='btn btn-default'><i class='fa fa-exclamation-circle'></i> Report an issue</a>
</div>
</div>
<div dropzone='data.source' encoding="{{file.chosenEncoding}}">
<div class='container show_on_load'>
<br>
<div id='upload_wrapper' ng-if='!data_object.base_json'>
<div id='drop_text'>Drop File</div>
<br>
<form class="form-inline">
<!-- <div class='btn btn-primary'>Or Choose</div> -->
<div class='fileUpload btn btn-primary'>
<span>Or Choose <i class='fa fa-folder-open'></i></span>
<input id='file' type='file' fileread='data.source' encoding="{{file.chosenEncoding}}"/>
</div>
<div class="form-group">
<label class="sr-only" for="file.encoding">File encoding</label>
<select ng-model="file.chosenEncoding"
ng-options="enc for enc in file.encodings track by enc"
ng-change="encodingChosen(file.chosenEncoding)"
class="form-control">
</select>
</div>
</form>
</div>
<div id='tool_wrapper' ng-if='data_object.base_json'>
<div class="panel panel-default">
<div class="panel-heading">
<div ng-show="ynab_map['Inflow'] == ynab_map['Outflow']" class="btn btn-default pull-right" ng-click="invert_flows()">
<i class="fa fa-exchange"></i> Invert flows
</div>
<h4>YNAB Data <small>(1st 10 rows)</small></h4>
<div class="clearfix"></div>
</div>
<div class='table-container'>
<table class='table table-striped'>
<thead>
<tr class="form-row">
<th scope="col" class="form-group" ng-repeat='col in ynab_cols'>
<label for="id-{{col}}">{{col}}</label>
<select class="form-control" id="id-{{col}}" ng-model="ynab_map[col]" ng-options="f for f in data_object.fields()"></select>
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat='row in preview'>
<td ng-repeat='col in ynab_cols'>
{{row[col]}}
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>Source Data</strong> <em>(1st 10 rows)</em></div>
<div class='table-container'>
<table class='table'>
<thead>
<tr>
<th ng-repeat='col in data_object.fields()'>{{col}}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat='row in data_object.rows() | limitTo:10'>
<td ng-repeat='col in data_object.fields()'>{{row[col]}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div id='angular_is_loading'>
<div class='loading_text'><i class="fa fa-spinner fa-spin"></i> Loading...</div>
</div>
</body>
</html>