Reselect the input box after any button is pressed
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
35bea09857
commit
6fd4739dad
|
@ -6,15 +6,15 @@
|
||||||
<h2>Modus</h2>
|
<h2>Modus</h2>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-radio form-inline">
|
<label class="form-radio form-inline">
|
||||||
<input type="radio" name="mode" value="false" checked=""><i class="form-icon"></i> Toevoegen
|
<input type="radio" name="mode" value="false" checked="" onclick="reselect()"><i class="form-icon"></i> Toevoegen
|
||||||
</label>
|
</label>
|
||||||
<label class="form-radio form-inline">
|
<label class="form-radio form-inline">
|
||||||
<input type="radio" name="mode" value="true"><i class="form-icon"></i> Controleren
|
<input type="radio" name="mode" value="true"><i class="form-icon" onclick="reselect()"></i> Controleren
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<h2>Informatie</h2>
|
<h2>Informatie</h2>
|
||||||
<div>
|
<div>
|
||||||
<p><select id="videoSource"></select><button class="btn btn-primary" id="start_scan_btn">Start
|
<p><select id="videoSource"></select><button class="btn btn-primary" id="start_scan_btn" onclick="reselect()">Start
|
||||||
Scannen</button> </p>
|
Scannen</button> </p>
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<video autoplay playsinline controls="false" class="column col-12"></video>
|
<video autoplay playsinline controls="false" class="column col-12"></video>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
<h3>Binnen/Betaald: <span id="stats">Laden...</span></h3>
|
<h3>Binnen/Betaald: <span id="stats">Laden...</span></h3>
|
||||||
<h3>
|
<h3>
|
||||||
<label class="form-checkbox form-inline">
|
<label class="form-checkbox form-inline">
|
||||||
<input type="checkbox" id="muntjes" ><i class="form-icon"></i> Muntjes kopen
|
<input type="checkbox" id="muntjes" onclick="reselect()"><i class="form-icon"></i> Muntjes kopen
|
||||||
</label>
|
</label>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
|
@ -76,6 +76,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function reselect() {
|
||||||
|
let elem = document.getElementById("student_number");
|
||||||
|
elem.focus();
|
||||||
|
elem.select();
|
||||||
|
}
|
||||||
|
|
||||||
function set_scan_status(status) {
|
function set_scan_status(status) {
|
||||||
document.getElementById("scan-status").innerHTML = status;
|
document.getElementById("scan-status").innerHTML = status;
|
||||||
}
|
}
|
||||||
|
@ -296,10 +302,8 @@
|
||||||
document.getElementById("file-selector-button").addEventListener("click", upload_csv);
|
document.getElementById("file-selector-button").addEventListener("click", upload_csv);
|
||||||
|
|
||||||
|
|
||||||
let elem = document.getElementById("student_number");
|
|
||||||
elem.focus();
|
|
||||||
elem.select();
|
|
||||||
fetch_stats();
|
fetch_stats();
|
||||||
|
reselect();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Reference in a new issue