This repository has been archived by the owner on Aug 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
emergency.html
382 lines (376 loc) · 20 KB
/
emergency.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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width initial-scale=1.0 user-scalable=yes" />
<meta name="robots" content="noindex, nofollow" />
<title>FTS Mobile Test Page</title>
<link type="text/css" rel="stylesheet" href="docs.css" />
<link type="text/css" rel="stylesheet" href="docs_carousel.css" />
<link type="text/css" rel="stylesheet" href="mmenu.css" />
<link type="text/css" rel="stylesheet" media="all and (min-width: 900px)" href="mmenu-widescreen.css" />
<link type="text/css" rel="stylesheet" href="carousel.css" />
<script type="text/javascript" src="jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="jquery.hammer.min.js"></script>
<script type="text/javascript" src="jquery.mmenu.min.js"></script>
<script type="text/javascript" src="modernizr.js"></script>
<script type="text/javascript" src="data/appeal.js"></script>
<script type="text/javascript" src="data/emergency.js"></script>
<script type="text/javascript" src="data/funding_donor_16271.js"></script>
<script type="text/javascript" src="data/funding_recipient_16271.js"></script>
<script type="text/javascript" src="data/organization.js"></script>
<script type="text/javascript" src="common.js"></script>
</head>
<body>
<div id="page">
<div id="header">
<a href="#menu"></a>
<img id="logo" src="logo.png"/>
</div>
<div id="content">
<div id="carousel">
<ul>
<li class="pane1"><table id="progress"><tr><td></td><td><img class="progress" src="progress/progress1of3.png"/></td><td class="forward"><a href="#" class="forward"><img class="forward" src="progress/forward_arrow.png"/></a></td></tr></table><h2 id="tables"></h2><div class='grouprow'><h4 class='contents mediumlight'>INSIDE THE REPORT</h4></div><div class='grouprow'><ul class="list"><li class="list" id="one"><a href="#"><img src="bullets/1.png" class="bullet"/> SUMMARY</a></li><li class="list" id="two"><a href="#"><img src="bullets/2.png" class="bullet"/> FUNDING PER APPEALING ORG.</a></li><li class="list" id="three"><a href="#"><img src="bullets/3.png" class="bullet"/> FUNDING PER DONOR</a></li></ul></div></li>
<li class="pane2"><table id="progress"><tr><td class="back"><a href="#" class="back"><img class="back" src="progress/back_arrow.png"/></a></td><td><img class="progress" src="progress/progress2of3.png"/></td><td class="forward"><a href="#" class="forward"><img class="forward" src="progress/forward_arrow.png"/></a></td></tr></table><div class='grouprow' id="subtitle"><h3 class="mediumdark">FUNDING PER APPEALING ORGANISATION</h3></div>
<form name="sortselect" action="" method="POST" onchange="RedrawRecipient()">
<div class="sortdiv0"> FILTER BY FIRST LETTER:
<select id="sortrecipientletter">
<option value="All">All</option>
</select>
</div>
<div class="sortdiv"> SORT BY:
<select id="sortrecipient">
<option value="name_asc">Title ascending</option>
<option value="name_desc">Title descending</option>
<option value="contrib_asc">Contributions ascending</option>
<option value="contrib_desc">Contributions descending</option>
</select>
</div>
</form>
</li>
<li class="pane3"><table id="progress"><tr><td class="back"><a href="#" class="back"><img class="back" src="progress/back_arrow.png"/></a></td><td><img class="progress" src="progress/progress3of3.png"/></td><td></td></tr></table><div class='grouprow' id="subtitle"><h3 class="mediumdark">FUNDING PER DONOR</h3></div>
<form name="sortselect" action="" method="POST" onchange="RedrawDonor()">
<div class="sortdiv0"> FILTER BY FIRST LETTER:
<select id="sortdonorletter">
<option value="All">All</option>
</select>
</div>
<div class="sortdiv"> SORT BY:
<select id="sortdonor">
<option value="name_asc">Title ascending</option>
<option value="name_desc">Title descending</option>
<option value="contrib_asc">Contributions ascending</option>
<option value="contrib_desc">Contributions descending</option>
</select>
</div>
</form>
</li>
<script>
$('div#carousel').hide()
$('td.back a').click(function(){carousel.prev()})
$('td.forward a').click(function(){carousel.next()})
$('li#one a').click(function(){carousel.showPane("0")})
$('li#two a').click(function(){carousel.showPane("1")})
$('li#three a').click(function(){carousel.showPane("2")})
$('li#four a').click(function(){carousel.showPane("3")})
$('li#five a').click(function(){carousel.showPane("4")})
thisemergency = emergency.filter(function(d){return d.id==GetUrlValue("id")})[0]
$(' li.pane1 table#progress').after("<div class='grouprow'><h2 id='breadcrumb'>"+thisemergency.title.toUpperCase()+" ("+thisemergency.type +")</h2></div>")
$(' li.pane2 table#progress').after("<div class='grouprow'><h2 id='breadcrumb'>"+thisemergency.title.toUpperCase()+" ("+thisemergency.type +")</h2></div>")
$(' li.pane3 table#progress').after("<div class='grouprow'><h2 id='breadcrumb'>"+thisemergency.title.toUpperCase()+" ("+thisemergency.type +")</h2></div>")
//Recipient Table Data
byrecipienttable = recipientfunding.grouping.filter(function(d){return d.type!=null&d.amount>0}).sort(function(a, b){var keyA = a.type.toUpperCase(),keyB = b.type.toUpperCase();if(keyA < keyB) return -1;if(keyA > keyB) return 1;return 0;})
//Donor Table Data
bydonortable = donorfunding.grouping.filter(function(d){return d.type!=null&d.amount>0}).sort(function(a, b){var keyA = a.type.toUpperCase(),keyB = b.type.toUpperCase();if(keyA < keyB) return -1;if(keyA > keyB) return 1;return 0;})
//Pane 1
$('li.pane1 h2#tables').after("<div class='grouprow' id='overview1'><div class='cell'><h3 class='overview dark' id='funding'></h3><h4 class='overview dark'>FUNDING</h4></div><div class='cell'><h3 class='overview mediumdark' id='pledges'></h3><h4 class='overview mediumdark'>PLEDGED</h4></div></div>")
$('li.pane1 h3#funding').append("$"+truncnumber(thisemergency.funding))
$('li.pane1 h3#pledges').append("$"+truncnumber(thisemergency.pledges))
//Pane 2
recipientletters = []
$('li.pane2 form').after("<table id='pane2table'></table>")
for(i=0;i<Math.round(byrecipienttable.length/2);i++){$('table#pane2table').append("<tr id='tr"+i+"'></tr>")}
for(i=0;i<byrecipienttable.length;i++){
$('table#pane2table tr#tr'+Math.floor(i/2)).append("<td class='grid'><div class='dark' id='type'>"+byrecipienttable[i].type.toUpperCase()+"</div><div class='grouprow'></div><div class='mediumlight' id='amount'><strong>$"+truncnumber(byrecipienttable[i].amount)+"</strong></br>FUNDING</div></td>")
var currentletter = byrecipienttable[i].type.charAt(0).toUpperCase()
if(!recipientletters.contains(currentletter)){
recipientletters.push(currentletter)
$('select#sortrecipientletter').append("<option value='"+currentletter+"'>"+currentletter+"</option>")
}
}
RedrawRecipient = function(){
selected = $('#sortrecipient').val()
selectedletter = $('#sortrecipientletter').val()
if(selected=="name_asc"){newbyrecipienttable = byrecipienttable.sort(function(a, b){var keyA = a.type.toUpperCase(),keyB = b.type.toUpperCase();if(keyA < keyB) return -1;if(keyA > keyB) return 1;return 0;}).filter(function(d){return selectedletter=="All"?true:d.type.charAt(0).toUpperCase()==selectedletter})}
else{if(selected=="name_desc"){newbyrecipienttable = byrecipienttable.sort(function(a, b){var keyA = a.type.toUpperCase(),keyB = b.type.toUpperCase();if(keyA < keyB) return 1;if(keyA > keyB) return -1;return 0;}).filter(function(d){return selectedletter=="All"?true:d.type.charAt(0).toUpperCase()==selectedletter})}
else{if(selected=="contrib_asc"){newbyrecipienttable = byrecipienttable.sort(function(a, b){var keyA = a.amount,keyB = b.amount;if(keyA < keyB) return -1;if(keyA > keyB) return 1;return 0;}).filter(function(d){return selectedletter=="All"?true:d.type.charAt(0).toUpperCase()==selectedletter})}
else{newbyrecipienttable = byrecipienttable.sort(function(a, b){var keyA = a.amount,keyB = b.amount;if(keyA < keyB) return 1;if(keyA > keyB) return -1;return 0;}).filter(function(d){return selectedletter=="All"?true:d.type.charAt(0).toUpperCase()==selectedletter})}}}
$('table#pane2table').html("")
for(i=0;i<Math.round(newbyrecipienttable.length/2);i++){$('table#pane2table').append("<tr id='tr"+i+"'></tr>")}
for(i=0;i<newbyrecipienttable.length;i++){
$('table#pane2table tr#tr'+Math.floor(i/2)).append("<td class='grid'><div class='dark' id='type'>"+newbyrecipienttable[i].type.toUpperCase()+"</div><div class='grouprow'></div><div class='mediumlight' id='amount'><strong>$"+truncnumber(newbyrecipienttable[i].amount)+"</strong></br>FUNDING</div></td>")}}
//Pane 3
donorletters = []
$('li.pane3 form').after("<table id='pane3table'></table>")
for(i=0;i<Math.round(bydonortable.length/2);i++){$('table#pane3table').append("<tr id='tr"+i+"'></tr>")}
for(i=0;i<bydonortable.length;i++){
$('table#pane3table tr#tr'+Math.floor(i/2)).append("<td class='grid'><div class='dark' id='type'>"+bydonortable[i].type.toUpperCase()+"</div><div class='grouprow'></div><div class='mediumlight' id='amount'><strong>$"+truncnumber(bydonortable[i].amount)+"</strong></br>FUNDING</div></td>")
var currentletter = bydonortable[i].type.charAt(0).toUpperCase()
if(!donorletters.contains(currentletter)){
donorletters.push(currentletter)
$('select#sortdonorletter').append("<option value='"+currentletter+"'>"+currentletter+"</option>")
}
}
RedrawDonor = function(){
selected = $('#sortdonor').val()
selectedletter = $('#sortdonorletter').val()
if(selected=="name_asc"){newbydonortable = bydonortable.sort(function(a, b){var keyA = a.type.toUpperCase(),keyB = b.type.toUpperCase();if(keyA < keyB) return -1;if(keyA > keyB) return 1;return 0;}).filter(function(d){return selectedletter=="All"?true:d.type.charAt(0).toUpperCase()==selectedletter})}
else{if(selected=="name_desc"){newbydonortable = bydonortable.sort(function(a, b){var keyA = a.type.toUpperCase(),keyB = b.type.toUpperCase();if(keyA < keyB) return 1;if(keyA > keyB) return -1;return 0;}).filter(function(d){return selectedletter=="All"?true:d.type.charAt(0).toUpperCase()==selectedletter})}
else{if(selected=="contrib_asc"){newbydonortable = bydonortable.sort(function(a, b){var keyA = a.amount,keyB = b.amount;if(keyA < keyB) return -1;if(keyA > keyB) return 1;return 0;}).filter(function(d){return selectedletter=="All"?true:d.type.charAt(0).toUpperCase()==selectedletter})}
else{newbydonortable = bydonortable.sort(function(a, b){var keyA = a.amount,keyB = b.amount;if(keyA < keyB) return 1;if(keyA > keyB) return -1;return 0;}).filter(function(d){return selectedletter=="All"?true:d.type.charAt(0).toUpperCase()==selectedletter})}}}
$('table#pane3table').html("")
for(i=0;i<Math.round(newbydonortable.length/2);i++){$('table#pane3table').append("<tr id='tr"+i+"'></tr>")}
for(i=0;i<newbydonortable.length;i++){
$('table#pane3table tr#tr'+Math.floor(i/2)).append("<td><div class='dark' id='type'>"+newbydonortable[i].type.toUpperCase()+"</div><div class='grouprow'></div><div class='light' id='amount'><strong>$"+truncnumber(newbydonortable[i].amount)+"</strong></br>FUNDING</div></td>")}}
matchingappeal = appeal.filter(function(d){return d.country==thisemergency.country && d.year==thisemergency.year})
matchlen = matchingappeal.length
for(i=0;i<matchlen;i++){$('li.pane1').append("<a href='appeal.html?id="+matchingappeal[i].id+"'><div class='related'>SEE ALSO</br><span class='dark'>"+matchingappeal[i].title.toUpperCase()+" ▼</span></div></a>")}
</script>
</ul>
</div>
</div>
<nav id="menu">
<ul>
<li><a href="index.html" id="home">HOME</a></li>
<li class="top">
<a href="aoverview.html?year=2013" id="current_appeal_overview">APPEALS / RESPONSE PLANS</a>
<ul>
<li class="Label">Year</li>
<li>
<a href="aoverview.html?year=2013" id="2013_appeal_overview">2013</a>
<ul id="appeal2013"></ul>
<script>
populatelist("appeal","2013")
</script>
</li>
<li>
<a href="aoverview.html?year=2012" id="2012_appeal_overview">2012</a>
<ul id="appeal2012"></ul>
<script>
populatelist("appeal","2012")
</script>
</li>
<li>
<a href="aoverview.html?year=2011" id="2011_appeal_overview">2011</a>
<ul id="appeal2011"></ul>
<script>
populatelist("appeal","2011")
</script>
</li>
<li>
<a href="aoverview.html?year=2010" id="2010_appeal_overview">2010</a>
<ul id="appeal2010"></ul>
<script>
populatelist("appeal","2010")
</script>
</li>
<li>
<a href="aoverview.html?year=2009" id="2009_appeal_overview">2009</a>
<ul id="appeal2009"></ul>
<script>
populatelist("appeal","2009")
</script>
</li>
<li>
<a href="aoverview.html?year=2008" id="2008_appeal_overview">2008</a>
<ul id="appeal2008"></ul>
<script>
populatelist("appeal","2008")
</script>
</li>
<li>
<a href="aoverview.html?year=2007" id="2007_appeal_overview">2007</a>
<ul id="appeal2007"></ul>
<script>
populatelist("appeal","2007")
</script>
</li>
<li>
<a href="aoverview.html?year=2006" id="2006_appeal_overview">2006</a>
<ul id="appeal2006"></ul>
<script>
populatelist("appeal","2006")
</script>
</li>
<li>
<a href="aoverview.html?year=2005" id="2005_appeal_overview">2005</a>
<ul id="appeal2005"></ul>
<script>
populatelist("appeal","2005")
</script>
</li>
<li>
<a href="aoverview.html?year=2004" id="2004_appeal_overview">2004</a>
<ul id="appeal2004"></ul>
<script>
populatelist("appeal","2004")
</script>
</li>
<li>
<a href="aoverview.html?year=2003" id="2003_appeal_overview">2003</a>
<ul id="appeal2003"></ul>
<script>
populatelist("appeal","2003")
</script>
</li>
<li>
<a href="aoverview.html?year=2002" id="2002_appeal_overview">2002</a>
<ul id="appeal2002"></ul>
<script>
populatelist("appeal","2002")
</script>
</li>
<li>
<a href="aoverview.html?year=2001" id="2001_appeal_overview">2001</a>
<ul id="appeal2001"></ul>
<script>
populatelist("appeal","2001")
</script>
</li>
<li>
<a href="aoverview.html?year=2000" id="2000_appeal_overview">2000</a>
<ul id="appeal2000"></ul>
<script>
populatelist("appeal","2000")
</script>
</li>
<li><a href="#" id="Archive_appeal">Archive</a></li>
</ul>
</li>
<li class="top">
<a href="eoverview.html?year=2013" id="current_emergency_overview">EMERGENCIES</a>
<ul>
<li class="Label">Year</li>
<li><a href="eoverview.html?year=2013" id="2013_emergency_overview">2013</a>
<ul id="emergency2013"></ul>
<script>
populatelist("emergency","2013")
</script>
</li>
<li><a href="eoverview.html?year=2012" id="2012_emergency_overview">2012</a>
<ul id="emergency2012"></ul>
<script>
populatelist("emergency","2012")
</script>
</li>
<li><a href="eoverview.html?year=2011" id="2011_emergency_overview">2011</a>
<ul id="emergency2011"></ul>
<script>
populatelist("emergency","2011")
</script>
</li>
<li><a href="eoverview.html?year=2010" id="2010_emergency_overview">2010</a>
<ul id="emergency2010"></ul>
<script>
populatelist("emergency","2010")
</script>
</li>
<li><a href="eoverview.html?year=2009" id="2009_emergency_overview">2009</a>
<ul id="emergency2009"></ul>
<script>
populatelist("emergency","2009")
</script>
</li>
<li><a href="eoverview.html?year=2008" id="2008_emergency_overview">2008</a>
<ul id="emergency2008"></ul>
<script>
populatelist("emergency","2008")
</script>
</li>
<li><a href="eoverview.html?year=2007" id="2007_emergency_overview">2007</a>
<ul id="emergency2007"></ul>
<script>
populatelist("emergency","2007")
</script>
</li>
<li><a href="eoverview.html?year=2006" id="2006_emergency_overview">2006</a>
<ul id="emergency2006"></ul>
<script>
populatelist("emergency","2006")
</script>
</li>
<li><a href="eoverview.html?year=2005" id="2005_emergency_overview">2005</a>
<ul id="emergency2005"></ul>
<script>
populatelist("emergency","2005")
</script>
</li>
<li><a href="eoverview.html?year=2004" id="2004_emergency_overview">2004</a>
<ul id="emergency2004"></ul>
<script>
populatelist("emergency","2004")
</script>
</li>
<li><a href="eoverview.html?year=2003" id="2003_emergency_overview">2003</a>
<ul id="emergency2003"></ul>
<script>
populatelist("emergency","2003")
</script>
</li>
<li><a href="eoverview.html?year=2002" id="2002_emergency_overview">2002</a>
<ul id="emergency2002"></ul>
<script>
populatelist("emergency","2002")
</script>
</li>
<li><a href="eoverview.html?year=2001" id="2001_emergency_overview">2001</a>
<ul id="emergency2001"></ul>
<script>
populatelist("emergency","2001")
</script>
</li>
<li><a href="eoverview.html?year=2000" id="2000_emergency_overview">2000</a>
<ul id="emergency2000"></ul>
<script>
populatelist("emergency","2000")
</script>
</li>
<li><a href="#" id="Archive_emergency">Archive</a></li>
</ul>
</li>
<li class="top"><a href="go.html?year=2013" id="global_overview">GLOBAL OVERVIEW</a>
<ul>
<li><a href="go.html?year=2013" id="global_overview_2013">2013</a></li>
<li><a href="go.html?year=2012" id="global_overview_2012">2012</a></li>
<li><a href="go.html?year=2011" id="global_overview_2011">2011</a></li>
<li><a href="go.html?year=2010" id="global_overview_2010">2010</a></li>
<li><a href="go.html?year=2009" id="global_overview_2009">2009</a></li>
<li><a href="go.html?year=2008" id="global_overview_2008">2008</a></li>
<li><a href="go.html?year=2007" id="global_overview_2007">2007</a></li>
<li><a href="go.html?year=2006" id="global_overview_2006">2006</a></li>
<li><a href="go.html?year=2005" id="global_overview_2005">2005</a></li>
<li><a href="go.html?year=2004" id="global_overview_2004">2004</a></li>
<li><a href="go.html?year=2003" id="global_overview_2003">2003</a></li>
<li><a href="go.html?year=2002" id="global_overview_2002">2002</a></li>
<li><a href="go.html?year=2001" id="global_overview_2001">2001</a></li>
<li><a href="go.html?year=2000" id="global_overview_2000">2000</a></li>
</ul>
</li>
<li class="types"><span>DONORS</span>
<ul id="donors">
</ul>
<script>poporg("Government","donors")</script>
</li>
<li><a href="#" id="about">ABOUT</a></li>
<li><a href="#" id="contact">CONTACT</a></li>
<li><a href="http://fts.unocha.org?media=desktop" id="desktop">DESKTOP SITE</a></li>
</ul>
</nav>
</div>
<script src="carousel.js"></script>
<script>
$('a').not('a[href*="menu"]').click(function(){});
$('div#carousel').show()
</script>
</body>
</html>