mirror of
https://github.com/salexdv/bsl_console.git
synced 2024-11-24 08:33:29 +02:00
Доработка навигации по дереву переменных
This commit is contained in:
parent
08f9a80381
commit
a0e1b6d78a
@ -93,6 +93,10 @@
|
||||
background-image: url('./icons/empty.png');
|
||||
}
|
||||
|
||||
#variables-tree details[open] > summary.final:before {
|
||||
background-image: url('./icons/empty.png');
|
||||
}
|
||||
|
||||
#variables-tree summary:before {
|
||||
content: '.';
|
||||
padding-left: 7px;
|
||||
|
@ -38,6 +38,14 @@ class Treeview {
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
else if (eventData.target.classList.contains('final')) {
|
||||
eventData.preventDefault();
|
||||
}
|
||||
}
|
||||
else if (eventData.target.nodeName == 'SUMMARY' && eventData.target.parentNode.hasAttribute("open")) {
|
||||
}
|
||||
else {
|
||||
eventData.preventDefault();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -57,7 +65,7 @@ class Treeview {
|
||||
if (targetId != null) {
|
||||
let target = document.getElementById(targetId);
|
||||
target.parentNode.outerHTML = this.parseData(data)
|
||||
target.dataset.requested = true;
|
||||
document.getElementById(targetId).dataset.requested = true;
|
||||
}
|
||||
else {
|
||||
let target = document.querySelector(this.treeviewId);
|
||||
@ -90,7 +98,7 @@ class Treeview {
|
||||
let node = document.getElementById(id).parentNode;
|
||||
node.removeAttribute("open");
|
||||
let detailNodes = node.querySelectorAll("DETAILS");
|
||||
console.log(detailNodes); detailNodes.forEach((node) => node.removeAttribute("open"));
|
||||
detailNodes.forEach((node) => node.removeAttribute("open"));
|
||||
};
|
||||
select(id) {
|
||||
this.open(id);
|
||||
|
Loading…
Reference in New Issue
Block a user