|
@@ -325,6 +325,7 @@ |
|
|
$('#name').val(modelName) |
|
|
$('#name').val(modelName) |
|
|
$('#version').val("0.0.1") |
|
|
$('#version').val("0.0.1") |
|
|
} |
|
|
} |
|
|
|
|
|
let dirKey="isOnlyDir--:&"; |
|
|
function showcreate(obj) { |
|
|
function showcreate(obj) { |
|
|
$('.ui.modal.second') |
|
|
$('.ui.modal.second') |
|
|
.modal({ |
|
|
.modal({ |
|
@@ -460,7 +461,7 @@ |
|
|
var zNodes=[]; |
|
|
var zNodes=[]; |
|
|
var nodesMap={}; |
|
|
var nodesMap={}; |
|
|
for (let i=0;i<n_length;i++){ |
|
|
for (let i=0;i<n_length;i++){ |
|
|
parentNodeMap = nodesMap; |
|
|
|
|
|
|
|
|
var parentNodeMap = nodesMap; |
|
|
var fileSplits = data[i].FileName.split("/"); |
|
|
var fileSplits = data[i].FileName.split("/"); |
|
|
for(let j=0;j < fileSplits.length;j++){ |
|
|
for(let j=0;j < fileSplits.length;j++){ |
|
|
if(fileSplits[j] == ""){ |
|
|
if(fileSplits[j] == ""){ |
|
@@ -469,7 +470,22 @@ |
|
|
if(parentNodeMap[fileSplits[j]] == null){ |
|
|
if(parentNodeMap[fileSplits[j]] == null){ |
|
|
parentNodeMap[fileSplits[j]] = {}; |
|
|
parentNodeMap[fileSplits[j]] = {}; |
|
|
} |
|
|
} |
|
|
parentNodeMap = parentNodeMap[fileSplits[j]] |
|
|
|
|
|
|
|
|
parentNodeMap = parentNodeMap[fileSplits[j]]; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
for (let i=0;i<n_length;i++){ |
|
|
|
|
|
var parentNodeMap = nodesMap; |
|
|
|
|
|
var fileSplits = data[i].FileName.split("/"); |
|
|
|
|
|
for(let j=0;j < fileSplits.length;j++){ |
|
|
|
|
|
if(fileSplits[j] == ""){ |
|
|
|
|
|
if(data[i].FileName[data[i].FileName.length -1] =="/"){ |
|
|
|
|
|
if(Object.keys(parentNodeMap).length ==0){ |
|
|
|
|
|
parentNodeMap[dirKey]="true"; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
parentNodeMap = parentNodeMap[fileSplits[j]]; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
convertToNode(zNodes,nodesMap); |
|
|
convertToNode(zNodes,nodesMap); |
|
@@ -488,12 +504,18 @@ |
|
|
node["name"] = keyList[i]; |
|
|
node["name"] = keyList[i]; |
|
|
nodeList.push(node); |
|
|
nodeList.push(node); |
|
|
if(nodesMap[keyList[i]] != null && Object.keys(nodesMap[keyList[i]]).length >0){ |
|
|
if(nodesMap[keyList[i]] != null && Object.keys(nodesMap[keyList[i]]).length >0){ |
|
|
node["children"]=[]; |
|
|
|
|
|
if(isFirst){ |
|
|
|
|
|
node["open"] = true; |
|
|
|
|
|
isFirst= false; |
|
|
|
|
|
|
|
|
if(nodesMap[keyList[i]][dirKey] != null){ |
|
|
|
|
|
node["open"] = false; |
|
|
|
|
|
node["isParent"] = true; |
|
|
|
|
|
}else{ |
|
|
|
|
|
node["children"]=[]; |
|
|
|
|
|
if(isFirst){ |
|
|
|
|
|
node["open"] = true; |
|
|
|
|
|
isFirst= false; |
|
|
|
|
|
} |
|
|
|
|
|
convertToNode(node["children"],nodesMap[keyList[i]]); |
|
|
} |
|
|
} |
|
|
convertToNode(node["children"],nodesMap[keyList[i]]); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|