mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
fixed bug with traveling in directories with Javascript dissabled
This commit is contained in:
parent
53a47d3532
commit
02f9e2b64b
2 changed files with 19 additions and 14 deletions
|
|
@ -135,6 +135,9 @@ config.json only if it setted up.
|
|||
|
||||
* Added url change on folder changing.
|
||||
|
||||
* Fixed bug with traveling in directories with
|
||||
Javascript dissabled.
|
||||
|
||||
|
||||
2012.10.01, Version 0.1.7
|
||||
|
||||
|
|
|
|||
30
server.js
30
server.js
|
|
@ -349,29 +349,31 @@
|
|||
* длиннее
|
||||
*/
|
||||
|
||||
if(pathname.indexOf(lNoJS_s) !== lFS_s.length && pathname !== '/'){
|
||||
CloudServer.NoJS = false;
|
||||
|
||||
}else
|
||||
pathname = Util.removeStr(pathname, lNoJS_s);
|
||||
if(pathname.indexOf(lNoJS_s) !== lFS_s.length && pathname !== '/')
|
||||
CloudServer.NoJS = false;
|
||||
else{
|
||||
CloudServer.NoJS = true;
|
||||
pathname = Util.removeStr(pathname, lNoJS_s);
|
||||
}
|
||||
|
||||
/* убираем индекс файловой системы */
|
||||
if(pathname.indexOf(lFS_s) === 0){
|
||||
pathname = Util.removeStr(pathname, lFS_s);
|
||||
/* if query json setted up
|
||||
* load json data, no-js false.
|
||||
*/
|
||||
|
||||
if(lQuery === 'json')
|
||||
CloudServer.NoJS = false;
|
||||
|
||||
|
||||
/* если посетитель только зашел на сайт
|
||||
* no-js будет пустым, как и fs.
|
||||
* Если в пути нету fs - посетитель только зашел на сайт
|
||||
* загружаем его полностью.
|
||||
*/
|
||||
}else
|
||||
CloudServer.NoJS = true;
|
||||
}
|
||||
|
||||
/* if query json setted up
|
||||
* load json data, no-js false.
|
||||
*/
|
||||
|
||||
if(lQuery === 'json')
|
||||
CloudServer.NoJS = false;
|
||||
|
||||
|
||||
/* если в итоге путь пустой
|
||||
* делаем его корневым
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue