mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-24 03:05:41 +00:00
added ID for every folder
This commit is contained in:
parent
e49dfb2371
commit
0137ed5863
2 changed files with 18 additions and 10 deletions
14
client.js
14
client.js
|
|
@ -429,9 +429,9 @@ CloudClient._changeLinks = function(pPanelID)
|
|||
var lFS_s = CloudFunc.FS;
|
||||
|
||||
for(var i=0;i<a.length;i++)
|
||||
{
|
||||
{
|
||||
/* если ссылка на папку, а не файл */
|
||||
if(a[i].target!=='_blank')
|
||||
if(a[i].target !== '_blank')
|
||||
{
|
||||
/* убираем адрес хоста*/
|
||||
var link='/'+a[i].href.replace(document.location.href,'');
|
||||
|
|
@ -450,11 +450,15 @@ CloudClient._changeLinks = function(pPanelID)
|
|||
*/
|
||||
else{
|
||||
try{
|
||||
a[i].parentElement.parentElement.onclick=CloudClient._setCurrent();
|
||||
a[i].parentElement.parentElement.ondblclick=CloudClient._loadDir(link);
|
||||
var lLi = a[i].parentElement.parentElement;
|
||||
|
||||
lLi.onclick = CloudClient._setCurrent();
|
||||
lLi.ondblclick = CloudClient._loadDir(link);
|
||||
lLi.id = (a[i].title ? a[i].title : a[i].textContent) +
|
||||
'_' + pPanelID;
|
||||
}catch(error){console.log(error);}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
14
server.js
14
server.js
|
|
@ -86,13 +86,13 @@ try {
|
|||
/* добавляем модуль с функциями */
|
||||
var CloudFunc;
|
||||
try {
|
||||
CloudFunc = require(CloudServer.LIBDIR +
|
||||
CloudFunc = require(CloudServer.LIBDIR +
|
||||
'/cloudfunc');
|
||||
|
||||
CloudServer.Cache = require(CloudServer.LIBDIRSERVER +
|
||||
CloudServer.Cache = require(CloudServer.LIBDIRSERVER +
|
||||
'/object').Cache;
|
||||
|
||||
CloudServer.Minify = require(CloudServer.LIBDIRSERVER +
|
||||
CloudServer.Minify = require(CloudServer.LIBDIRSERVER +
|
||||
'/object').Minify;
|
||||
}catch(pError){
|
||||
console.log('could not found one of Cloud Commander SS files');
|
||||
|
|
@ -541,13 +541,17 @@ CloudServer._readDir=function (pError, pFiles)
|
|||
'client.min.js')
|
||||
:lIndex;
|
||||
|
||||
lIndex=lIndex.toString().replace('<div id=fm class=no-js>','<div id=fm class=no-js>'+lList);
|
||||
lIndex=lIndex.toString().replace('<div id=fm class=no-js>',
|
||||
'<div id=fm class=no-js>'+lList);
|
||||
|
||||
/* меняем title */
|
||||
lIndex=lIndex.replace('<title>Cloud Commander</title>',
|
||||
'<title>'+CloudFunc.setTitle()+'</title>');
|
||||
|
||||
/* отображаем панель быстрых клавишь */
|
||||
lList=lIndex;
|
||||
/* если браузер поддерживает gzip-сжатие*/
|
||||
|
||||
/* если браузер поддерживает gzip-сжатие*/
|
||||
lHeader=CloudServer.generateHeaders('text/html',CloudServer.Gzip);
|
||||
}catch(error){console.log(error);}
|
||||
}else{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue