mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
refactored
This commit is contained in:
parent
701fefa632
commit
c4fd5bc1f5
10 changed files with 74 additions and 85 deletions
|
|
@ -1,18 +1,16 @@
|
|||
var CloudCommander, Util, DOM, $;
|
||||
/* object contains terminal jqconsole */
|
||||
|
||||
(function(CloudCommander, Util, DOM){
|
||||
(function(CloudCmd, Util, DOM){
|
||||
'use strict';
|
||||
|
||||
var cloudcmd = CloudCommander,
|
||||
|
||||
KeyBinding = cloudcmd.KeyBinding,
|
||||
var KeyBinding = CloudCmd.KeyBinding,
|
||||
TerminalId,
|
||||
Term,
|
||||
Hidden = false,
|
||||
JqueryTerminal = {};
|
||||
|
||||
cloudcmd.Terminal = {};
|
||||
CloudCmd.Terminal = {};
|
||||
|
||||
/* PRIVATE FUNCTIONS */
|
||||
|
||||
|
|
@ -35,7 +33,7 @@ var CloudCommander, Util, DOM, $;
|
|||
$(function($, undefined) {
|
||||
Term = JqueryTerminal.Term = $('#terminal').terminal(function(command, term){
|
||||
term.echo('');
|
||||
cloudcmd.Socket.send(command);
|
||||
CloudCmd.Socket.send(command);
|
||||
}, {
|
||||
greetings : '[[;#729FCF;]Cloud Commander Terminal]',
|
||||
prompt : '[[;#729FCF;]cloudcmd> ]',
|
||||
|
|
@ -100,7 +98,7 @@ var CloudCommander, Util, DOM, $;
|
|||
/**
|
||||
* function bind keys
|
||||
*/
|
||||
cloudcmd.Terminal.init = function(){
|
||||
CloudCmd.Terminal.init = function(){
|
||||
/* loading js and css*/
|
||||
Util.loadOnLoad([
|
||||
JqueryTerminal.show,
|
||||
|
|
@ -111,7 +109,7 @@ var CloudCommander, Util, DOM, $;
|
|||
|
||||
/* добавляем обработчик клавишь */
|
||||
var lKeyHandler = function(pEvent){
|
||||
var lKEY = cloudcmd.KEY,
|
||||
var lKEY = CloudCmd.KEY,
|
||||
lKeyCode = pEvent.keyCode,
|
||||
lKeyBinded = KeyBinding.get();
|
||||
/* если клавиши можно обрабатывать */
|
||||
|
|
@ -127,6 +125,6 @@ var CloudCommander, Util, DOM, $;
|
|||
DOM.addKeyListener(lKeyHandler);
|
||||
};
|
||||
|
||||
cloudcmd.Terminal.JqueryTerminal = JqueryTerminal;
|
||||
CloudCmd.Terminal.JqueryTerminal = JqueryTerminal;
|
||||
|
||||
})(CloudCommander, Util, DOM);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue