mirror of
https://github.com/CopterExpress/clever-show.git
synced 2026-05-26 23:19:33 +00:00
Updated delay input
This commit is contained in:
@@ -9,7 +9,8 @@ function updateDelay() {
|
||||
req.open('POST', '/get/delay', false);
|
||||
req.send();
|
||||
delay = parseInt(req.response);
|
||||
document.getElementById('delay').innerText = 'Set time (now is ' + delay.toString() + ')';
|
||||
document.getElementById('delay').placeholder = 'Set delay (now is ' + delay.toString() + ')';
|
||||
document.getElementById('delay').value = null;
|
||||
}
|
||||
|
||||
function setDelay(delay) {
|
||||
@@ -102,15 +103,12 @@ function stopCopters() {
|
||||
}
|
||||
|
||||
function setStartTime() {
|
||||
Ply.dialog("prompt", {
|
||||
title: "Set animation delay",
|
||||
form: {delay: "Delay"}
|
||||
}).done(function (ui) {
|
||||
if (ui.state) {
|
||||
setDelay(parseInt(ui.data.delay));
|
||||
updateDelay();
|
||||
}
|
||||
});
|
||||
spinner.style.display = 'inline-block';
|
||||
setTimeout(function () {
|
||||
setDelay(parseInt(document.getElementById('delay').value));
|
||||
updateDelay();
|
||||
spinner.style.display = 'none';
|
||||
}, 20);
|
||||
}
|
||||
|
||||
function takeOff() {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<script lang="js" src="/static/js/jquery.min.js"></script>
|
||||
<script lang="js" src="/static/js/popper.min.js"></script>
|
||||
<script lang="js" src="/static/js/bootstrap.min.js"></script>
|
||||
<script lang="js" src="/static/js/ply.js"></script>
|
||||
<!--<script lang="js" src="/static/js/ply.js"></script>-->
|
||||
<script lang="js" src="/static/js/tabulator.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -73,7 +73,7 @@
|
||||
<button type="button" class="btn btn-info btn-lg" onclick="testLedSelected()">Test led</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button id="delay" type="button" class="btn btn-success btn-lg" onclick="setStartTime()">Set time (now is 0)</button>
|
||||
<input id="delay" class="form-control form-control-lg" type="number" onchange="setStartTime()" placeholder="Delay">
|
||||
<button type="button" class="btn btn-success btn-lg" onclick="startAnimation()">Start animation</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
|
||||
Reference in New Issue
Block a user