added ability to freeze terminal screen on connection lost

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

View file

@ -64,7 +64,8 @@ disabled in browsers.
* Added ability convert charset from win to unicode on win32.
* From now on disconnecting - trying to do new connection.
* Added ability to freeze terminal screen on connection lost
2012.08.24, Version 0.1.6

View file

@ -29,14 +29,15 @@ function readConfig(){
var lConfig = cloudRequire('./config');
if(lConfig){
console.log('config.json readed');
console.log(process.argv);
/* if command line parameter testing resolved
* setting config to testing, so server
* not created, just init and
* all logs writed to screen
*/
var lArg = process.argv[process.argv.length - 1];
var lArg = process.argv[process.argv.length - 1];
if ( lArg === 'test' || lArg === 'test\r') {
console.log(process.argv);
lConfig.server = false;
lConfig.logs = false;
}

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> '
});
});
};