Bugzilla – Attachment 172801 Details for
Bug 38183
Can't set suggestion manager when there are multiple tabs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38183: Get the active tab number from data-attribute
Bug-38183-Get-the-active-tab-number-from-data-attr.patch (text/plain), 3.12 KB, created by
Lucas Gass (lukeg)
on 2024-10-15 23:51:34 UTC
(
hide
)
Description:
Bug 38183: Get the active tab number from data-attribute
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-10-15 23:51:34 UTC
Size:
3.12 KB
patch
obsolete
>From a7a597aad4413dfc6e0fb4c0bf50461cac603a52 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 15 Oct 2024 23:50:00 +0000 >Subject: [PATCH] Bug 38183: Get the active tab number from data-attribute > >To test: > >1. Have more than 1 staff member who can manage suggestions >2. Create some suggestions >3. Move some suggestions to different statuses (Pending/Accepted/Rejected) so you have multiple tabs on the "Suggestions management" page. >4. Go to the first tab, check some suggestions, and click "Select manager" under "Update manager". >5. Pick a new manager, notice nothing changes on that tab. >6. Now look at the last tab in your list of tabs, see the suggestion manager has been set incorrectly to the last tab. >7. APPLY PATCH >8. Try 4-5 again. The manager should be selected correctly. >9. Try setting the manaager from every tab, making sure it works right. >--- > .../intranet-tmpl/prog/en/modules/suggestion/suggestion.tt | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index c8b2841a0d9..c756af32c46 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -736,7 +736,7 @@ > <a class="checkall" href="#">Check all</a> | <a class="uncheckall" href="#">Uncheck all</a> > </p> > >- <table id="table_[% loop.count | html %]" class="sorted"> >+ <table id="table_[% loop.count | html %]" class="sorted" data-table-number=[% loop.count | html %]> > <thead> > <tr> > <th class="NoSort noExport"> </th> >@@ -1299,8 +1299,8 @@ > [% INCLUDE 'calendar.inc' %] > > <script> >- var tab = ''; > function select_manager(borrowernumber, borrower) { >+ let tab = $('#suggestiontabs .active table').data('table-number'); > var managedby_name = $("#managedby_name"+tab); > var managedby = $("#managedby"+tab); > managedby_name.empty(); >@@ -1541,7 +1541,6 @@ > [% PROCESS patron_search_js columns => columns, actions => ["select"], preview_on_name_click => 1, table_id => 'patron_search_modal_manager_table', callback => 'select_manager' %] > [% ELSIF op == 'else' %] > [% FOREACH suggestion IN suggestions %] >- <script>tab = [% loop.count | html %];</script> > [% SET filter = "suggestions_managers" %] > [% PROCESS patron_search_modal columns => columns, modal_title => t("Select manager"), patron_search_modal_id => 'patron_search_modal_manager_' _ loop.count, table_id => 'patron_search_modal_manager_table_' _ loop.count %] > [% PROCESS patron_search_js columns => columns, actions => ["select"], preview_on_name_click => 1, table_id => 'patron_search_modal_manager_table_' _ loop.count, callback => 'select_manager' %] >-- >2.39.2
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 38183
:
172801
|
172833
|
172859