diff --git a/lib/client/terminal.js b/lib/client/terminal.js index 09d5a3f7..7fbf605b 100644 --- a/lib/client/terminal.js +++ b/lib/client/terminal.js @@ -16,10 +16,12 @@ var CloudCommander, $; var JqueryTerminal = {}; + /* PRIVATE FUNCTIONS */ + /** * function loads jquery-terminal */ - JqueryTerminal.load = (function(){ + function load(){ Util.cssLoad({ src : 'lib/client/terminal/jquery-terminal/jquery.terminal.css' }); @@ -29,7 +31,7 @@ var CloudCommander, $; var lLoadTerm_func = function(){ Util.jsload('lib/client/terminal/jquery-terminal/jquery.terminal.js', function(){ - JqueryTerminal.init(); + init(); $(function($, undefined) { Term = JqueryTerminal.Term = $('#terminal').terminal(function(command, term){ @@ -47,13 +49,12 @@ var CloudCommander, $; Util.jsload('lib/client/terminal/jquery-terminal/jquery.mousewheel.js', lLoadTerm_func); - }); - + } /** * function do basic initialization */ - JqueryTerminal.init = (function(){ + function init(){ if(!TerminalId){ var lFM = Util.getById('fm'); if(lFM) @@ -66,12 +67,14 @@ var CloudCommander, $; } else console.log('Error. Something went wrong FM not found'); - }); + } + + /* PUBLICK FUNCTIONS */ /** * functin show jquery-terminal */ - JqueryTerminal.show = (function(){ + JqueryTerminal.show = function(){ Util.Images.hideLoad(); /* only if panel was hided */ @@ -84,12 +87,12 @@ var CloudCommander, $; Term.resume(); } - }); + }; /** * function hide jquery-terminal */ - JqueryTerminal.hide = (function(){ + JqueryTerminal.hide = function(){ Hidden = true; Util.hide(TerminalId); @@ -98,7 +101,7 @@ var CloudCommander, $; KeyBinding.set(); Term.pause(); - }); + }; /** @@ -106,7 +109,7 @@ var CloudCommander, $; */ cloudcmd.Terminal.Keys = (function(){ /* loading js and css*/ - Util.jqueryLoad( JqueryTerminal.load ); + Util.jqueryLoad(load); var key_event = function(event){ /* если клавиши можно обрабатывать */