Browse Source

Send LLAP message on 'enter' from textbox.

master
flabbergast 9 years ago
parent
commit
3c3a5fdb30
  1. 9
      public/js/index.js

9
public/js/index.js

@ -1,7 +1,7 @@
$(document).ready(function(){
$('#wrapper #serialtalk #serialtalk-btn').click(function(e){
var sendLLAPmessageEvent = function(e){
// handle the button press
/* useful fns: $(e.target).attr('id') .addClass('btn-warning')
if (socket && socket_connected){
@ -15,5 +15,10 @@ $(document).ready(function(){
} else {
// socket unavailable: can't send
}
});
}
$('#wrapper #serialtalk #serialtalk-btn').click(sendLLAPmessageEvent);
$('#wrapper #serialtalk #serialtalk-text').keyup(function(e){
if (e.keyCode==13) { sendLLAPmessageEvent(e); }
});
});
Loading…
Cancel
Save