forked from marva/sumorobot-web
		
	add enter key listener to robot ID input
This commit is contained in:
		@@ -511,6 +511,14 @@ window.onload = function() {
 | 
				
			|||||||
        workspace.highlightBlock(lastHighlighted, false);
 | 
					        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 */
 | 
					    /* robot number button listener */
 | 
				
			||||||
    $(".btn-robot-go").click(function() {
 | 
					    $(".btn-robot-go").click(function() {
 | 
				
			||||||
        /* extract and validate the selected robot ID */
 | 
					        /* extract and validate the selected robot ID */
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user