mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 17:04:16 +00:00
fixed bug with building file table from json data, when we go around and come back to root dir
This commit is contained in:
parent
7ecc4e2909
commit
723bb9f9c3
1 changed files with 14 additions and 1 deletions
15
client.js
15
client.js
|
|
@ -697,7 +697,20 @@ CloudClient._getJSONfromFileTable=function()
|
|||
var lIsDir=lLI[i].getElementsByClassName('mini-icon')[0]
|
||||
.className.replace('mini-icon ','')==='directory'?true:false;
|
||||
|
||||
var lName=lLI[i].getElementsByClassName('name')[0].textContent;
|
||||
var lName=lLI[i].getElementsByClassName('name')[0]
|
||||
lName &&
|
||||
(lName = lName.getElementsByTagName('a')
|
||||
/* if found link to folder
|
||||
* cheking is it a full name
|
||||
* or short
|
||||
*/
|
||||
lName.length &&
|
||||
(lName = lName.title);
|
||||
/* if short we got title
|
||||
* if full - getting textConent
|
||||
*/
|
||||
lName ||
|
||||
(lName = lName.textContent);
|
||||
/* если это папка - выводим слово dir вместо размера*/
|
||||
var lSize=lIsDir?'dir':lLI[i].getElementsByClassName('size')[0].textContent;
|
||||
var lMode=lLI[i].getElementsByClassName('mode')[0].textContent;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue