render reflects new Leaf
parent
3addc717a3
commit
ced507ca68
|
|
@ -8,4 +8,6 @@ server/testdata/workd/**/*
|
||||||
server/testdata/media/**/*
|
server/testdata/media/**/*
|
||||||
server/testdata/index.html
|
server/testdata/index.html
|
||||||
ui/render
|
ui/render
|
||||||
ui/**/.*.html
|
server/public/ui/**/.*.html
|
||||||
|
**/*.ctmpl.html
|
||||||
|
server/public/ui/render
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,9 @@
|
||||||
.tb_fullscreen {
|
.tb_fullscreen {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.button, button, input[type="button"] {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
function http(method, remote, callback, body, headers) {
|
function http(method, remote, callback, body, headers) {
|
||||||
|
|
@ -175,7 +178,7 @@
|
||||||
parentNameSafeId = id.slice(0, id.lastIndexOf("/")).replace(/\//g, "-")
|
parentNameSafeId = id.slice(0, id.lastIndexOf("/")).replace(/\//g, "-")
|
||||||
const name=`filetree-leaf-${nameSafeId}`
|
const name=`filetree-leaf-${nameSafeId}`
|
||||||
const parentname=`filetree-leaf-${parentNameSafeId}`
|
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 isLiveParent = 'id00\/id11'.slice(0, id.length) == id
|
||||||
const isLive = 'id00\/id11' == id
|
const isLive = 'id00\/id11' == id
|
||||||
return `
|
return `
|
||||||
|
|
@ -190,7 +193,7 @@
|
||||||
var html = []
|
var html = []
|
||||||
var out = ``
|
var out = ``
|
||||||
for(var i in branches) {
|
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()
|
html.sort()
|
||||||
for(var i in html)
|
for(var i in html)
|
||||||
|
|
@ -203,7 +206,7 @@
|
||||||
n += 1
|
n += 1
|
||||||
return n > 0
|
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>
|
</script>
|
||||||
|
|
||||||
<div class="thic_flex lr_fullscreen" style="margin-left: 1em; width: 5px;">
|
<div class="thic_flex lr_fullscreen" style="margin-left: 1em; width: 5px;">
|
||||||
|
|
@ -261,11 +264,11 @@
|
||||||
alert(`failed to push file ${id}: ${status}: ${body}`)
|
alert(`failed to push file ${id}: ${status}: ${body}`)
|
||||||
throw `failed to push file ${id}: ${status}: ${body}`
|
throw `failed to push file ${id}: ${status}: ${body}`
|
||||||
}
|
}
|
||||||
document.getElementById("saveFeedback").innerHTML = "success!"
|
document.getElementById("saveFeedback").style.display = "block"
|
||||||
if (saveFeedbackInterval) {
|
if (saveFeedbackInterval) {
|
||||||
clearTimeout(saveFeedbackInterval)
|
clearTimeout(saveFeedbackInterval)
|
||||||
}
|
}
|
||||||
saveFeedbackInterval = setTimeout(() => {document.getElementById("saveFeedback").innerHTML = ""}, 5000)
|
saveFeedbackInterval = setTimeout(() => {document.getElementById("saveFeedback").style.display = "none"}, 2500)
|
||||||
}, body, headers)
|
}, body, headers)
|
||||||
}
|
}
|
||||||
function deleteFile() {
|
function deleteFile() {
|
||||||
|
|
@ -305,7 +308,10 @@
|
||||||
<div id="easyMDEwrap" class="monospace">
|
<div id="easyMDEwrap" class="monospace">
|
||||||
<textarea id="my-text-area"></textarea>
|
<textarea id="my-text-area"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div id="saveFeedback" style="min-height: 1.2em; text-align: right;">
|
<div style="min-height: 2em;"></div>
|
||||||
|
<div id="saveFeedback" class="button success" style="text-align: right; cursor: auto; display: none;">
|
||||||
|
Saved!
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -319,7 +325,7 @@
|
||||||
element: document.getElementById('my-text-area'),
|
element: document.getElementById('my-text-area'),
|
||||||
forceSync: true,
|
forceSync: true,
|
||||||
indentWithTabs: false,
|
indentWithTabs: false,
|
||||||
initialValue: "loading...",
|
initialValue: "# hello\n\n## world\n\n| this | is | my | table |\n| ---- | ---| ---| ----- |\n| hey |\n| ya | hey | ya |\n\n* and\n\t* a bulleted\n\t\t* list\n\n\u003e but here is a quote\n\n```go\n\/\/ and some go code\nfunc main() {\n\tlog.Println(\u0022hi\u0022)\n}\n```\n\nand\n\nnow\n\nthe\n\nnewlines\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t",
|
||||||
showIcons: ["code", "table"],
|
showIcons: ["code", "table"],
|
||||||
spellChecker: false,
|
spellChecker: false,
|
||||||
sideBySideFullscreen: false,
|
sideBySideFullscreen: false,
|
||||||
|
|
@ -339,7 +345,6 @@
|
||||||
},
|
},
|
||||||
status: ["lines", "words", "cursor"],
|
status: ["lines", "words", "cursor"],
|
||||||
})
|
})
|
||||||
easyMDE.value("# hello\n\n## world\n\n| this | is | my | table |\n| ---- | ---| ---| ----- |\n| hey |\n| ya | hey | ya |\n\n* and\n\t* a bulleted\n\t\t* list\n\n\u003e but here is a quote\n\n```go\n// and some go code\nfunc main() {\n\tlog.Println(\"hi\")\n}\n```\n\nand\n\nnow\n\nthe\n\nnewlines\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t")
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,9 @@
|
||||||
.tb_fullscreen {
|
.tb_fullscreen {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.button, button, input[type="button"] {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
function http(method, remote, callback, body, headers) {
|
function http(method, remote, callback, body, headers) {
|
||||||
|
|
@ -175,7 +178,7 @@
|
||||||
parentNameSafeId = id.slice(0, id.lastIndexOf("/")).replace(/\//g, "-")
|
parentNameSafeId = id.slice(0, id.lastIndexOf("/")).replace(/\//g, "-")
|
||||||
const name=`filetree-leaf-${nameSafeId}`
|
const name=`filetree-leaf-${nameSafeId}`
|
||||||
const parentname=`filetree-leaf-${parentNameSafeId}`
|
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 isLiveParent = 'id00\/id11'.slice(0, id.length) == id
|
||||||
const isLive = 'id00\/id11' == id
|
const isLive = 'id00\/id11' == id
|
||||||
return `
|
return `
|
||||||
|
|
@ -190,7 +193,7 @@
|
||||||
var html = []
|
var html = []
|
||||||
var out = ``
|
var out = ``
|
||||||
for(var i in branches) {
|
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()
|
html.sort()
|
||||||
for(var i in html)
|
for(var i in html)
|
||||||
|
|
@ -203,7 +206,7 @@
|
||||||
n += 1
|
n += 1
|
||||||
return n > 0
|
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>
|
</script>
|
||||||
|
|
||||||
<div class="thic_flex lr_fullscreen" style="margin-left: 1em; width: 5px;">
|
<div class="thic_flex lr_fullscreen" style="margin-left: 1em; width: 5px;">
|
||||||
|
|
|
||||||
|
|
@ -93,25 +93,25 @@ newlines
|
||||||
{Title: "title id00 / title id10 / title id20", ID: "id00/id10/id20"},
|
{Title: "title id00 / title id10 / title id20", ID: "id00/id10/id20"},
|
||||||
},
|
},
|
||||||
"Tree": `{
|
"Tree": `{
|
||||||
"Leaf": {"Title": ""},
|
"Leaf": {"Meta":{"Title": ""}},
|
||||||
"Branches": {
|
"Branches": {
|
||||||
"id00": {
|
"id00": {
|
||||||
"Leaf": {"Title": "title id00"},
|
"Leaf": {"Meta":{"Title": "title id00"}},
|
||||||
"Branches": {
|
"Branches": {
|
||||||
"id10": {"Leaf":{"Title":"title id10"},"Branches":{
|
"id10": {"Leaf":{"Meta":{"Title":"title id10"}},"Branches":{
|
||||||
"id20": {"Leaf":{"Title":"title id20"},"Branches":{}}
|
"id20": {"Leaf":{"Meta":{"Title":"title id20"}},"Branches":{}}
|
||||||
}},
|
}},
|
||||||
"id11": {"Leaf":{"Title":"title id11"},"Branches":{}}
|
"id11": {"Leaf":{"Meta":{"Title":"title id11"}},"Branches":{}}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"id01": {"Leaf":{"Title":"title id01"},"Branches":{}},
|
"id01": {"Leaf":{"Meta":{"Title":"title id01"}},"Branches":{}},
|
||||||
"id02": {"Leaf":{"Title":"title id02"},"Branches":{}},
|
"id02": {"Leaf":{"Meta":{"Title":"title id02"}},"Branches":{}},
|
||||||
"id03": {"Leaf":{"Title":"title id03"},"Branches":{}},
|
"id03": {"Leaf":{"Meta":{"Title":"title id03"}},"Branches":{}},
|
||||||
"id04": {"Leaf":{"Title":"title id04"},"Branches":{}},
|
"id04": {"Leaf":{"Meta":{"Title":"title id04"}},"Branches":{}},
|
||||||
"id04": {"Leaf":{"Title":"title id04"},"Branches":{}},
|
"id04": {"Leaf":{"Meta":{"Title":"title id04"}},"Branches":{}},
|
||||||
"id05": {"Leaf":{"Title":"title id05"},"Branches":{}},
|
"id05": {"Leaf":{"Meta":{"Title":"title id05"}},"Branches":{}},
|
||||||
"id06": {"Leaf":{"Title":"title id06"},"Branches":{}},
|
"id06": {"Leaf":{"Meta":{"Title":"title id06"}},"Branches":{}},
|
||||||
"id07": {"Leaf":{"Title":"title id07 but it's really really really long"},"Branches":{}}
|
"id07": {"Leaf":{"Meta":{"Title":"title id07 but it's really really really long"}},"Branches":{}}
|
||||||
}
|
}
|
||||||
}`,
|
}`,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,9 @@
|
||||||
.tb_fullscreen {
|
.tb_fullscreen {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.button, button, input[type="button"] {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
function http(method, remote, callback, body, headers) {
|
function http(method, remote, callback, body, headers) {
|
||||||
|
|
@ -163,11 +166,11 @@
|
||||||
alert(`failed to push file ${id}: ${status}: ${body}`)
|
alert(`failed to push file ${id}: ${status}: ${body}`)
|
||||||
throw `failed to push file ${id}: ${status}: ${body}`
|
throw `failed to push file ${id}: ${status}: ${body}`
|
||||||
}
|
}
|
||||||
document.getElementById("saveFeedback").innerHTML = "success!"
|
document.getElementById("saveFeedback").style.display = "block"
|
||||||
if (saveFeedbackInterval) {
|
if (saveFeedbackInterval) {
|
||||||
clearTimeout(saveFeedbackInterval)
|
clearTimeout(saveFeedbackInterval)
|
||||||
}
|
}
|
||||||
saveFeedbackInterval = setTimeout(() => {document.getElementById("saveFeedback").innerHTML = ""}, 5000)
|
saveFeedbackInterval = setTimeout(() => {document.getElementById("saveFeedback").style.display = "none"}, 2500)
|
||||||
}, body, headers)
|
}, body, headers)
|
||||||
}
|
}
|
||||||
function deleteFile() {
|
function deleteFile() {
|
||||||
|
|
@ -207,7 +210,10 @@
|
||||||
<div id="easyMDEwrap" class="monospace">
|
<div id="easyMDEwrap" class="monospace">
|
||||||
<textarea id="my-text-area"></textarea>
|
<textarea id="my-text-area"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div id="saveFeedback" style="min-height: 1.2em; text-align: right;">
|
<div style="min-height: 2em;"></div>
|
||||||
|
<div id="saveFeedback" class="button success" style="text-align: right; cursor: auto; display: none;">
|
||||||
|
Saved!
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -221,7 +227,7 @@
|
||||||
element: document.getElementById('my-text-area'),
|
element: document.getElementById('my-text-area'),
|
||||||
forceSync: true,
|
forceSync: true,
|
||||||
indentWithTabs: false,
|
indentWithTabs: false,
|
||||||
initialValue: "loading...",
|
initialValue: "# hello\n\n## world\n\n| this | is | my | table |\n| ---- | ---| ---| ----- |\n| hey |\n| ya | hey | ya |\n\n* and\n\t* a bulleted\n\t\t* list\n\n\u003e but here is a quote\n\n```go\n\/\/ and some go code\nfunc main() {\n\tlog.Println(\u0022hi\u0022)\n}\n```\n\nand\n\nnow\n\nthe\n\nnewlines\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t",
|
||||||
showIcons: ["code", "table"],
|
showIcons: ["code", "table"],
|
||||||
spellChecker: false,
|
spellChecker: false,
|
||||||
sideBySideFullscreen: false,
|
sideBySideFullscreen: false,
|
||||||
|
|
@ -241,5 +247,4 @@
|
||||||
},
|
},
|
||||||
status: ["lines", "words", "cursor"],
|
status: ["lines", "words", "cursor"],
|
||||||
})
|
})
|
||||||
easyMDE.value("# hello\n\n## world\n\n| this | is | my | table |\n| ---- | ---| ---| ----- |\n| hey |\n| ya | hey | ya |\n\n* and\n\t* a bulleted\n\t\t* list\n\n\u003e but here is a quote\n\n```go\n// and some go code\nfunc main() {\n\tlog.Println(\"hi\")\n}\n```\n\nand\n\nnow\n\nthe\n\nnewlines\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t")
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,9 @@
|
||||||
.tb_fullscreen {
|
.tb_fullscreen {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.button, button, input[type="button"] {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
function http(method, remote, callback, body, headers) {
|
function http(method, remote, callback, body, headers) {
|
||||||
|
|
@ -161,7 +164,7 @@
|
||||||
parentNameSafeId = id.slice(0, id.lastIndexOf("/")).replace(/\//g, "-")
|
parentNameSafeId = id.slice(0, id.lastIndexOf("/")).replace(/\//g, "-")
|
||||||
const name=`filetree-leaf-${nameSafeId}`
|
const name=`filetree-leaf-${nameSafeId}`
|
||||||
const parentname=`filetree-leaf-${parentNameSafeId}`
|
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 isLiveParent = 'id00\/id11'.slice(0, id.length) == id
|
||||||
const isLive = 'id00\/id11' == id
|
const isLive = 'id00\/id11' == id
|
||||||
return `
|
return `
|
||||||
|
|
@ -176,7 +179,7 @@
|
||||||
var html = []
|
var html = []
|
||||||
var out = ``
|
var out = ``
|
||||||
for(var i in branches) {
|
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()
|
html.sort()
|
||||||
for(var i in html)
|
for(var i in html)
|
||||||
|
|
@ -189,5 +192,5 @@
|
||||||
n += 1
|
n += 1
|
||||||
return n > 0
|
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>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,9 @@
|
||||||
.tb_fullscreen {
|
.tb_fullscreen {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.button, button, input[type="button"] {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
function http(method, remote, callback, body, headers) {
|
function http(method, remote, callback, body, headers) {
|
||||||
|
|
@ -182,6 +185,9 @@
|
||||||
.tb_fullscreen {
|
.tb_fullscreen {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.button, button, input[type="button"] {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
function http(method, remote, callback, body, headers) {
|
function http(method, remote, callback, body, headers) {
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,9 @@
|
||||||
.tb_fullscreen {
|
.tb_fullscreen {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.button, button, input[type="button"] {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
function http(method, remote, callback, body, headers) {
|
function http(method, remote, callback, body, headers) {
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,9 @@
|
||||||
.tb_fullscreen {
|
.tb_fullscreen {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.button, button, input[type="button"] {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
function http(method, remote, callback, body, headers) {
|
function http(method, remote, callback, body, headers) {
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
parentNameSafeId = id.slice(0, id.lastIndexOf("/")).replace(/\//g, "-")
|
parentNameSafeId = id.slice(0, id.lastIndexOf("/")).replace(/\//g, "-")
|
||||||
const name=`filetree-leaf-${nameSafeId}`
|
const name=`filetree-leaf-${nameSafeId}`
|
||||||
const parentname=`filetree-leaf-${parentNameSafeId}`
|
const parentname=`filetree-leaf-${parentNameSafeId}`
|
||||||
const title=id ? branch.Leaf.Title : "ROOT"
|
const title=id ? branch.Leaf.Meta.Title : "ROOT"
|
||||||
const isLiveParent = '{{ .This.ID }}'.slice(0, id.length) == id
|
const isLiveParent = '{{ .This.ID }}'.slice(0, id.length) == id
|
||||||
const isLive = '{{ .This.ID }}' == id
|
const isLive = '{{ .This.ID }}' == id
|
||||||
return `
|
return `
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
var html = []
|
var html = []
|
||||||
var out = ``
|
var out = ``
|
||||||
for(var i in branches) {
|
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()
|
html.sort()
|
||||||
for(var i in html)
|
for(var i in html)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue