From 931d6637d73180891a0f6c9b0dc2eb1f60b453a5 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 30 Aug 2012 07:35:34 -0400 Subject: [PATCH] added visual configuration --- client.js | 10 ++++++++++ lib/client/config.js | 13 +++++++++++++ lib/client/keyBinding.js | 17 +++++++++++++++-- 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 lib/client/config.js diff --git a/client.js b/client.js index f36c7c13..4d1bb9e1 100644 --- a/client.js +++ b/client.js @@ -688,6 +688,16 @@ CloudClient.Editor = (function(pCurrentFile, pIsReadOnly) { }); }); + +CloudClient.Config = (function() { + Util.jsload(CloudClient.LIBDIRCLIENT + + 'config.js',{ + onload: function(){ + CloudCommander.Config.Keys(); + } + }); +}); + CloudClient.GoogleAnalytics = (function(){ /* google analytics */ var lFunc = document.onmousemove; diff --git a/lib/client/config.js b/lib/client/config.js new file mode 100644 index 00000000..fb12db54 --- /dev/null +++ b/lib/client/config.js @@ -0,0 +1,13 @@ +/* gui module for config.json editing */ +var CloudCommander; + +(function(){ + "use strict"; + + CloudCommander.Config = {}; + + CloudCommander.Config.Keys = function(){ + console.log('config.js loaded'); + }; + +})(); \ No newline at end of file diff --git a/lib/client/keyBinding.js b/lib/client/keyBinding.js index c787e0bf..0a5f51ca 100644 --- a/lib/client/keyBinding.js +++ b/lib/client/keyBinding.js @@ -14,7 +14,9 @@ CloudCommander.KEY = { DOWN : 40, D : 68, - Q : 81, + + O : 79, + Q : 81, R : 82, S : 83, @@ -44,12 +46,23 @@ CloudCommander.keyBinding = (function(){ lName, i; /* если клавиши можно обрабатывать*/ if(CloudCommander.keyBinded && event){ + + /* open configuration window */ + if(event.keyCode === lKEY.O && event.altKey){ + console.log('openning config window...'); + + Util.Images.showLoad(); + if (typeof CloudCommander.Config === 'function') + CloudCommander.Config(); + + } + /* если нажали таб: * переносим курсор на * правую панель, если * мы были на левой и * наоборот - */ + */ if(event.keyCode === lKEY.TAB){ console.log('Tab pressed');