remove "sumo-" value on input blur

This commit is contained in:
Silver Kuusik 2018-04-08 20:53:30 +03:00 committed by GitHub
parent 7ea27bdfb4
commit 47336279a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -528,6 +528,15 @@ window.onload = function() {
$("#robot-id").val("sumo-"); $("#robot-id").val("sumo-");
} }
}); });
/* when robot-id input field gets unfocused */
$("#robot-id").focus(function() {
/* if the robot-id input value is the previously set "sumo-" */
if ($("#robot-id").val() === "sumo-") {
/* remove the value */
$("#robot-id").val("");
}
});
/* robot number button listener */ /* robot number button listener */
$(".btn-robot-go").click(function() { $(".btn-robot-go").click(function() {