-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
84 lines (74 loc) · 3.58 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="assets/css/jquery.mobile-1.0a4.min.css" />
<link href="assets/css/layout.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/style.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
<script type="text/javascript" src="assets/js/jquery-1.5.2.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script type="text/javascript" src="assets/js/bribable.js"></script>
<script type="text/javascript" src="assets/js/camera.js"></script>
<script type="text/javascript">
$(document).bind("mobileinit", function(){
//apply overrides here
$.mobile.ajaxFormsEnabled = false;
$.mobile.allowCrossDomainPages = true;
});
$(document).ready(function() {
// corrupt.onLoad(); require phonegap?
Bribable.init({showMessages: false});
$('#main-form').submit(function(event) {
$.post('http://corrupt.mobi/messages', $(this).serialize(), function(data, status){
if (data.redirect) {
alert('Got a redirect!')
} else {
$('#response').innerHTML = 'req/res success!';
}
});
event.preventDefault();
});
});
</script>
<script type="text/javascript" src="assets/js/jquery.mobile-1.0a4.min.js"></script>
</head>
<body>
<div data-role="page">
<div data-role="header">Report Corruption Anonymously</div>
<div data-role="content">
<form action="http://corrupt.mobi/messages" method="get" id='main-form'>
<input type="hidden" id="lat" name="message[lat]" value="">
<input type="hidden" id="long" name="message[long]" value="">
<input type="hidden" id="initial_lat" name="initial[lat]" value="">
<input type="hidden" id="initial_long" name="initial[long]" value="">
<h2>What happened?</h2>
<p>Type in what happened. Put names in quotes like 'Dr Evil'.</p>
<textarea name="message[message]" rows="8" cols="40"></textarea>
<h2>Where did this happen?</h2>
<p>Pinpoint the location as accurately as you can by dragging the map</p>
<div id="map_container">
<div id="map_canvas"></div>
</div>
<input type="hidden" name="message[image]" id="image-data" value="" />
<div id="camera">
<button onclick="corrupt.capturePhotoEdit()">Capture Photo</button> <br>
<button onclick="corrupt.getPhoto(navigator.camera.PictureSourceType.PHOTOLIBRARY)">From Photo Library</button><br>
<img style="display:none;width:60px;height:60px;" id="smallImage" src="" />
<img style="display:none;" id="largeImage" src="" />
</div>
<input type="submit" name="op" id="submit-1" value="Submit" class="form-submit">
</form>
</div>
<div data-role="footer">Some sort of Navigation</div>
<div id='response'></div>
<div id='btm'>
<p><a href="http://www.corrupt.mobi">Corrupt.mobi</a> is a <a href="http://www.hackforchange.com">HackforChange</a>
project inspired by
<a href="http://hackforchange.uservoice.com/forums/113515-hack-for-change/suggestions/1931313-help-save-monterrey-mexico-if-monterrey-falls-m">Help
Save Monterrey, Mexico</a></p>
</div>
</div>
</body>
</html>