From b1944c78954ef00873ba0a8bc9c1da1bf4ec9577 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 9 May 2024 13:34:06 +0100 Subject: [PATCH] Bug 36757: (QA follow-up) Fix for action on different triggers This patch updates the 'title' and 'comment count' links to action the same ticket detail/update modal as the 'details' button. Signed-off-by: Martin Renvoize Signed-off-by: Paul Derscheid Signed-off-by: Katrin Fischer --- .../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 6 +++--- .../intranet-tmpl/prog/en/modules/cataloguing/concerns.tt | 6 +++--- koha-tmpl/intranet-tmpl/prog/js/modals/display_ticket.js | 8 ++++++++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index ac0904c3ae..f2660bedcd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -1086,9 +1086,9 @@ "data": "title:body", "render": function(data, type, row, meta) { let resolved = ( row.resolved_date ) ? true : false; - let result = '' + row.title + ''; + let result = '' + row.title + ''; if (row.updates_count) { - result += ' ' + row.updates_count + ''; + result += ' ' + row.updates_count + ''; } result += ''; return result; @@ -1141,7 +1141,7 @@ { "data": function(row, type, val, meta) { let resolved = ( row.resolved_date ) ? true : false; - let result = ' ' + _("Details") + ''; + let result = ' ' + _("Details") + ''; return result; }, "searchable": false, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt index d0086c8f4a..c5d09a2213 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt @@ -142,9 +142,9 @@ "data": "title:body", "render": function(data, type, row, meta) { let resolved = ( row.resolved_date ) ? true : false; - let result = '' + row.title + ''; + let result = '' + row.title + ''; if (row.updates_count) { - result += ' ' + row.updates_count + ''; + result += ' ' + row.updates_count + ''; } result += ''; return result; @@ -197,7 +197,7 @@ { "data": function(row, type, val, meta) { let resolved = ( row.resolved_date ) ? true : false; - let result = ' ' + _("Details") + ''; + let result = ' ' + _("Details") + ''; return result; }, "searchable": false, diff --git a/koha-tmpl/intranet-tmpl/prog/js/modals/display_ticket.js b/koha-tmpl/intranet-tmpl/prog/js/modals/display_ticket.js index 9fd1c5f088..023b1a0b3a 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/modals/display_ticket.js +++ b/koha-tmpl/intranet-tmpl/prog/js/modals/display_ticket.js @@ -1,5 +1,13 @@ /* keep tidy */ $(document).ready(function () { + $("#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"); + + // Trigger the click event of the main trigger anchor + $mainTrigger.trigger("click"); + }); + $("#ticketDetailsModal").on("show.bs.modal", function (event) { let modal = $(this); let button = $(event.relatedTarget); -- 2.39.5