2021-08-20 03:47:53 -04:00
|
|
|
(function(){
|
|
|
|
function log_show_details(elm) {
|
|
|
|
const id = elm.id;
|
|
|
|
var hidden = true;
|
|
|
|
document
|
|
|
|
.querySelectorAll('[data-id="' + id + '"]')
|
|
|
|
.forEach(edetails => {
|
|
|
|
hidden = edetails.classList.toggle('hidden');
|
|
|
|
});
|
|
|
|
document
|
|
|
|
.querySelectorAll('[aria-expanded="true"]')
|
|
|
|
.forEach(eexpanded => {
|
|
|
|
eexpanded.setAttribute('aria-expanded', false);
|
|
|
|
});
|
|
|
|
|
|
|
|
if (!hidden) {
|
|
|
|
elm.setAttribute('aria-expanded', true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-27 13:28:09 -04:00
|
|
|
document
|
2021-08-20 03:47:53 -04:00
|
|
|
.querySelectorAll('.log-event')
|
2021-03-27 13:28:09 -04:00
|
|
|
.forEach(elm => {
|
2021-08-20 03:47:53 -04:00
|
|
|
elm.addEventListener("click", evt => {
|
|
|
|
log_show_details(evt.currentTarget);
|
|
|
|
});
|
|
|
|
elm.addEventListener("keydown", evt => {
|
|
|
|
if (evt.keyCode == 13 || evt.keyCode == 32) {
|
|
|
|
log_show_details(evt.currentTarget);
|
|
|
|
}
|
|
|
|
});
|
2021-03-27 13:28:09 -04:00
|
|
|
});
|
2021-08-20 03:47:53 -04:00
|
|
|
})();
|