mirror of https://github.com/friendica/friendica
Fix review points
- Fix headers hierarchy - Improve accessibility: - set mouse pointer - make rows focusable - open on key press - add tooltip with "title" - add role and aria attributes - Rename `ParsedLog` to `ParsedLogLine` - Add docs to `ReversedFileReader`'s implementation of `Iterator`'s methods - Add docs to `ParsedLogIterator`'s implementation of `Iterator`'s methods - Remove unnecessary comment - Add more test for parsing log lines and fix some edge cases - Fix function name in snake-case to camelCase - Remove `DIRECTORY_SEPARATOR`pull/10309/head
parent
5520f100b2
commit
7f695197aa
@ -1,7 +1,33 @@
|
||||
function log_show_details(id) {
|
||||
(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);
|
||||
}
|
||||
}
|
||||
|
||||
document
|
||||
.querySelectorAll('[data-id="' + id + '"]')
|
||||
.querySelectorAll('.log-event')
|
||||
.forEach(elm => {
|
||||
elm.classList.toggle('hidden')
|
||||
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);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
})();
|
Loading…
Reference in New Issue