diff --git a/ChangeLog b/ChangeLog index 67a6eb07..1e5ba8fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -124,6 +124,9 @@ in any position in anyLoadOnLoad function. * Added chainable to Cache object in DOM. +* Changed default ip to null so IP would be geted from +config.json only if it setted up. + 2012.10.01, Version 0.1.7 diff --git a/client.js b/client.js index 49e793f8..2d3cdd87 100644 --- a/client.js +++ b/client.js @@ -52,7 +52,7 @@ var CloudClient = { OLD_BROWSER : false, HOST : (function(){ - var lLocation = document.location; + var lLocation = document.location; return lLocation.protocol + '//' + lLocation.host; })() }; diff --git a/config.json b/config.json index 045e85e1..a5664801 100644 --- a/config.json +++ b/config.json @@ -14,6 +14,6 @@ "logs" : false, "socket" : true, "port" : 80, - "ip" : "127.0.0.1", + "ip" : null, "rest" : true } \ No newline at end of file diff --git a/lib/client/editor/_codemirror.js b/lib/client/editor/_codemirror.js index 2bd58096..3c16541e 100644 --- a/lib/client/editor/_codemirror.js +++ b/lib/client/editor/_codemirror.js @@ -99,8 +99,7 @@ var CloudCommander, Util, DOM, CloudFunc, CodeMirror; console.timeEnd('codemirror load'); CodeMirrorLoaded = true; Util.exec(pCallBack); - }); - + }); } /** diff --git a/lib/client/menu.js b/lib/client/menu.js index 50d7f9cf..8a79edff 100644 --- a/lib/client/menu.js +++ b/lib/client/menu.js @@ -106,15 +106,16 @@ var CloudCommander, Util, DOM, CloudFunc, $; function load(pCallBack){ console.time('menu load'); - var lDir = Menu.dir; + var lDir = Menu.dir, + lFiles = [ + lDir + 'contextMenu.js', + lDir + 'contextMenu.css' + ]; - DOM.anyLoadInParallel([ - lDir + 'contextMenu.js', - lDir + 'contextMenu.css'], - function(){ - console.timeEnd('menu load'); - Util.exec(pCallBack); - }); + DOM.anyLoadInParallel(lFiles, function(){ + console.timeEnd('menu load'); + Util.exec(pCallBack); + }); } function set(){ @@ -205,7 +206,7 @@ var CloudCommander, Util, DOM, CloudFunc, $; load ])); - var key_event = (function(pEvent){ + var key_event = function(pEvent){ /* если клавиши можно обрабатывать */ if( KeyBinding.get() ){ /* if shift + F10 pressed */ @@ -219,7 +220,7 @@ var CloudCommander, Util, DOM, CloudFunc, $; } else if (pEvent.keyCode === cloudcmd.KEY.ESC) KeyBinding.set(); - }); + }; /* добавляем обработчик клавишь */ DOM.addKeyListener( key_event ); diff --git a/lib/client/storage/_github.js b/lib/client/storage/_github.js index 03e4d6e4..798fb7b3 100644 --- a/lib/client/storage/_github.js +++ b/lib/client/storage/_github.js @@ -28,17 +28,18 @@ var CloudCommander, Util, DOM, $, Github, cb; function load(pCallBack){ console.time('github load'); - var lDir = './lib/client/storage/github/'; - DOM.anyLoadInParallel([ - lDir + 'github.js', - lDir + 'lib/base64.js', - lDir + 'lib/underscore.js'], - - function(){ - console.timeEnd('github load'); - DOM.Images.hideLoad(); - - Util.exec(pCallBack); + var lDir = './lib/client/storage/github/', + lFiles = [ + lDir + 'github.js', + lDir + 'lib/base64.js', + lDir + 'lib/underscore.js' + ]; + + DOM.anyLoadInParallel(lFiles, function(){ + console.timeEnd('github load'); + DOM.Images.hideLoad(); + + Util.exec(pCallBack); }); } diff --git a/lib/client/terminal.js b/lib/client/terminal.js index ff1d4c88..04a862d5 100644 --- a/lib/client/terminal.js +++ b/lib/client/terminal.js @@ -22,34 +22,34 @@ var CloudCommander, Util, DOM, $; function load(pCallBack){ console.time('terminal load'); - var lDir = 'lib/client/terminal/jquery-terminal/jquery.'; + var lDir = 'lib/client/terminal/jquery-terminal/jquery.', + lFiles = [ + lDir + 'terminal.js', + lDir + 'mousewheel.js', + lDir + 'terminal.css' + ]; - DOM.anyLoadInParallel([ - lDir + 'terminal.js', - lDir + 'mousewheel.js', - lDir + 'terminal.css'], + DOM.anyLoadInParallel(lFiles, function(){ + console.timeEnd('terminal load'); + init(); - function(){ - console.timeEnd('terminal load'); - init(); - - $(function($, undefined) { - Term = JqueryTerminal.Term = $('#terminal').terminal(function(command, term){ - term.echo(''); - cloudcmd.Socket.send(command); - }, { - greetings : '[[;#729FCF;]Cloud Commander Terminal]', - prompt : '[[;#729FCF;]cloudcmd> ]', - color : '#729FCF;' - }); + $(function($, undefined) { + Term = JqueryTerminal.Term = $('#terminal').terminal(function(command, term){ + term.echo(''); + cloudcmd.Socket.send(command); + }, { + greetings : '[[;#729FCF;]Cloud Commander Terminal]', + prompt : '[[;#729FCF;]cloudcmd> ]', + color : '#729FCF;' }); - /* removing resize function, no need for us */ - Term.resize = function(){}; - - $(window).unbind('resize'); - - Util.exec(pCallBack.callback || pCallBack); }); + /* removing resize function, no need for us */ + Term.resize = function(){}; + + $(window).unbind('resize'); + + Util.exec(pCallBack.callback || pCallBack); + }); } /**