-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.html
194 lines (174 loc) · 7.26 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>electronic filings dashboard</title>
<link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="assets/datepicker/css/datepicker.css" rel="stylesheet">
<link href="dashboard.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="modal" id="settings">
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
<h3>settings</h3>
</div>
<div class="modal-body">
<p>This application requires an API key from The New York Times. <a href="http://developer.nytimes.com/apps/register" target="_new">Sign up for a key</a>.</p>
<form>
<label>API key</label>
<input id="apikey" name="apikey" type="text" class="input-large span4" placeholder="Enter API key">
<label class="checkbox">
<input type="checkbox" id="show-notifications">Show desktop notifications
</label>
</div>
<div class="modal-footer">
<input type="submit" id="save-settings" class="btn" value="save">
</form>
</div>
</div>
<div class="modal" id="about">
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
<h3>about</h3>
</div>
<div class="modal-body">
<p>This dashboard was created to make it easier to track filings as they are reported to the Federal Election Commission.</p>
<p>It includes all reports that are filed electronically -- presidential and House candidates, as well as most political action committees. Senate candidates do not file their reports electronically.</p>
<p>The data is updated every 15 minutes.</p>
<p>Created by <a href="https://github.com/bycoffe">Aaron Bycoffe</a></p>
</div>
</div>
<div class="row">
<div class="span3 offset9 top-button">
<a class="btn" data-toggle="modal" href="#settings"><i class="icon-cog"></i> Settings</a>
<a class="btn" data-toggle="modal" href="#about"><i class="icon-info-sign"></i> About</a>
<a href="http://developer.nytimes.com/docs/campaign_finance_api">
<img src="http://graphics8.nytimes.com/packages/images/developer/logos/poweredby_nytimes_65a.png">
</a>
</div>
</div>
<div class="row">
<div class="page-header span12">
<h1>electronic filings dashboard</h1>
<h1>
<small>
powered by <a href="http://developer.nytimes.com/docs/campaign_finance_api">the New York Times campaign finance API</a>
</small>
</h1>
</div>
</div>
<div class="row" id="welcome">
<div class="span8 alert alert-info">
<p><strong>Welcome.</strong></p>
<p>
To use the dashboard you'll need an API key from The New York Times. <a href="http://developer.nytimes.com/apps/register" target="_new">Get one here</a>.
</p>
<p>
If you already have an API key, <span id="welcome-enter-api-key">enter it here</span>.
</p>
</div>
</div>
<div id="filing-content">
<div class="row">
<div class="span2">
<button class="btn" type="button" id="update-now"><i class="icon-refresh"></i> Update now</button>
</div>
<div class="span3">
<div class="input-append date" id="datepicker" data-date="" data-date-format="dd-mm-yyyy">
<input id="datepicker-input" size="6" style="width:120px;" type="text" value="" readonly>
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<div class="span2 offset5 alignRight">
<i class="icon-pencil"></i> Amendment
</div>
</div>
<div class="row">
<div class="span12"> </div>
</div>
<table id="filings" class="table table-striped hidden-phone">
<thead>
<tr>
<th class="table-committee">Committee</th>
<th class="table-form">Form</th>
<th class="table-amendment"></th>
<th class="table-title">Title</th>
<th class="table-to">Date Through</th>
<th class="table-raised">Raised</th>
<th class="table-spent">Spent</th>
</tr>
</thead>
<tbody data-spy="scroll">
</tbody>
</table>
<table id="mobile-filings" class="table table-striped visible-phone hidden-tablet hidden-desktop">
<tbody>
</tbody>
</table>
</div>
</div>
<script type="text/html" id="filing-row-template">
<td class="table-committee" rel="tooltip" title="<%= full_committee_type %>"><a href="http://images.nictusa.com/cgi-bin/fecimg/?<%= committee_id %>"><%= committee_name %></a></td>
<td><%= form_type %></td>
<td>
<% if (is_amendment) { %>
<i title="This is an amendment" class="icon-pencil"></i>
<% } %>
</td>
<td><a href="<%= fec_uri %>"><%= report_title %></a></td>
<td><%= date_coverage_to %></td>
<td>
<% if (raised) { %>
$<%= raised %>
<% } %>
</td>
<td>
<% if (spent) { %>
$<%= spent %>
<% } %>
</td>
</script>
<script type="text/html" id="mobile-filing-row-template">
<td>
<div class="row">
<strong>Committee:</strong> <a href="http://images.nictusa.com/cgi-bin/fecimg/?<%= committee_id %>"><%= committee_name %></a>
</div>
<div class="row">
<strong>Form:</strong> <%= form_type %>
<% if (is_amendment) { %>
<i title="This is an amendment" class="icon-pencil"></i>
<% } %>
</div>
<% if (report_period) { %>
<div class="row">
<strong>Title:</strong> <a href="<%= fec_uri %>"><%= report_period %></a>
</div>
<% } %>
<% if (raised) { %>
<div class="row">
<strong>Raised:</strong> $<%= raised %>
</div>
<% } %>
<% if (spent) { %>
<div class="row">
<strong>Spent:</strong> $<%= spent %>
</div>
<% } %>
<div class="row">
<strong>Date through:</strong> <%= date_coverage_to %>
</div>
</div>
</td>
</script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="assets/js/underscore-min.js"></script>
<script type="text/javascript" src="assets/js/backbone-min.js"></script>
<script type="text/javascript" src="assets/js/bootstrap/bootstrap-modal.js"></script>
<script type="text/javascript" src="assets/datepicker/js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="dashboard.js"></script>
</body>
</html>