-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
49 lines (41 loc) · 1.34 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>iBeacon Map</title>
<link rel="stylesheet" href="css/index.css" />
</head>
<body>
<form class="createForm" hidden>
<button class="add">Add iBeacon</button>
<input type="text" name="uuid" placeholder="uuid" size="42" required>
<input type="text" name="major" placeholder="major" required>
<input type="text" name="minor" placeholder="minor" required>
</form>
<canvas id="stage"></canvas>
<script src="js/easeljs-0.7.1.min.js"></script>
<script src="js/tweenjs-0.5.1.min.js"></script>
<script src="js/preloadjs-0.4.1.min.js"></script>
<script src="js/jquery-2.1.0.min.js"></script>
<script src="js/datamapper.js"></script>
<script src="js/beacons.js"></script>
<script src="js/persons.js"></script>
<script src="js/ibeaconmap.js"></script>
<script src="js/controller.js"></script>
<script>
var iBeaconMap = new IBeaconMap();
iBeaconMap.initialize();
var iBeaconController = new IBeaconController();
iBeaconController.initialize();
var form = document.querySelector('.createForm');
form.addEventListener('submit', function(e) {
e.preventDefault();
iBeaconMap.addBeacon({
uuid: form.querySelector('input[name="uuid"]').value,
major: form.querySelector('input[name="major"]').value,
minor: form.querySelector('input[name="minor"]').value
});
});
</script>
</body>
</html>