-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
624 lines (616 loc) · 24.5 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
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
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/jquery.mobile-1.3.1.min.css" />
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/jquery.mobile-1.3.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/jquery.ui.touch-punch.min.js"></script>
<script type="text/javascript" src="cordova-2.7.0.js"></script>
<script type="text/javascript" src="js/database.js"></script>
<script type="text/javascript" src="js/helpers.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript" src="js/pagebed.js"></script>
<script type="text/javascript" src="js/pageedit.js"></script>
<script type="text/javascript" src="js/pagesettings.js"></script>
<script type="text/javascript" src="js/pageprofile.js"></script>
<script type="text/javascript" src="js/pagehome.js"></script>
<script type="text/javascript">
app.initialize();
</script>
<title>SedMob</title>
</head>
<body>
<!-- Home -->
<div data-role="page" data-theme="b" id="pagehome">
<div data-role="header">
<h3>
Log List
</h3>
</div>
<div data-role="content">
<a id="buttonnew" data-role="button" href="#">
Create new log
</a>
<div id="profilelist" data-role="collapsible-set" data-content-theme="d">
<div data-role="collapsible" data-collapsed="false">
<h3>
Open existing log
</h3>
<ul data-role="listview" id="listofprofiles">
</ul>
</div>
</div>
<a id="buttonexport" data-role="button" href="javascript:startexportcsv()" data-icon="forward"
data-iconpos="left">
Export all logs in CSV format
</a>
<a id="editbutton" data-role="button" href="#edit">
Add/edit lithologies and symbols
</a>
<a id="settings" data-role="button" href="#settings">
Settings
</a>
</div>
<div data-role="footer" data-position="fixed">
<h3>
Log List
</h3>
</div>
</div><!-- /page -->
<!-- Add/edit profile page -->
<div data-role="page" data-theme="b" id="addprofile">
<div data-role="header" data-position="fixed">
<a href="javascript:homerefresh()" data-icon="delete">Cancel</a>
<h3>
Add/Edit Log
</h3>
<a href="javascript:butsaveprofile()" data-icon="check">Save</a>
</div>
<div data-role="content">
<div data-role="fieldcontain">
<input name="name" id="inputname" placeholder="Log title" value=""
type="text">
</div>
<div data-role="popup" id="popupsave" data-history="false">
<p><p>
</div>
<div data-role="fieldcontain">
<textarea name="description" id="inputdescription" placeholder="Description"></textarea>
</div>
<a id="buttonexport" data-role="button" href="javascript:startexportcsv()">
Save in CSV (SedLog) format
</a>
<div data-role="popup" id="popupexport" data-history="false">
<p><p>
</div>
<a id="buttondelete" data-role="button" href="javascript:deleteprofile()">
Delete log
</a>
<a id="buttonadd" data-role="button" href="#page1">
Add new bed
</a>
<div id="listlayers" data-role="collapsible-set" data-content-theme="d">
<div data-role="collapsible" data-collapsed="false">
<h3>
List of beds
</h3>
<ul data-role="listview" id="listofbeds">
</ul>
</div>
</div>
<a id="buttonphoto" data-role="button" href="javascript:takephoto()">
Take a photo
</a>
<div data-role="popup" id="popupphoto" data-history="false">
<p>Photo saved.<p>
</div>
<a id="buttonview" data-role="button" href="#popupPhoto" class="hidden" style="display:none;" data-rel="popup" data-position-to="window" data-transition="fade">
View current photo
</a>
<div data-role="popup" id="popupPhoto" data-overlay-theme="a" data-theme="d" data-corners="false">
<a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a><img id="photoshow" class="popphoto" src="" style="max-height:512px;" alt="" />
</div>
<h4 id="labelgeo">
GPS coordinates
</h4>
<label for="direction">Reverse bed order (for depth in borehole core):</label>
<select name="direction" id="direction" data-role="slider">
<option value="off">Off</option>
<option value="on">On</option>
</select>
</div>
<div data-role="footer" data-position="fixed">
<h3>
Add/Edit Log
</h3>
</div>
</div><!-- /page -->
<!-- Add/edit bed page -->
<div data-role="page" data-theme="b" id="addbed">
<div id="bedheader" data-role="header" data-position="fixed">
<a href="javascript:returntoprofile()" data-icon="back">Cancel</a>
<h3>
Add/Edit Bed
</h3>
<a href="javascript:savebed()" id="buttonsave" data-icon="check">Save</a>
</div>
<div data-role="content">
<div id="bedgeneral" data-role="collapsible-set" data-content-theme="d">
<div data-role="collapsible" data-collapsed="false">
<h3>
General
</h3>
<div data-role="fieldcontain">
<label for="bedname">
Title
</label>
<input name="bedname" id="bedname" placeholder="" value="" type="text">
</div>
<div data-role="fieldcontain">
<label for="thickness">
Thickness [cm]
</label>
<input name="thickness" id="thickness" placeholder="100" value="" type="number">
</div>
<div data-role="fieldcontain">
<label for="facies">
Facies
</label>
<input name="facies" id="facies" placeholder="" value="" type="number"
data-mini="true">
</div>
<div data-role="fieldcontain">
<label for="notes">
Notes
</label>
<textarea name="notes" id="notes" placeholder=""></textarea>
</div>
<div data-role="fieldcontain">
<label for="paleocurrent">
Paleocurrent values
</label>
<input name="paleocurrent" id="paleocurrent" placeholder="" value="" type="text"
data-mini="true">
</div>
<div data-role="fieldcontain">
<label for="boundary">
Base boundary
</label>
<select id="boundary" name="boundary">
<option value="0">
<none>
</option>
</select>
</div>
<a id="buttondelbed" data-role="button" href="javascript:butdeletebed()">
Delete bed
</a>
</div>
</div>
<div id="bedlithology1" data-role="collapsible-set" data-content-theme="d">
<div data-role="collapsible" data-collapsed="false">
<h3>
Lithology 1
</h3>
<div data-role="fieldcontain">
<label for="lit1group">
Group
</label>
<select id="lit1group" name="group1">
<option value="0">
<none>
</option>
</select>
</div>
<div data-role="fieldcontain">
<label for="lit1type">
Type
</label>
<select id="lit1type" name="type1">
<option value="0">
<none>
</option>
</select>
</div>
<div data-role="fieldcontain">
<label for="lit1percentage">
Percentage
</label>
<input name="percentage1" id="lit1percentage" placeholder="" value="100"
type="number" data-mini="true">
</div>
</div>
</div>
<div id="bedlithology2" data-role="collapsible-set" data-content-theme="d">
<div data-role="collapsible">
<h3>
Lithology 2
</h3>
<div data-role="fieldcontain">
<label for="lit2group">
Group
</label>
<select id="lit2group" name="group2">
<option value="0">
<none>
</option>
</select>
</div>
<div data-role="fieldcontain">
<label for="lit2type">
Type
</label>
<select id="lit2type" name="type2">
<option value="0">
<none>
</option>
</select>
</div>
<div data-role="fieldcontain">
<label for="lit2percentage">
Percentage
</label>
<input name="percentage2" id="lit2percentage" placeholder="" value="0"
type="number" data-mini="true">
</div>
</div>
</div>
<div id="bedlithology3" data-role="collapsible-set" data-content-theme="d">
<div data-role="collapsible">
<h3>
Lithology 3
</h3>
<div data-role="fieldcontain">
<label for="lit3group">
Group
</label>
<select id="lit3group" name="group3">
<option value="0">
<none>
</option>
</select>
</div>
<div data-role="fieldcontain">
<label for="lit3type">
Type
</label>
<select id="lit3type" name="type3">
<option value="0">
<none>
</option>
</select>
</div>
<div data-role="fieldcontain">
<label for="lit3percentage">
Percentage
</label>
<input name="percentage3" id="lit3percentage" placeholder="" value="0"
type="number" data-mini="true">
</div>
</div>
</div>
<div id="bedgrainsize" data-role="collapsible-set" data-content-theme="d">
<div data-role="collapsible" data-collapsed="false">
<h3>
Grain Size
</h3>
<p>Mud/Sand/Gravel:</p>
<div data-role="fieldcontain">
<label for="grainsizebottom">
Base
</label>
<select id="grainsizebottom" name="grainsizebottom">
<option value="0">
<none>
</option>
</select>
</div>
<div data-role="fieldcontain">
<label for="grainsizetop">
Top
</label>
<select id="grainsizetop" name="grainsizetop">
<option value="0">
<none>
</option>
</select>
</div>
<p>Limestones:</p>
<div data-role="fieldcontain">
<label for="grainsizelimebottom">
Base
</label>
<select id="grainsizelimebottom" name="grainsizelimebottom">
<option value="0">
<none>
</option>
</select>
</div>
<div data-role="fieldcontain">
<label for="grainsizelimetop">
Top
</label>
<select id="grainsizelimetop" name="grainsizelimetop">
<option value="0">
<none>
</option>
</select>
</div>
</div>
</div>
<div id="bedsymbols" data-role="collapsible-set" data-content-theme="d">
<div data-role="collapsible" data-collapsed="false">
<h3>
Structures
</h3>
<div data-role="fieldcontain">
<label for="symbolstype">
Symbols in bed
</label>
<select id="symbolstype" name="symbolstype" multiple>
<option value="0">
<none>
</option>
</select>
</div>
<a data-role="button" data-inline="true" href="#edit"
data-icon="plus" data-iconpos="left">
Add new
</a>
<div data-role="fieldcontain">
<label for="structurestype">
Structures / Fossils
</label>
<select id="structurestype" name="structurestype" multiple>
<option value="0">
<none>
</option>
</select>
</div>
<a data-role="button" data-inline="true" href="#edit"
data-icon="plus" data-iconpos="left">
Add new
</a>
</div>
</div>
<div id="bedbioturbation" data-role="collapsible-set" data-content-theme="d">
<div data-role="collapsible" data-collapsed="false">
<h3>
Bioturbation
</h3>
<div data-role="fieldcontain">
<label for="bioturbationtype">
Type
</label>
<select id="bioturbationtype" name="bioturbationtype">
<option value="0">
<none>
</option>
</select>
</div>
<div data-role="fieldcontain">
<label for="intensity">
Intensity
</label>
<input name="intensity" id="intensity" placeholder="" value="" type="number"
data-mini="true">
</div>
</div>
</div>
<a id="buttonbedphoto" data-role="button" href="javascript:takebedphoto()">
Take a photo
</a>
<div data-role="popup" id="popupbedphoto" data-history="false">
<p>Photo saved.<p>
</div>
<div id="bedphotocontainer">
</div>
<div data-role="popup" id="popupbed" data-overlay-theme="a" data-theme="d" data-corners="false">
<a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a><img id="photobedshow" class="popphoto" src="" style="max-height:512px;" alt="" />
</div>
<div id="bedaudiocontainer">
<a id="buttonbedaudio" data-role="button" href="javascript:recordaudio()">
Start recording
</a>
</div>
</div>
</div><!-- /page -->
<!-- Edit lithologies page -->
<div data-role="page" data-theme="b" id="edit">
<div data-role="header" data-position="fixed">
<a href="javascript:homerefresh()" data-icon="delete">Back</a>
<h3>
Add/edit/delete lithologies and symbols
</h3>
</div>
<div data-role="content">
<div data-role="fieldcontain">
<label for="editsel">
Element to edit:
</label>
<select id="editsel" name="">
<option value="ed_litgroups">
Lithologies Groups
</option>
<option value="ed_lithologies">
Lithologies
</option>
<option value="ed_symgroups">
Symbols Groups
</option>
<option value="ed_symbols">
Symbols (structures and fossils)
</option>
</select>
</div>
<div id="addnewsymbolgroup" data-role="collapsible-set" data-content-theme="d">
<div data-role="collapsible" data-collapsed="false" id="collapseaddnew">
<h3>
Add new element
</h3>
<div data-role="fieldcontain" class="hide" style="display:none;">
<label for="addtogroup">
Add to group:
</label>
<select id="addtogroup" name="addtogroup">
<option value="0">
<none>
</option>
</select>
</div>
<div data-role="fieldcontain">
<label for="newsymbol">
Name:
</label>
<input name="newsymbol" id="newsymbol" placeholder="" value="" type="text">
</div>
<a data-role="button" href="javascript:butaddsymbol()"
data-icon="plus" data-iconpos="left">
Add
</a>
<div data-role="popup" id="popupadd" data-history="false">
<p>Element added.<p>
</div>
</div>
</div>
<div id="editexistingsymbolgroup" data-role="collapsible-set" data-content-theme="d">
<div data-role="collapsible" data-collapsed="false" id="collapseeditexisting">
<h3>
Edit existing element
</h3>
<div data-role="fieldcontain">
<label for="editsymbol">
Choose:
</label>
<select id="editsymbol" name="editsymbol">
<option value="0">
<none>
</option>
</select>
</div>
<div data-role="fieldcontain">
<label for="existingsymbol">
Name:
</label>
<input name="existingsymbol" id="existingsymbol" placeholder="" value="" type="text">
</div>
<a data-role="button" href="javascript:butdelsymbol()"
data-icon="delete" data-iconpos="left">
Delete element
</a>
<div data-role="popup" id="popupdelete" data-history="false">
<p>Element deleted.<p>
</div>
<a data-role="button" href="javascript:butsavesymbol()"
data-icon="check" data-iconpos="left">
Save
</a>
</div>
</div>
</div>
<div data-role="footer" data-position="fixed">
<h3>
Add/edit/delete lithologies and symbols
</h3>
</div>
</div><!-- /page -->
<!-- Settings -->
<div data-role="page" data-theme="b" id="settings">
<div data-role="header" data-position="fixed">
<a href="javascript:homerefresh()" data-icon="delete">Back</a>
<h3>
Settings
</h3>
</div>
<div data-role="content">
<div id="backuprestoredb" data-role="collapsible-set" data-content-theme="d">
<div data-role="collapsible" data-collapsed="false">
<h3>
Backup and restore database
</h3>
<a id="createbackup" data-role="button" href="javascript:backupdbContent()">
Create backup
</a>
<div data-role="popup" id="popupbackup" data-history="false">
<p>Backup successfully created.<p>
</div>
<a id="restorebackup" data-role="button" href="javascript:restoreContent()">
Restore backup
</a>
<div data-role="popup" id="popuprestore" data-history="false">
<p>Database is being restored.<p>
</div>
</div>
</div>
<div id="contrastcollapsible" data-role="collapsible-set" data-content-theme="d">
<div data-role="collapsible" data-collapsed="false">
<h3>
Contrast
</h3>
<label for="enhancecontrast">Enhance contrast:</label>
<select name="enhancecontrast" id="enhancecontrast" data-role="slider">
<option value="off">Off</option>
<option value="on">On</option>
</select>
</div>
</div>
<div id="mysqlserver" data-role="collapsible-set" data-content-theme="d">
<div data-role="collapsible" data-collapsed="false">
<h3>
Synchronize with external MySQL server
</h3>
<p>The database.php file should be uploaded into remote server, and the MySQL database should be created. Note that the password to your database will be sent in plain text.</p>
<div data-role="fieldcontain">
<label for="phpfile">
Location of the database.php file
</label>
<input name="phpfile" id="phpfile" placeholder="e.g. http://example.com/database.php" value="" type="text">
</div>
<div data-role="fieldcontain">
<label for="sqlserver">
Database host
</label>
<input name="sqlserver" id="sqlserver" placeholder="e.g. mysql.example.com" value="" type="text">
</div>
<div data-role="fieldcontain">
<label for="sqldatabase">
Database name
</label>
<input name="sqldatabase" id="sqldatabase" placeholder="" value="" type="text">
</div>
<div data-role="fieldcontain">
<label for="sqluser">
Database user
</label>
<input name="sqluser" id="sqluser" placeholder="" value="" type="text">
</div>
<div data-role="fieldcontain">
<label for="sqlpass">
Password
</label>
<input name="sqlpass" id="sqlpass" placeholder="" value="" type="text">
</div>
<div data-role="fieldcontain">
<label for="sqlport">
Port
</label>
<input name="sqlport" id="sqlport" placeholder="" value="3306" type="text">
</div>
<a id="synchronize" data-role="button" href="javascript:synchronizeDB()">
Synchronize
</a>
</div>
</div>
</div>
<div data-role="footer" data-position="fixed">
<h3>
Settings
</h3>
</div>
</div><!-- /page -->
</body>
</html>