mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-21 02:29:23 +00:00
added ability to add ?json flag only if we work with dir
This commit is contained in:
parent
7ddd67f3b0
commit
0dec6bc042
3 changed files with 32 additions and 28 deletions
|
|
@ -212,11 +212,8 @@
|
|||
lJSON[i+1] = lJSONFile;
|
||||
}
|
||||
|
||||
/* если js недоступен
|
||||
* или отключен выcылаем html-код
|
||||
* и прописываем соответствующие заголовки
|
||||
*/
|
||||
if( noJS(lReq) ){
|
||||
/* если js отключен выcылаем html-код */
|
||||
if( main.getQuery(lReq) === 'html' ){
|
||||
var lPanel = CloudFunc.buildFromJSON(lJSON);
|
||||
lList = '<ul id=left class=panel>' + lPanel + '</ul>' +
|
||||
'<ul id=right class=panel>' + lPanel + '</ul>';
|
||||
|
|
@ -385,6 +382,7 @@
|
|||
return lRet;
|
||||
}
|
||||
|
||||
|
||||
function getDirPath(pReq){
|
||||
var lRet = getCleanPath(pReq);
|
||||
|
||||
|
|
@ -394,16 +392,6 @@
|
|||
return lRet;
|
||||
}
|
||||
|
||||
function noJS(pReq){
|
||||
var lNoJS, lPath;
|
||||
if(pReq){
|
||||
lPath = getPath(pReq);
|
||||
|
||||
lNoJS = lPath === '/' || main.getQuery(pReq) === 'html';
|
||||
}
|
||||
|
||||
return lNoJS;
|
||||
}
|
||||
|
||||
function isGZIP(pReq){
|
||||
var lEnc, lGZIP;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue