refactored

This commit is contained in:
coderaiser 2013-04-04 06:06:02 -04:00
parent 428d9492ef
commit 7ffb00a984
6 changed files with 141 additions and 137 deletions

View file

@ -1,6 +1,6 @@
/* module make possible connectoin thrue socket.io on a client */
var CloudCommander, DOM, Util, io;
(function(CloudCmd, DOM, Util){
var CloudCommander, Util, DOM, io;
(function(CloudCmd, Util, DOM, io){
'use strict';
var Messages = [],
@ -46,7 +46,7 @@ var CloudCommander, DOM, Util, io;
},
onerror : function(){
console.log('could not connect to socket.io\n'+
Util.log('could not connect to socket.io\n'+
'npm i socket.io');
}
});
@ -62,6 +62,7 @@ var CloudCommander, DOM, Util, io;
if(lTerm){
var lStdout,
lStderr;
if(Messages.length){
/* show oll msg from buffer */
for(var i = 0, n = Messages.length; i < n; i++){
@ -98,9 +99,10 @@ var CloudCommander, DOM, Util, io;
Messages.push(pMsg);
lResult = false;
}
console.log(pMsg);
Util.log(pMsg);
return lResult;
}
})(CloudCommander, DOM, Util);
})(CloudCommander, Util, DOM, io);