Revert "Bug 37912: Restore detail-trigger handling"

This reverts commit 71900a9508.
This commit is contained in:
Wainui Witika-Park 2024-12-19 14:02:22 +13:00
parent 4588f793f1
commit 9fc5936df2
1 changed files with 5 additions and 14 deletions

View File

@ -1,20 +1,11 @@
/* keep tidy */
$(document).ready(function () {
document.addEventListener("click", function (event) {
const detailTrigger = event.target.closest(".detail-trigger");
if (detailTrigger) {
event.preventDefault();
$("#table_concerns").on("click", ".detail-trigger", function () {
// Find the main trigger anchor within the same table row
var $mainTrigger = $(this).closest("tr").find(".main-trigger");
// Find the main trigger button in the same row
const mainTrigger = detailTrigger
.closest("tr")
.querySelector(".main-trigger");
// Trigger a click on the main trigger if it exists
if (mainTrigger) {
mainTrigger.click();
}
}
// Trigger the click event of the main trigger anchor
$mainTrigger.trigger("click");
});
$("#ticketDetailsModal").on("show.bs.modal", function (event) {