Somewhat working
This commit is contained in:
parent
ad638acaf3
commit
4637689db4
6 changed files with 52 additions and 12 deletions
|
|
@ -17,18 +17,35 @@ body {
|
|||
}
|
||||
|
||||
.records-tree {
|
||||
display: grid;
|
||||
|
||||
.fqdn, .record {
|
||||
border-bottom: 1px solid #aaa;
|
||||
padding: 4px 0px;
|
||||
}
|
||||
|
||||
.top {
|
||||
font-weight: bold;
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
&>.top {
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.record {
|
||||
display: none;
|
||||
font-weight: normal;
|
||||
color: #444;
|
||||
|
||||
&.show {
|
||||
display: block;
|
||||
}
|
||||
|
||||
span:first-child {
|
||||
color: #800033;
|
||||
}
|
||||
|
||||
span:last-child {
|
||||
color: #888;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,11 @@ export class Application {
|
|||
|
||||
handlerTop(event) {
|
||||
const fqdn = event.target
|
||||
const top = fqdn.closest('.top')
|
||||
const records = top.querySelector('.records')
|
||||
console.log(fqdn, top, records)
|
||||
const topEl = fqdn.closest('.top')
|
||||
const records = document.querySelectorAll(`.record[data-top="${topEl.dataset.top}"]`)
|
||||
console.log(`.record[data-top="${topEl.dataset.top}"]`)
|
||||
console.log(topEl.dataset.top, records)
|
||||
for (const r of records)
|
||||
r.classList.toggle('show')
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue