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`
This commit is contained in:
parent
5520f100b2
commit
7f695197aa
10 changed files with 280 additions and 54 deletions
|
@ -21,6 +21,12 @@ $(function(){
|
|||
$(".log-event").on("click", function(ev) {
|
||||
show_details_for_element(ev.currentTarget);
|
||||
});
|
||||
$(".log-event").on("keydown", function(ev) {
|
||||
if (ev.keyCode == 13 || ev.keyCode == 32) {
|
||||
show_details_for_element(ev.currentTarget);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("[data-previous").on("click", function(ev){
|
||||
var currentid = document.getElementById("logdetail").dataset.rowId;
|
||||
|
@ -37,9 +43,15 @@ $(function(){
|
|||
});
|
||||
|
||||
|
||||
function show_details_for_element(element) {
|
||||
var $modal = $("#logdetail");
|
||||
const $modal = $("#logdetail");
|
||||
|
||||
$modal.on("hidden.bs.modal", function(ev){
|
||||
document
|
||||
.querySelectorAll('[aria-expanded="true"]')
|
||||
.forEach(elm => elm.setAttribute("aria-expanded", false))
|
||||
});
|
||||
|
||||
function show_details_for_element(element) {
|
||||
$modal[0].dataset.rowId = element.id;
|
||||
|
||||
var tr = $modal.find(".main-data tbody tr")[0];
|
||||
|
@ -64,6 +76,7 @@ $(function(){
|
|||
$("[data-next").prop("disabled", $(element).next().length == 0);
|
||||
|
||||
$modal.modal({})
|
||||
element.setAttribute("aria-expanded", true);
|
||||
}
|
||||
|
||||
function recursive_details(s, data, lev=0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue