diff --git a/ChangeLog b/ChangeLog index 8cecaf48..19092aa0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -56,6 +56,8 @@ Start file is - cloudcmd.js * From now right panel would be always shown no matter js enabled or disabled in browsers. +* Added plagin terminal ( ` button under TAB). + 2012.08.24, Version 0.1.6 diff --git a/client.js b/client.js index 6ac02be9..55b26bca 100644 --- a/client.js +++ b/client.js @@ -1020,18 +1020,18 @@ CloudClient._setCurrent=(function(){ if(lCurrentFile){ if (Util.isCurrentFile(this) && typeof pFromEnter !== 'boolean'){ - var lParent = this; + //var lParent = this; - setTimeout(function(){ + //setTimeout(function(){ /* waiting a few seconds * and if classes still equal * make file name editable * in other case * double click event happend */ - if(Util.getCurrentFile() === lParent) - CloudClient._editFileName(lParent); - },1000); + // if(Util.getCurrentFile() === lParent) + // CloudClient._editFileName(lParent); + // },1000); } else{ /* устанавливаем курсор на файл, diff --git a/lib/client/keyBinding.js b/lib/client/keyBinding.js index a5a8c8de..4e3c1690 100644 --- a/lib/client/keyBinding.js +++ b/lib/client/keyBinding.js @@ -33,7 +33,9 @@ var CloudCommander; F2 : 113, F3 : 114, F4 : 115, - F10 : 121 + F10 : 121, + + TRA : 192 /* Typewritten Reverse Apostrophe (`) */ }; var KEY = cloudcmd.KEY; @@ -147,7 +149,7 @@ var CloudCommander; event.preventDefault();//запрет на дальнейшее действие } - else if (event.keyCode === KEY.T && event.altKey){ + else if (event.keyCode === KEY.TRA){ if(typeof cloudcmd.Terminal === 'function') cloudcmd.Terminal(); } diff --git a/lib/client/terminal.js b/lib/client/terminal.js index 90460a63..9afbe42c 100644 --- a/lib/client/terminal.js +++ b/lib/client/terminal.js @@ -4,18 +4,20 @@ var CloudCommander, jqconsole; (function(){ var cloudcmd = CloudCommander; var Util = CloudCommander.Util; + var KeyBinding = CloudCommander.KeyBinding; cloudcmd.Terminal = {}; jqconsole = {}; - jqconsole.load = (function(pParent){ + jqconsole.load = (function(){ Util.cssLoad({ src : 'lib/client/terminal/ansi.css' }); - + Util.jsload('lib/client/terminal/jqconsole-2.7.min.js', function(){ - pParent.init(); + jqconsole.init(); + jqconsole.show(); }); }); @@ -35,7 +37,9 @@ var CloudCommander, jqconsole; console.log('Error. Something went wrong FM not found'); }); - jqconsole.show = function(){ + jqconsole.show = function(){ + Util.hidePanel(); + $(function () { var jqconsole = $('#terminal').jqconsole('Hi\n', '>>>'); var startPrompt = function () { @@ -48,24 +52,24 @@ var CloudCommander, jqconsole; }); }; startPrompt(); - })(); + }); }; cloudcmd.Terminal.Keys = (function(){ "use strict"; - /* loading js and css of CodeMirror */ - jqconsole.load(jqconsole); + /* loading js and css*/ + Util.jqueryLoad( jqconsole.load ); - var key_event=function(event){ + var key_event = function(event){ /* если клавиши можно обрабатывать */ - if(cloudcmd.keyBinded){ + if( KeyBinding.get() ){ /* if f4 pressed */ - if(event.keyCode===114 && - event.altKey){ - jqconsole.show(); + if(event.keyCode === cloudcmd.KEY.TRA){ + KeyBinding.unSet(); + jqconsole.show(); } } }; diff --git a/lib/client/viewer.js b/lib/client/viewer.js index 6cb071f8..1666d56e 100644 --- a/lib/client/viewer.js +++ b/lib/client/viewer.js @@ -208,7 +208,6 @@ var CloudCommander, CloudFunc, $; var key_event = (function(pEvent){ /* если клавиши можно обрабатывать */ if( KeyBinding.get() ) - /* if f3 pressed */ if(pEvent.keyCode === cloudcmd.KEY.F3 && pEvent.shiftKey){ var lCurrentFile = Util.getCurrentFile();