render reflects new Leaf
This commit is contained in:
@@ -73,6 +73,9 @@
|
||||
.tb_fullscreen {
|
||||
height: 100%;
|
||||
}
|
||||
.button, button, input[type="button"] {
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function http(method, remote, callback, body, headers) {
|
||||
@@ -163,11 +166,11 @@
|
||||
alert(`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) {
|
||||
clearTimeout(saveFeedbackInterval)
|
||||
}
|
||||
saveFeedbackInterval = setTimeout(() => {document.getElementById("saveFeedback").innerHTML = ""}, 5000)
|
||||
saveFeedbackInterval = setTimeout(() => {document.getElementById("saveFeedback").style.display = "none"}, 2500)
|
||||
}, body, headers)
|
||||
}
|
||||
function deleteFile() {
|
||||
@@ -207,7 +210,10 @@
|
||||
<div id="easyMDEwrap" class="monospace">
|
||||
<textarea id="my-text-area"></textarea>
|
||||
</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>
|
||||
</article>
|
||||
</div>
|
||||
@@ -221,7 +227,7 @@
|
||||
element: document.getElementById('my-text-area'),
|
||||
forceSync: true,
|
||||
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"],
|
||||
spellChecker: false,
|
||||
sideBySideFullscreen: false,
|
||||
@@ -241,5 +247,4 @@
|
||||
},
|
||||
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>
|
||||
|
||||
@@ -73,6 +73,9 @@
|
||||
.tb_fullscreen {
|
||||
height: 100%;
|
||||
}
|
||||
.button, button, input[type="button"] {
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function http(method, remote, callback, body, headers) {
|
||||
@@ -161,7 +164,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 `
|
||||
@@ -176,7 +179,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)
|
||||
@@ -189,5 +192,5 @@
|
||||
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>
|
||||
|
||||
@@ -73,6 +73,9 @@
|
||||
.tb_fullscreen {
|
||||
height: 100%;
|
||||
}
|
||||
.button, button, input[type="button"] {
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function http(method, remote, callback, body, headers) {
|
||||
@@ -182,6 +185,9 @@
|
||||
.tb_fullscreen {
|
||||
height: 100%;
|
||||
}
|
||||
.button, button, input[type="button"] {
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function http(method, remote, callback, body, headers) {
|
||||
|
||||
@@ -73,6 +73,9 @@
|
||||
.tb_fullscreen {
|
||||
height: 100%;
|
||||
}
|
||||
.button, button, input[type="button"] {
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function http(method, remote, callback, body, headers) {
|
||||
|
||||
@@ -73,6 +73,9 @@
|
||||
.tb_fullscreen {
|
||||
height: 100%;
|
||||
}
|
||||
.button, button, input[type="button"] {
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function http(method, remote, callback, body, headers) {
|
||||
|
||||
@@ -50,7 +50,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 = '{{ .This.ID }}'.slice(0, id.length) == id
|
||||
const isLive = '{{ .This.ID }}' == id
|
||||
return `
|
||||
@@ -65,7 +65,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)
|
||||
|
||||
Reference in New Issue
Block a user