mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 17:05:17 +00:00
fix(console) remove odd \n
This commit is contained in:
parent
3298add52a
commit
20d8d3922c
1 changed files with 15 additions and 3 deletions
|
|
@ -72,14 +72,26 @@ var CloudCmd, Util, DOM, $;
|
|||
|
||||
this.log = function(pText){
|
||||
if (jqconsole)
|
||||
jqconsole.Write(pText + '\n', 'log-msg');
|
||||
jqconsole.Write( addNewLine(pText), 'log-msg');
|
||||
};
|
||||
|
||||
this.error = function(pText){
|
||||
this.error = function(pText){
|
||||
if (jqconsole)
|
||||
jqconsole.Write(pText + '\n', 'error-msg');
|
||||
jqconsole.Write( addNewLine(pText), 'error-msg');
|
||||
};
|
||||
|
||||
function addNewLine(pText){
|
||||
var lNewLine, n = pText && pText.length;
|
||||
|
||||
if(n && pText[n-1] !== '\n')
|
||||
lNewLine = '\n';
|
||||
else
|
||||
lNewLine = '';
|
||||
|
||||
return pText + lNewLine;
|
||||
}
|
||||
|
||||
|
||||
function load(pCallBack){
|
||||
Util.time(Name + ' load');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue