can click around file buttons

master
Bel LaPointe 2022-02-09 15:16:44 -07:00
parent 8b566d32f8
commit 1d4c826ade
1 changed files with 6 additions and 4 deletions

View File

@ -27,7 +27,7 @@
#tree summary > div > a {
flex-grow: 1;
}
#tree summary > div > a > input {
#tree summary > div > input:first-child {
width: 100%;
text-align: left;
}
@ -91,8 +91,9 @@
pids = pids.slice(0, pids.length-1)
var titlePath = "/"
for (var pid in pids)
titlePath += ` <a href="#?f=${pids[pid]}"><input type="button" value="${pids[pid]}" onclick="drawFile('${pids[pid]}');"/></a> /`
for (var pid in pids) {
titlePath += ` <input type="button" value="${pids[pid]}" onclick="drawFile('${pids.slice(0, pid+1).join("/")}');"/> /`
}
document.getElementById("titlePath").innerHTML = titlePath
document.getElementById("title").innerHTML = title
@ -100,6 +101,7 @@
easyMDE.meta = {
id: id,
}
window.location.hash = "#?f="+id
}
function drawTree() {
function htmlifyBranch(id, branch) {
@ -110,7 +112,7 @@
<details open>
<summary>
<div>
<a href="#?f=${id}"><input type="button" value="${branch.Leaf.Title.substr(0, 15)}" onclick="drawFile('${id}');"/></a>
<input type="button" value="${branch.Leaf.Title.substr(0, 15)}" onclick="drawFile('${id}');"/>
<input type="button" value="+" onclick="drawNewFile('${id}');"/>
</div>
</summary>