mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-24 03:05:41 +00:00
renamed fm_header to fm-header
This commit is contained in:
parent
58a3ae07b1
commit
922fd50b5b
10 changed files with 41 additions and 36 deletions
|
|
@ -16,6 +16,9 @@ and Util.setTimeout(pFunction [, pCallBack, pTime])
|
|||
|
||||
* From now api url on client readed from config.json.
|
||||
|
||||
* If choosen upload to -> Gist, and file in json have
|
||||
not '.json' extension, it's added to the and of filename.
|
||||
|
||||
|
||||
2012.12.12, Version 0.1.8
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"cache" : {"allowed" : false},
|
||||
"minification" : {
|
||||
"js" : false,
|
||||
"css" : true,
|
||||
"css" : false,
|
||||
"html" : true,
|
||||
"img" : true
|
||||
},
|
||||
|
|
|
|||
|
|
@ -59,9 +59,6 @@ body{
|
|||
text-shadow:black 0 2px 1px;
|
||||
}
|
||||
.path-icon:hover{
|
||||
/*
|
||||
color:#45D827;
|
||||
*/
|
||||
cursor:pointer;
|
||||
}
|
||||
.path-icon:active{
|
||||
|
|
@ -111,13 +108,14 @@ body{
|
|||
background-color: white;
|
||||
border: 1.5px solid rgba(49,123,249,.40);
|
||||
}
|
||||
|
||||
.cmd-button:hover{
|
||||
border: 1.5px solid rgb(0,0,0);
|
||||
}
|
||||
|
||||
.cmd-button:active{
|
||||
color: white;
|
||||
background-color: rgb(49,123,249);
|
||||
background-color: rgb(49,123,249);
|
||||
}
|
||||
|
||||
.clear-cache{
|
||||
|
|
@ -126,19 +124,13 @@ body{
|
|||
background:url(/img/console_clear.png) -4px -4px no-repeat;
|
||||
}
|
||||
.clear-cache:active{
|
||||
/*
|
||||
background-position-y: -25px;
|
||||
*/
|
||||
top:5px;
|
||||
}
|
||||
|
||||
.settings:before{
|
||||
content:'k';
|
||||
}
|
||||
top:5px;
|
||||
}
|
||||
|
||||
.links{
|
||||
color:red;
|
||||
}
|
||||
|
||||
|
||||
.mini-icon {
|
||||
position: relative;
|
||||
top: 2px;
|
||||
|
|
@ -177,7 +169,7 @@ body{
|
|||
height: 90%;
|
||||
margin: 26px 26px 0 26px;
|
||||
}
|
||||
.fm_header{
|
||||
.fm-header{
|
||||
font-weight: bold;
|
||||
}
|
||||
#path{
|
||||
|
|
@ -233,8 +225,6 @@ body{
|
|||
*/
|
||||
text-align: right;
|
||||
}
|
||||
.owner{
|
||||
}
|
||||
.mode{
|
||||
float: right;
|
||||
width: 25%;
|
||||
|
|
@ -252,14 +242,12 @@ button{
|
|||
width:10%;
|
||||
}
|
||||
a{
|
||||
text-decoration:none;
|
||||
text-decoration:none;
|
||||
}
|
||||
a:hover, a:active {
|
||||
color: #06e;
|
||||
cursor:pointer;
|
||||
outline: 0;
|
||||
}
|
||||
a:focus { outline: thin dotted; }
|
||||
|
||||
/* Если размер окна очень маленький
|
||||
* располагаем имя и атрибуты файла
|
||||
|
|
@ -276,6 +264,7 @@ a:focus { outline: thin dotted; }
|
|||
}
|
||||
/* текущий файл под курсором */
|
||||
.current-file{
|
||||
background-color: rgb(49, 123, 249);
|
||||
background-color: rgba(49, 123, 249, .40);
|
||||
color:white;
|
||||
}
|
||||
|
|
@ -297,12 +286,14 @@ a:focus { outline: thin dotted; }
|
|||
position: relative;
|
||||
top: -17px;
|
||||
|
||||
color: rgb(246, 224, 124);
|
||||
color: rgba(246, 224, 124, 0.56);
|
||||
}
|
||||
.directory::before{
|
||||
content: '\f216';
|
||||
}
|
||||
.text-file::before{
|
||||
color: rgb(26, 224, 124);
|
||||
color: rgba(26, 224, 124, 0.56);
|
||||
content: '\f211';
|
||||
}
|
||||
|
|
@ -353,7 +344,7 @@ a:focus { outline: thin dotted; }
|
|||
}
|
||||
}
|
||||
@media only screen and (min-width: 601px) and (max-width: 785px){
|
||||
.panel{
|
||||
.panel{
|
||||
width:94% !important;
|
||||
}
|
||||
#right{
|
||||
|
|
@ -362,7 +353,7 @@ a:focus { outline: thin dotted; }
|
|||
}
|
||||
|
||||
@media only screen and (min-width:786px) and (max-width: 1155px){
|
||||
.panel{
|
||||
.panel{
|
||||
width:94% !important;
|
||||
}
|
||||
/* если правая панель не помещаеться - прячем её */
|
||||
|
|
|
|||
|
|
@ -361,15 +361,14 @@ function baseInit(pCallBack){
|
|||
if( !DOM.Cache.get('/') )
|
||||
DOM.Cache.set('/', cloudcmd._getJSONfromFileTable());
|
||||
});
|
||||
|
||||
|
||||
/* устанавливаем размер высоты таблицы файлов
|
||||
* исходя из размеров разрешения экрана
|
||||
*/
|
||||
|
||||
|
||||
/* выделяем строку с первым файлом */
|
||||
var lFmHeader = getByClass('fm_header');
|
||||
if(lFmHeader && lFmHeader[0].nextSibling)
|
||||
DOM.setCurrentFile(lFmHeader[0].nextSibling);
|
||||
var lFmHeader = getByClass('fm-header');
|
||||
DOM.setCurrentFile(lFmHeader[0].nextSibling);
|
||||
|
||||
/* показываем элементы, которые будут работать только, если есть js */
|
||||
var lFM = getById('fm');
|
||||
|
|
@ -383,7 +382,7 @@ function baseInit(pCallBack){
|
|||
|
||||
var lHeight = window.screen.height;
|
||||
lHeight = lHeight - (lHeight/3).toFixed();
|
||||
|
||||
|
||||
lHeight = (lHeight / 100).toFixed() * 100;
|
||||
|
||||
cloudcmd.HEIGHT = lHeight;
|
||||
|
|
|
|||
|
|
@ -850,7 +850,7 @@ var CloudCommander, Util, DOM, CloudFunc;
|
|||
if (pCurrentFile.className === 'path')
|
||||
pCurrentFile = pCurrentFile.nextSibling;
|
||||
|
||||
if (pCurrentFile.className === 'fm_header')
|
||||
if (pCurrentFile.className === 'fm-header')
|
||||
pCurrentFile = pCurrentFile.nextSibling;
|
||||
|
||||
if(lCurrentFileWas)
|
||||
|
|
|
|||
|
|
@ -78,8 +78,13 @@ var CloudCommander, Util, DOM, $;
|
|||
callback: function(key, opt){
|
||||
DOM.getCurrentFileContent(function(pData){
|
||||
var lName = DOM.getCurrentName();
|
||||
if( Util.isObject(pData) )
|
||||
if( Util.isObject(pData) ){
|
||||
pData = JSON.stringify(pData, null, 4);
|
||||
|
||||
var lExt = '.json';
|
||||
if( !Util.checkExtension(lName, lExt) )
|
||||
lName += lExt;
|
||||
}
|
||||
|
||||
var lGitHub = cloudcmd.GitHub;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ var CloudCommander, Util, DOM, $, Github, cb;
|
|||
Cache = DOM.Cache,
|
||||
|
||||
APIURL,
|
||||
AuthURL = APIURL + '/auth',
|
||||
AuthURL,
|
||||
|
||||
GitHub_ID,
|
||||
GithubLocal,
|
||||
|
|
@ -45,6 +45,8 @@ var CloudCommander, Util, DOM, $, Github, cb;
|
|||
cloudcmd.getConfig(function(pConfig){
|
||||
GitHub_ID = pConfig.github_key;
|
||||
APIURL = pConfig.api_url;
|
||||
AuthURL = APIURL + '/auth';
|
||||
|
||||
Util.exec(pCallBack);
|
||||
});
|
||||
}
|
||||
|
|
@ -126,6 +128,7 @@ var CloudCommander, Util, DOM, $, Github, cb;
|
|||
*/
|
||||
cloudcmd.GitHub.createGist = function(pContent, pFileName){
|
||||
if(pContent){
|
||||
DOM.Images.showLoad();
|
||||
if(!pFileName)
|
||||
pFileName = Util.getDate();
|
||||
|
||||
|
|
@ -144,7 +147,11 @@ var CloudCommander, Util, DOM, $, Github, cb;
|
|||
|
||||
lOptions.files = lFiles;
|
||||
|
||||
lGist.create(lOptions, cb);
|
||||
lGist.create(lOptions, function(pError, pData){
|
||||
DOM.Images.hideLoad();
|
||||
console.log(pError || pData);
|
||||
console.log(pData && pData.html_url);
|
||||
});
|
||||
}
|
||||
|
||||
return pContent;
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ var CloudFunc, exports;
|
|||
*/
|
||||
CloudFunc._getFileTableHeader = function(pFileTableTitles)
|
||||
{
|
||||
var lHeader='<li class=fm_header>';
|
||||
var lHeader='<li class=fm-header>';
|
||||
lHeader+='<span class=mini-icon></span>';
|
||||
for(var i=0;i<pFileTableTitles.length;i++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ var Util, exports;
|
|||
* длинны расширения -
|
||||
* имеет смысл продолжать
|
||||
*/
|
||||
if (typeof pExt === 'string' && pName.length > pExt.length) {
|
||||
if (typeof pExt === 'string' && pName.length > pExt.length) {
|
||||
var lExtNum = pName.lastIndexOf(pExt), /* последнее вхождение расширения*/
|
||||
lExtSub = lLength - lExtNum; /* длина расширения*/
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
'</a>/X11/' +
|
||||
'</span>' +
|
||||
'</li>' +
|
||||
'<li class=fm_header>' +
|
||||
'<li class=fm-header>' +
|
||||
'<span class=mini-icon></span>' +
|
||||
'<span class=name>name</span>' +
|
||||
'<span class=size>size</span>' +
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue