mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-21 02:29:23 +00:00
added ability to freeze terminal screen on connection lost
This commit is contained in:
parent
776cd90875
commit
da5e1cfdc8
4 changed files with 10 additions and 7 deletions
|
|
@ -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();
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -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> '
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue