render reflects new Leaf

This commit is contained in:
Bel LaPointe
2022-02-17 10:56:21 -07:00
parent 3addc717a3
commit ced507ca68
10 changed files with 65 additions and 35 deletions

View File

@@ -76,6 +76,9 @@
.tb_fullscreen {
height: 100%;
}
.button, button, input[type="button"] {
height: auto;
}
</style>
<script>
function http(method, remote, callback, body, headers) {
@@ -175,7 +178,7 @@
parentNameSafeId = id.slice(0, id.lastIndexOf("/")).replace(/\//g, "-")
const name=`filetree-leaf-${nameSafeId}`
const parentname=`filetree-leaf-${parentNameSafeId}`
const title=id ? branch.Leaf.Title : "ROOT"
const title=id ? branch.Leaf.Meta.Title : "ROOT"
const isLiveParent = 'id00\/id11'.slice(0, id.length) == id
const isLive = 'id00\/id11' == id
return `
@@ -190,7 +193,7 @@
var html = []
var out = ``
for(var i in branches) {
html.push([branches[i].Leaf.Title, `<details open>` + branchHTML(i, branches[i]) + `</details>`])
html.push([branches[i].Leaf.Meta.Title, `<details open>` + branchHTML(i, branches[i]) + `</details>`])
}
html.sort()
for(var i in html)
@@ -203,7 +206,7 @@
n += 1
return n > 0
}
drawTree(JSON.parse("{\n\t\t\t\"Leaf\": {\"Title\": \"\"},\n\t\t\t\"Branches\": {\n\t\t\t\t\"id00\": {\n\t\t\t\t\t\"Leaf\": {\"Title\": \"title id00\"},\n\t\t\t\t\t\"Branches\": {\n\t\t\t\t\t\t\"id10\": {\"Leaf\":{\"Title\":\"title id10\"},\"Branches\":{\n\t\t\t\t\t\t\t\"id20\": {\"Leaf\":{\"Title\":\"title id20\"},\"Branches\":{}}\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"id11\": {\"Leaf\":{\"Title\":\"title id11\"},\"Branches\":{}}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"id01\": {\"Leaf\":{\"Title\":\"title id01\"},\"Branches\":{}},\n\t\t\t\t\"id02\": {\"Leaf\":{\"Title\":\"title id02\"},\"Branches\":{}},\n\t\t\t\t\"id03\": {\"Leaf\":{\"Title\":\"title id03\"},\"Branches\":{}},\n\t\t\t\t\"id04\": {\"Leaf\":{\"Title\":\"title id04\"},\"Branches\":{}},\n\t\t\t\t\"id04\": {\"Leaf\":{\"Title\":\"title id04\"},\"Branches\":{}},\n\t\t\t\t\"id05\": {\"Leaf\":{\"Title\":\"title id05\"},\"Branches\":{}},\n\t\t\t\t\"id06\": {\"Leaf\":{\"Title\":\"title id06\"},\"Branches\":{}},\n\t\t\t\t\"id07\": {\"Leaf\":{\"Title\":\"title id07 but it's really really really long\"},\"Branches\":{}}\n\t\t\t}\n\t\t}"))
drawTree(JSON.parse("{\n\t\t\t\"Leaf\": {\"Meta\":{\"Title\": \"\"}},\n\t\t\t\"Branches\": {\n\t\t\t\t\"id00\": {\n\t\t\t\t\t\"Leaf\": {\"Meta\":{\"Title\": \"title id00\"}},\n\t\t\t\t\t\"Branches\": {\n\t\t\t\t\t\t\"id10\": {\"Leaf\":{\"Meta\":{\"Title\":\"title id10\"}},\"Branches\":{\n\t\t\t\t\t\t\t\"id20\": {\"Leaf\":{\"Meta\":{\"Title\":\"title id20\"}},\"Branches\":{}}\n\t\t\t\t\t\t}},\n\t\t\t\t\t\t\"id11\": {\"Leaf\":{\"Meta\":{\"Title\":\"title id11\"}},\"Branches\":{}}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"id01\": {\"Leaf\":{\"Meta\":{\"Title\":\"title id01\"}},\"Branches\":{}},\n\t\t\t\t\"id02\": {\"Leaf\":{\"Meta\":{\"Title\":\"title id02\"}},\"Branches\":{}},\n\t\t\t\t\"id03\": {\"Leaf\":{\"Meta\":{\"Title\":\"title id03\"}},\"Branches\":{}},\n\t\t\t\t\"id04\": {\"Leaf\":{\"Meta\":{\"Title\":\"title id04\"}},\"Branches\":{}},\n\t\t\t\t\"id04\": {\"Leaf\":{\"Meta\":{\"Title\":\"title id04\"}},\"Branches\":{}},\n\t\t\t\t\"id05\": {\"Leaf\":{\"Meta\":{\"Title\":\"title id05\"}},\"Branches\":{}},\n\t\t\t\t\"id06\": {\"Leaf\":{\"Meta\":{\"Title\":\"title id06\"}},\"Branches\":{}},\n\t\t\t\t\"id07\": {\"Leaf\":{\"Meta\":{\"Title\":\"title id07 but it's really really really long\"}},\"Branches\":{}}\n\t\t\t}\n\t\t}"))
</script>
<div class="thic_flex lr_fullscreen" style="margin-left: 1em; width: 5px;">