refactored

This commit is contained in:
coderaiser 2013-01-10 09:52:19 -05:00
parent 701fefa632
commit c4fd5bc1f5
10 changed files with 74 additions and 85 deletions

View file

@ -1,22 +1,21 @@
/* module make possible connectoin thrue socket.io on a client */
var CloudCommander, DOM, Util, io;
(function(CloudCommander, DOM, Util){
"use strict";
(function(CloudCmd, DOM, Util){
'use strict';
var cloudcmd = CloudCommander,
Messages = [],
var Messages = [],
socket,
JqueryTerminal;
function getJqueryTerminal(){
return cloudcmd.Terminal.JqueryTerminal;
return CloudCmd.Terminal.JqueryTerminal;
}
DOM.jsload('/socket.io/lib/socket.io.js', {
onload : function(){
socket = io.connect(document.location.hostname);
cloudcmd.Socket = socket;
CloudCmd.Socket = socket;
socket.on('connect', function () {
JqueryTerminal = getJqueryTerminal();
@ -98,8 +97,7 @@ var CloudCommander, DOM, Util, io;
*/
Messages.push(pMsg);
lResult = false;
}
}
console.log(pMsg);
return lResult;