feature(console) rm addNewLine

This commit is contained in:
coderaiser 2013-10-24 07:24:33 +00:00
parent 071e62d099
commit e2bce6c48a
2 changed files with 4 additions and 15 deletions

View file

@ -108,25 +108,14 @@ var CloudCmd, Util, DOM, $;
this.log = function(pText){
if (jqconsole)
jqconsole.Write( addNewLine(pText), 'log-msg');
jqconsole.Write(pText, 'log-msg');
};
this.error = function(pText){
if (jqconsole)
jqconsole.Write( addNewLine(pText), 'error-msg');
jqconsole.Write(pText, 'error-msg');
};
function addNewLine(pText){
var lNewLine = '',
n = pText && pText.length;
if(n && pText[n-1] !== '\n')
lNewLine = '\n';
return pText + lNewLine;
}
function load(pCallBack){
Util.time(Name + ' load');

View file

@ -26,7 +26,7 @@ var CloudCmd, Util, DOM, io;
CloudCmd.Socket = socket;
socket.on('connect', function () {
outToTerminal({stdout: 'socket connected'});
outToTerminal({stdout: 'socket connected\n'});
});
socket.on('message', function (msg) {
@ -37,7 +37,7 @@ var CloudCmd, Util, DOM, io;
});
socket.on('disconnect', function () {
outToTerminal({stderr: 'socket disconected'});
outToTerminal({stderr: 'socket disconected\n'});
});
}