mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 01:47:35 +00:00
moved images from dropbox
This commit is contained in:
parent
d79d5d358d
commit
1706c9dd59
6 changed files with 36 additions and 30 deletions
|
|
@ -115,9 +115,11 @@ CloudClient.Cache.isAllowed=(function(){
|
|||
* если он не поддерживаеться браузером
|
||||
* https://gist.github.com/350433
|
||||
*/
|
||||
/*
|
||||
CloudClient.jsload('https://raw.github.com/gist/350433/c9d3834ace63e5f5d7c8e1f6e3e2874d477cb9c1/gistfile1.js',
|
||||
function(){CloudClient.Cache._allowed=true;
|
||||
});
|
||||
*/
|
||||
}
|
||||
});
|
||||
/* если доступен localStorage и
|
||||
|
|
|
|||
BIN
images/console_clear.png
Normal file
BIN
images/console_clear.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
images/panel_refresh.png
Normal file
BIN
images/panel_refresh.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
BIN
images/spinner.gif
Normal file
BIN
images/spinner.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
49
server.js
49
server.js
|
|
@ -35,15 +35,7 @@ var CloudServer={
|
|||
|
||||
/* ПЕРЕМЕННЫЕ */
|
||||
/* Поддержка браузером JS*/
|
||||
NoJS :true,
|
||||
/* обьект содержит данные
|
||||
* о необходимости сжатия
|
||||
* данных и скриптов
|
||||
*/
|
||||
Minimize :{
|
||||
scriptSize:false,
|
||||
styleSize:false
|
||||
},
|
||||
NoJS :true,
|
||||
/* Поддержка gzip-сжатия
|
||||
* браузером
|
||||
*/
|
||||
|
|
@ -108,32 +100,51 @@ CloudServer.Cache={
|
|||
};
|
||||
|
||||
/* Обьект для сжатия скриптов и стилей
|
||||
* по умолчанию - сжимаються
|
||||
*/
|
||||
CloudServer.Minify={
|
||||
/* приватный переключатель минимизации */
|
||||
_styleAllowed :true,
|
||||
_jsAllowed :true,
|
||||
/* функция разрешает или запрещает
|
||||
* минимизировать стили
|
||||
*/
|
||||
setStyleAllowed :(function(pAllowed){
|
||||
this._styleAllowed=pAllowed;
|
||||
}),
|
||||
|
||||
/* функция разрешает или запрещает
|
||||
* минимизировать скрипты
|
||||
*/
|
||||
setJSAllowed :(function(pAllowed){
|
||||
this._jsAllowed=pAllowed;
|
||||
}),
|
||||
|
||||
scripts : function(){
|
||||
if(CloudServer.Minimize.scriptSize){
|
||||
if(this._jsAllowed){
|
||||
var lMinify = require('./minify');
|
||||
var lResult_b=lMinify.jsScripts();
|
||||
/* if we get false, files wasn't minified
|
||||
* error ocured
|
||||
*/
|
||||
CloudServer.Minify.done=(lResult_b===undefined?true:false);
|
||||
this.done=(lResult_b===undefined?true:false);
|
||||
}
|
||||
},
|
||||
/* свойство показывающее случилась ли ошибка*/
|
||||
done: false
|
||||
};
|
||||
|
||||
//var DirContent;
|
||||
|
||||
var LeftDir='/';
|
||||
var RightDir=LeftDir;
|
||||
//var LPrevDir;
|
||||
//var RPrevDir;
|
||||
|
||||
var Fs = require('fs'); /* модуль для работы с файловой системой*/
|
||||
var Path = require('path'); /* модуль для работы с путями*/
|
||||
/*
|
||||
var Path = require('path');
|
||||
*/ /* модуль для работы с путями*/
|
||||
|
||||
var Zlib = require('zlib'); /* модуль для сжатия данных gzip-ом*/
|
||||
var CloudFunc=CloudServer.Minimize.scripts?/* если стоит минификация*/
|
||||
var CloudFunc=CloudServer.Minify.done?/* если стоит минификация*/
|
||||
require('./cloudfunc.min'):/* добавляем сжатый - иначе обычный */
|
||||
require('./cloudfunc'); /* модуль с функциями */
|
||||
|
||||
|
|
@ -141,8 +152,8 @@ var CloudFunc=CloudServer.Minimize.scripts?/* если стоит минифик
|
|||
/* конструктор*/
|
||||
CloudServer.init=(function(){
|
||||
/* Переменная в которой храниться кэш*/
|
||||
CloudServer.Cache.setAllowed(false);
|
||||
CloudServer.Minimize.scriptSize=false
|
||||
CloudServer.Cache.setAllowed(true);
|
||||
CloudServer.Minify.setJSAllowed(true);
|
||||
/* Если нужно минимизируем скрипты */
|
||||
CloudServer.Minify.scripts();
|
||||
});
|
||||
|
|
@ -445,7 +456,7 @@ CloudServer._readDir=function (pError, pFiles)
|
|||
* we include minified version of
|
||||
* clien.js to index.html
|
||||
*/
|
||||
(CloudServer.Minimize.scriptSize && CloudServer.Minify.done)?
|
||||
(CloudServer.Minify.done)?
|
||||
lIndex=lIndex.replace('client.js','client.min.js'):'';
|
||||
|
||||
lIndex=lIndex.toString().replace('<div id=fm class=no-js>','<div id=fm class=no-js>'+lList);
|
||||
|
|
|
|||
15
style.css
15
style.css
|
|
@ -20,13 +20,6 @@
|
|||
body{
|
||||
font:16px "Droid Sans Mono";
|
||||
}
|
||||
/* убираем элементы,
|
||||
* которые будут работать только,
|
||||
* если есть js
|
||||
*/
|
||||
.no-js .refresh-icon{
|
||||
display:none;
|
||||
}
|
||||
|
||||
.menu{
|
||||
font: 16px 'Octicons Regular';
|
||||
|
|
@ -73,7 +66,7 @@
|
|||
top: -3px;
|
||||
}
|
||||
.loading{
|
||||
background:url(//dl.dropbox.com/u/74212301/mnemonia/images/icons/spinner.gif);
|
||||
background:url(images/spinner.gif);
|
||||
position:relative;
|
||||
top:1px;
|
||||
}
|
||||
|
|
@ -81,14 +74,14 @@
|
|||
color:rgba(222, 41, 41, 0.81);
|
||||
}
|
||||
.refresh-icon{
|
||||
background:url(//dl.dropbox.com/u/78163899/mnemonia/images/icons/panel_refresh.png) no-repeat;
|
||||
background:url(images/panel_refresh.png) no-repeat;
|
||||
}
|
||||
.refresh-icon:active{
|
||||
/*background-position-y: -15px;*/
|
||||
background:url(//dl.dropbox.com/u/78163899/mnemonia/images/icons/panel_refresh.png) 0 -15px no-repeat;
|
||||
background:url(images/panel_refresh.png) 0 -15px no-repeat;
|
||||
}
|
||||
.clear-cache{
|
||||
background:url(//dl.dropbox.com/u/78163899/mnemonia/images/icons/console_clear.png) -4px -4px no-repeat;
|
||||
background:url(images/console_clear.png) -4px -4px no-repeat;
|
||||
margin-right: 6px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue