add enter key listener to robot ID input

This commit is contained in:
Silver Kuusik 2018-01-27 13:03:21 +01:00
parent 6a5afdefc3
commit 9fa3070864

View File

@ -511,6 +511,14 @@ window.onload = function() {
workspace.highlightBlock(lastHighlighted, false);
});
/* enter listener on robot ID field */
$("#robot-id").keypress(function(e) {
if (e.which == 13) {
/* simulate robot GO button click */
$(".btn-robot-go").click();
}
});
/* robot number button listener */
$(".btn-robot-go").click(function() {
/* extract and validate the selected robot ID */