fix(webterminal.js): send bug

pull/123/head
liuzheng712 2016-03-04 20:12:09 +08:00
parent b879e724e2
commit 94a4d68be2
1 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ function openTerminal(options) {
});
term.open();
term.on('data', function (data) {
sock.send(data)
sock.send(JSON.stringify({'data': data}))
});
$('.terminal').detach().appendTo('#term');
term.resize(80, 24);
@ -131,7 +131,7 @@ $(document).ready(function () {
var geom = resize();
console.log(geom);
term_client.term.resize(geom.cols, geom.rows);
term_client.client.send({'resize': {'rows': geom.rows, 'cols': geom.cols}});
term_client.client.send(JSON.stringify({'data':{'resize': {'rows': geom.rows, 'cols': geom.cols}}}));
$('#ssh').show();
}