Bugzilla – Attachment 166453 Details for
Bug 36757
Add assignee to catalog concern/ticket detail view when opened from catalog detail page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36757: (QA follow-up) Fix for action on different triggers
Bug-36757-QA-follow-up-Fix-for-action-on-different.patch (text/plain), 5.86 KB, created by
Martin Renvoize (ashimema)
on 2024-05-09 12:36:07 UTC
(
hide
)
Description:
Bug 36757: (QA follow-up) Fix for action on different triggers
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-05-09 12:36:07 UTC
Size:
5.86 KB
patch
obsolete
>From 15608916272369d403b6514c743c921f66230391 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >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 <martin.renvoize@ptfs-europe.com> >--- > .../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 4 ++-- > .../intranet-tmpl/prog/en/modules/cataloguing/concerns.tt | 6 +++--- > koha-tmpl/intranet-tmpl/prog/js/modals/display_ticket.js | 8 ++++++++ > 3 files changed, 13 insertions(+), 5 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 ac0904c3ae4..9d4d5e0ed06 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 = '<a role="button" href="#" data-toggle="modal" data-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '" data-resolved="' + resolved + '">' + row.title + '</a>'; >+ let result = '<a role="button" href="#" class="detail-trigger">' + row.title + '</a>'; > if (row.updates_count) { >- result += '<span class="pull-right"><a role="button" href="#" data-toggle="modal" data-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '"><i class="fa fa-comment" aria-hidden="true"></i> ' + row.updates_count + '</a></span>'; >+ result += '<span class="pull-right"><a class="detail-trigger"><i class="fa fa-comment" aria-hidden="true"></i> ' + row.updates_count + '</a></span>'; > } > result += '<div id="detail_' + row.ticket_id + '" class="hidden">' + row.body + '</div>'; > return result; >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 d0086c8f4ae..c5d09a22138 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 = '<a role="button" href="#" data-toggle="modal" data-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '" data-resolved="'+resolved+'">' + row.title + '</a>'; >+ let result = '<a role="button" href="#" class="detail-trigger">' + row.title + '</a>'; > if (row.updates_count) { >- result += '<span class="pull-right"><a role="button" href="#" data-toggle="modal" data-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '" data-resolved="'+resolved+'"><i class="fa fa-comment" aria-hidden="true"></i> ' + row.updates_count + '</a></span>'; >+ result += '<span class="pull-right"><a role="button" href="#" class="detail-trigger"><i class="fa fa-comment" aria-hidden="true"></i> ' + row.updates_count + '</a></span>'; > } > result += '<div id="detail_' + row.ticket_id + '" class="hidden">' + row.body + '</div>'; > return result; >@@ -197,7 +197,7 @@ > { > "data": function(row, type, val, meta) { > let resolved = ( row.resolved_date ) ? true : false; >- let result = '<a class="btn btn-default btn-xs" role="button" href="#" data-toggle="modal" data-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '" data-resolved="'+resolved+'" data-assignee="'+$patron_to_html(row.assignee, { display_cardnumber: false, url: false })+'"><i class="fa-solid fa-eye" aria-hidden="true"></i> ' + _("Details") + '</a>'; >+ let result = '<a class="btn btn-default btn-xs main-trigger" role="button" href="#" data-toggle="modal" data-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '" data-resolved="'+resolved+'" data-assignee="'+$patron_to_html(row.assignee, { display_cardnumber: false, url: false })+'"><i class="fa-solid fa-eye" aria-hidden="true"></i> ' + _("Details") + '</a>'; > 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 9fd1c5f0882..023b1a0b3af 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.45.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36757
:
166241
|
166259
|
166295
|
166361
|
166453
|
166455
|
166548