From a46671c94a98f54469a5c6b6e8602fe2e05ac430 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 14 Nov 2012 06:38:12 -0500 Subject: [PATCH] minor changes --- client.js | 4 ++-- cloudcmd.js | 2 +- lib/client/editor/_codemirror.js | 6 ++++-- lib/client/viewer.js | 16 ++++++++++++---- lib/server/main.js | 8 ++++---- 5 files changed, 23 insertions(+), 13 deletions(-) diff --git a/client.js b/client.js index 29bca5fe..ea009517 100644 --- a/client.js +++ b/client.js @@ -432,8 +432,8 @@ function initCmdButtons(pCallBack){ null, null, /* f1 */ null, /* f2 */ - cloudcmd.view, /* f3 */ - cloudcmd.edit, /* f4 */ + cloudcmd.Viewer, /* f3 */ + cloudcmd.Editor, /* f4 */ null, /* f5 */ null, /* f6 */ null, /* f7 */ diff --git a/cloudcmd.js b/cloudcmd.js index 75353439..38263abc 100644 --- a/cloudcmd.js +++ b/cloudcmd.js @@ -45,7 +45,7 @@ '' + CloudFunc.setTitle() + ''); if(!srv.Config.appcache) - pIndex = Util.removeStr(pIndex, ' manifest="/cloudcmd.appcache"'); + pIndex = Util.removeStr(pIndex, ' manifest=/cloudcmd.appcache'); return pIndex; diff --git a/lib/client/editor/_codemirror.js b/lib/client/editor/_codemirror.js index 0400a69b..3a339c07 100644 --- a/lib/client/editor/_codemirror.js +++ b/lib/client/editor/_codemirror.js @@ -222,9 +222,11 @@ var CloudCommander, Util, DOM, CloudFunc, CodeMirror; } } }; - + /* добавляем обработчик клавишь */ - DOM.addKeyListener( lKeyListener ); + DOM.addKeyListener( lKeyListener ); + + DOM.getById('f4').onclick = Util.retLoadOnLoad( lShowCodemirror ); }; cloudcmd.Editor.CodeMirror = CodeMirrorEditor; diff --git a/lib/client/viewer.js b/lib/client/viewer.js index 6bcbfceb..34953e29 100644 --- a/lib/client/viewer.js +++ b/lib/client/viewer.js @@ -202,18 +202,26 @@ var CloudCommander, Util, DOM, CloudFunc, $; FancyBox.load ])); - /* добавляем обработчик клавишь */ - DOM.addKeyListener(function(){ + var lView = function(){ + FancyBox.show( DOM.getCurrentFile() ); + }; + + var lKeyListener = function(){ var lF3 = cloudcmd.KEY.F3; /* если клавиши можно обрабатывать */ if( KeyBinding.get() && event.keyCode === lF3 && event.shiftKey ){ - FancyBox.show( DOM.getCurrentFile() ); + lView(); event.preventDefault(); } - }); + }; + + /* добавляем обработчик клавишь */ + DOM.addKeyListener(lKeyListener); + + DOM.getById('f3').onclick = lView; }; cloudcmd.Viewer.FancyBox = FancyBox; diff --git a/lib/server/main.js b/lib/server/main.js index b8490c20..7834d318 100644 --- a/lib/server/main.js +++ b/lib/server/main.js @@ -13,10 +13,10 @@ exports.WIN32 = isWin32(); /* Functions */ - exports.require = mrequire, - exports.librequire = librequire, - exports.srvrequire = srvrequire, - exports.rootrequire = rootrequire, + exports.require = mrequire, + exports.librequire = librequire, + exports.srvrequire = srvrequire, + exports.rootrequire = rootrequire, /* Native Modules*/ exports.child_process = require('child_process'),