This repository has been archived by the owner on Jul 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
control.html
71 lines (66 loc) · 2.34 KB
/
control.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<button id="show-walkin" class="btn btn-lg btn-success">
<i class="glyphicon glyphicon-sound-stereo"></i>
Walk-in/out
</button>
<button id="show-event-slide" class="btn btn-lg btn-warning">
<i class="glyphicon glyphicon-picture"></i>
Event slide
</button>
<hr>
<form class="form-inline">
<div class="form-group">
<label class="sr-only" for="event-id">Event ID:</label>
<input type="number" min="0" step="1" class="form-control" id="event-id" placeholder="Event ID">
</div>
<button id="load-event" type="submit" class="btn btn-danger">
<i class="glyphicon glyphicon-circle-arrow-down"></i>
Load event
</button>
</form>
<hr>
<h4>Debug tools</h4>
<form class="form-inline">
<fieldset>
<div class="form-group">
<label for="progress-indicator-type">Progress indicator</label>
<select class="form-control" id="progress-indicator-type">
<option value="bar_thin_white" selected>Bar (white)</option>
<option value="bar_thin_black">Bar (black)</option>
<option value="countdown">Countdown</option>
</select>
</div>
<button id="enable-progress-indicator" class="btn btn-sm btn-success">Enable</button>
<button id="disable-progress-indicator" class="btn btn-sm btn-danger">Disable</button>
</fieldset>
</form>
<hr>
<script src="hosted.js"></script>
<script>
ib.setDefaultStyle();
document.getElementById('load-event').addEventListener('click', function (e) {
var event_id = document.getElementById('event-id').value;
ib.sendCommand("eventid", event_id);
ib.sendCommand("walkin/event-slide/eventid", event_id);
});
document.getElementById('show-walkin').addEventListener('click', function (e) {
ib.sendCommand("show_event_slide", "false");
});
document.getElementById('show-event-slide').addEventListener('click', function (e) {
ib.sendCommand("show_event_slide", "true");
});
document.getElementById('enable-progress-indicator').addEventListener('click', function (e) {
var progress_type = document.getElementById('progress-indicator-type').value;
ib.sendCommand("show_progress-indicator", progress_type);
});
document.getElementById('disable-progress-indicator').addEventListener('click', function (e) {
ib.sendCommand("show_progress_indicator", "no");
});
</script>
</body>
</html>