-
Notifications
You must be signed in to change notification settings - Fork 0
/
occupyLiveDashboard.html
102 lines (90 loc) · 4.54 KB
/
occupyLiveDashboard.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Occupy Together Streams</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<style type="text/css">
td {
vertical-align: top;
}
</style>
</head>
<body>
<table>
<tr>
<td>
<select name="cell1" id="cell1" class="city-selector"></select>
<div id="cell1-content"></div>
</td>
<td>
<select name="cell2" id="cell2" class="city-selector"></select>
<div id="cell2-content"></div>
</td>
</tr>
<tr>
<td>
<select name="cell3" id="cell3" class="city-selector"></select>
<div id="cell3-content"></div>
</td>
<td>
<select name="cell4" id="cell4" class="city-selector"></select>
<div id="cell4-content"></div>
</td>
</tr>
</table>
<script type="text/javascript">
$(document).ready(function() {
var occupyStreams = {
'Select an Occupation' : '',
'Occupy Amsterdam (Netherlands)' : 'occupyamsterdam',
'Occupy Atlanta (Georgia, USA)' : 'occupyatlanta',
'Occupy Austin (Texas, USA)' : 'occupyaustin',
'Occupy Baltimore (Maryland, USA)' : 'occupybaltimore',
'Occupy Boston (Massachusets, USA)' : 'occupyboston',
'Occupy Brussels #1 (Belgium)' : 'occupybrussels',
'Occupy Brussels #2 (Belgium)' : 'occupybelgium',
'Occupy Calgary (Alberta, Canada)' : 'occupycalgary',
'Occupy Denver (Colorado, USA)' : 'peoplescam',
'Occupy Houston (Texas, USA)' : 'occupyhouston',
'Occupy Indianapolis (Indiana, USA)' : 'occupyindy',
'Occupy Las Vegas (Nevada, USA)' : 'occupylasvegas',
'Occupy London (United Kingdom)' : 'occupylsx',
'Occupy Los Angeles (California, USA)' : 'owslosangeles',
'Occupy Maine (USA)' : 'occupymaine',
'Occupy Melbourne (Australia)' : 'occupymelb',
'Occupy Miami (Florida, USA)' : 'occupymia',
'Occupy Milan (Italy)' : 'occupyitaly',
'Occupy New Orleans (Louisiana, USA)' : 'occupynola',
'Occupy Pittsburgh (Pennsylvania, USA)' : 'occupypittsburgh',
'Occupy Portland (Oregon, USA)' : 'occupyptown',
'Occupy San Diego (California, USA)' : 'occupysandiegolivefeed',
'Occupy San Francisco (California, USA)' : 'occupyfdsf',
'Occupy Seattle (Washington, USA)' : 'owsoccupyseattle',
'Occupy Tampa (Florida, USA)' : 'occupytampa',
'Occupy Vancouver (Washington, USA)' : 'occupythecouve',
'Occupy Wall Street (New York, USA)' : 'globalrevolution',
'Occupy Washington DC (USA)' : 'occupykst',
'Occupy Winnipeg (Manitoba, Canada)' : 'occupywinnipeg',
};
// Populate the occupation selectors.
$('.city-selector').each(function() {
var selectValues = '';
$.each(occupyStreams, function(title, value) {
selectValues += '<option value="' + value + '">' + title + "</option>\n";
});
$('#' + $(this).attr('id')).append(selectValues);
});
// Set up the click handler.
$('.city-selector').change(function() {
var targetCellId = $(this).attr('id') + '-content';
var liveStreamUsername = $('#' + $(this).attr('id')).val();
$('#' + targetCellId).empty();
if (liveStreamUsername != '') {
$('#' + targetCellId).append('<iframe width="480" height="295" src="http://cdn.livestream.com/embed/' + liveStreamUsername + '?layout=4&height=295&width=480&autoplay=true" style="border:0;outline:0" frameborder="0" scrolling="no"></iframe>');
}
});
});
</script>
</body>
</html>