added ability to freeze terminal screen on connection lost

This commit is contained in:
coderaiser 2012-09-24 07:22:46 -04:00
parent 776cd90875
commit da5e1cfdc8
4 changed files with 10 additions and 7 deletions

View file

@ -17,6 +17,7 @@ var CloudCommander, io;
socket.on('connect', function () {
outToTerminal('socket connected');
JqueryTerminal.Term.resume();
});
socket.on('message', function (msg) {
@ -26,6 +27,7 @@ var CloudCommander, io;
socket.on('disconnect', function () {
outToTerminal('socket disconected');
JqueryTerminal.Term.pause();
});
},

View file

@ -57,13 +57,12 @@ var CloudCommander, $;
KeyBinding.unSet();
$(function($, undefined) {
$('#terminal').terminal(function(command, term) {
JqueryTerminal.Term = term;
JqueryTerminal.Term = $('#terminal').terminal(function(command, term){
term.echo('');
cloudcmd.Socket.send(command);
}, {
greetings: 'Javascript Interpreter',
prompt: 'cloudcmd>'
greetings : 'Javascript Interpreter',
prompt : 'cloudcmd> '
});
});
};