X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Ffrio%2Fjs%2Fmodule%2Fadmin%2Flogs%2Fview.js;h=245518822f10153372aaca951b597b482dc48288;hb=7f695197aae9d87f5c04c2f7801d97852d72a3bc;hp=149d019e90c23737802cb5129eabbab08bf4c843;hpb=5e5d9db1b3415b1b578468e9d39f0b97dfa93d77;p=friendica.git diff --git a/view/theme/frio/js/module/admin/logs/view.js b/view/theme/frio/js/module/admin/logs/view.js index 149d019e90..245518822f 100644 --- a/view/theme/frio/js/module/admin/logs/view.js +++ b/view/theme/frio/js/module/admin/logs/view.js @@ -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) {