forked from tripleblindai/safe-places
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
207 lines (181 loc) · 7.7 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
195
196
197
198
199
200
201
202
203
204
205
206
207
<!-- HTML code specific to publisher -->
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta charset="utf-8" />
<meta name="author" content="Kevin P. , MITsdm'18" />
<title>Safe Places: Publishing Tool</title>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css"
/>
<link
rel="stylesheet"
href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css"
/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<link rel="stylesheet" href="../css/style.css" />
<link rel="stylesheet" href="../css/publisher.css" />
</head>
<body>
<div id="get-map-api-panel" class="modal">
<!-- Modal content -->
<div class="modal-content">
<div class="modal-header">
<h1>Safe Places</h1>
</div>
<p id="loginQuestion">Enter a Google Maps Javascript API key.</p>
<p>
Either
<a href="https://developers.google.com/maps/documentation/javascript/get-api-key"
>get your own key</a
>
or request one from an administrator.
</p>
<form>
<label for="api-key">Map API Key:</label>
<input
type="text"
name="api-key"
id="api-key"
placeholder="map_api_key"
class="text ui-widget-content ui-corner-all"
/>
<p></p>
<input class="button" type="button" id="submit" value="Submit" onclick="enterAPIKey();" />
</form>
</div>
</div>
<div id="login-panel" class="modal">
<!-- Modal content -->
<div class="modal-content">
<div class="modal-header">
<h1>Safe Places</h1>
</div>
<p id="loginQuestion">Enter your credentials.</p>
<p id="validateTips"> </p>
<form>
<label for="Username">Username:</label>
<input
type="text"
name="username"
id="username"
placeholder="name"
class="text ui-widget-content ui-corner-all"
/>
<p></p>
<label for="password">Password:</label>
<input
type="password"
name="password"
id="password"
placeholder="password"
class="text ui-widget-content ui-corner-all"
/>
<!-- Allow form submission with keyboard without duplicating the dialog button -->
<p></p>
<img id="logo" onclick="onLogoClick()" src="" />
<img id="logo_name" onclick="onLogoClick()" src="" />
<input class="button" type="button" id="login" value="Login" onclick="doLogin()" />
</form>
</div>
</div>
<div id="saving-panel" class="modal">
<!-- Modal content -->
<div class="modal-content">
<div class="modal-header">
<h2>Saving</h2>
</div>
<p class="progress">Connecting...</p>
</div>
</div>
<button class="btn" onclick="doLogout()" id="logout">
<i class="fas fa-sign-out-alt"></i> Logout
</button>
<div id="floating-panel">
<h2>Safe Places - Publishing Tool</h2>
<input
id="privatekitJSON"
style="display: none;"
type="file"
multiple="multiple"
accept=".json"
onchange="loadPath()"
/>
<button class="button" onclick="$('#privatekitJSON').click();" id="loadFromFile">
<i class="fa fa-folder-open"></i> Load
</button>
<button class="button" onclick="loadPath()" id="loadFromServer">
<img id="btn_logo" src="" /> Load
</button>
<button class="button btn_view" onclick="zoomToExtent()" id="zoomToExtent">
<i class="fas fa-expand-arrows-alt"></i> Zoom
</button>
<div style="display: none;" id="stats">
Visible: <span id="visible">0</span> Hidden: <span id="hidden">0</span> Deleted:
<span id="deleted">0</span> Total: <span id="total">0</span>
</div>
<div>
<hr class="fade-edge-hr" />
<div style="padding: 8px; text-align: left;">
Date Range:
<span id="duration-container">
<span id="duration"></span
><input onclick="updateLockIcon()" type="checkbox" id="lock-window" />
<label for="lock-window"><i id="lock-icon" class="fas fa-lock"></i></label>
</span>
<br />
<div id="dates">
<div id="date-start"> </div>
<span id="date-sep"> </span>
<div id="date-end"> </div>
</div>
<div id="slider-range"></div>
</div>
<hr class="fade-edge-hr" />
<div style="padding: 8px; text-align: left;">
Organization Name:
<div>
<input id="org_name" placeholder="Enter the organization name" class="" type="text" />
<span class="example"> Ex: US Department of Health</span>
</div>
Information URL:
<div>
<input
id="org_url"
placeholder="Enter a URL for news and updates"
class=""
type="text"
/>
<span class="example"> Ex: https://my.org/path/to/news.html</span>
</div>
</div>
<hr class="fade-edge-hr" />
<div style="align-self: start; width: 100%;">
<button class="button" onclick="showBounds()" id="get_bounds">
<i class="fa fa-clipboard"></i> Bounds
</button>
<input id="bounds" type="text" />
<br />
</div>
<hr class="fade-edge-hr" />
<input
id="save"
class="button disabled"
disabled="disabled"
onclick="saveText();"
type="button"
value="Publish"
/>
</div>
</div>
<div id="map"></div>
<img id="map_logo" onclick="onLogoClick()" src="" />
<img id="map_logo_name" onclick="onLogoClick()" src="" />
</body>
<script src="../js/config.js"></script>
<script src="../js/lib.js"></script>
<script src="../js/publisher.js"></script>
</html>