From dc119a3b2778045e2239037a714cf2e316197314 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 25 Jul 2012 07:23:37 -0400 Subject: [PATCH] minor changes --- client.js | 10 ++++++++++ lib/server/object.js | 11 +++++++---- server.js | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/client.js b/client.js index 8e4eac0d..b905e3a7 100644 --- a/client.js +++ b/client.js @@ -18,6 +18,7 @@ var CloudClient={ keyBinding :function(){},/* функция нажатий обработки клавишь */ Editor :function(){},/* function loads and shows editor */ + Viewer :function(){},/* function loads and shows viewer */ keyBinded :false,/* оброботка нажатий клавишь установлена*/ _loadDir :function(){}, /* @@ -151,6 +152,14 @@ CloudClient.Editor = (function(){ }) }); }); + +/* function loads and shows viewer */ +CloudClient.Viewer = (function(){ + CloudCommander.jsload('lib/client/viewer.js', + function(){ + CloudCommander.Viewer.Keys(); + }); +}); /* * Функция привязываеться ко всем ссылкам и * загружает содержимое каталогов @@ -787,6 +796,7 @@ try{ /* привязываем клавиши к функциям */ CloudCommander.keyBinding(); CloudCommander.Editor(); + CloudCommander.Viewer(); }; } catch(err){} \ No newline at end of file diff --git a/lib/server/object.js b/lib/server/object.js index b5ffe0ee..d8321f80 100644 --- a/lib/server/object.js +++ b/lib/server/object.js @@ -65,7 +65,8 @@ exports.Cache={ */ exports.Minify={ /* pathes to directories */ - INDEX :'index.html', + INDEX :'index.html', + LIBDIRCLIENT : './lib/client', /* приватный переключатель минимизации */ _allowed :{css:true,js:true,html:true, img: true}, @@ -134,6 +135,7 @@ exports.Minify={ ' changed. size:', (pFinalCode = pFinalCode .replace('editor.js','editor.min.js') + .replace('viewer.js','viewer.min.js') .replace('cloudfunc.js','cloudfunc.min.js') .replace('keyBinding.js','keyBinding.min.js') .replace('/lib/', lMinFolder) @@ -147,9 +149,10 @@ exports.Minify={ if (this._allowed.js) { lOptimizeParams=[{ 'client.js': lPostProcessing_f}, - 'lib/cloudfunc.js', - 'lib/client/keyBinding.js', - 'lib/client/editor.js']; + this.LIBDIRCLIENT + '/cloudfunc.js', + this.LIBDIRCLIENT + '/keyBinding.js', + this.LIBDIRCLIENT + '/editor.js', + this.LIBDIRCLIENT + '/viewer.js']; } if (this._allowed.html) diff --git a/server.js b/server.js index f4658c4c..511cb638 100644 --- a/server.js +++ b/server.js @@ -66,7 +66,7 @@ var CloudServer = { /* КОНСТАНТЫ */ INDEX : 'index.html', LIBDIR : './lib', - LIBDIRSERVER : './lib/server' + LIBDIRSERVER : './lib/server' }; var DirPath = '/';