Koha/koha-tmpl/intranet-tmpl/prog/js
Julian Maurice 9dd6228a91 Bug 36347: Avoid return claims table being loaded twice
The issue is caused by these lines in circulation.js:

$("#finesholdsissues a[data-toggle='tab']").on("shown.bs.tab", function(e){
    $(this).click();
});

When the user clicks on a hidden tab, 'shown.bs.tab' is triggered and
then another click event is triggered. And because the table was loaded
on tab click, it was loaded twice.
Visually it could have caused the rows to be duplicated (it was random,
probably due to timing, network latency, ...)

I don't know why we need to trigger a click in this case, but removing
this will probably break something else, so the fix here is to load the
table on 'shown.bs.tab' event instead of 'click'

This patch also contains a small fix in refreshReturnClaimsTable which
was reloading the table right after the table initialization.

Test plan:
1. Check out an item, and in the checkouts table, click "Claim returned"
2. Open the network tab of your browser's developer tools
3. Click on the "Claims" tab, verify that only one call is made to
   svc/return_claims
4. Verify that the claims table is displayed correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5783d01af0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4183ec10c0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 16:15:43 +00:00
..
modals Bug 36005: Fixed typo in "Your concern was successfully submitted." text 2024-03-19 20:59:12 +00:00
pages Bug 34913: DataTables upgrade: Update CSS and option names 2024-03-19 19:19:13 +00:00
vue Bug 36392: (bug 34219 follow-up) Fix getAll for vendors - ERM 2024-05-28 16:13:54 +00:00
acq.js
acquisitions-menu.js
additem.js Bug 35441: Fix typo 'UniqueItemsFields' system preference 2023-12-14 20:49:29 +00:00
addorderiso2709.js Bug 36035: Wrong text colour in addorderiso2709.pl 2024-05-13 19:16:38 +00:00
admin-menu.js
ajax.js
audio_alerts.js
auth-finder-search.js
authorities-detail-modal.js
authtype.js Bug 34913: DataTables upgrade: Update CSS and option names 2024-03-19 19:19:13 +00:00
automatic_item_modification_by_age.js
background-job-progressbar.js
basket.js
biblio_framework.js Bug 34913: DataTables upgrade: Update CSS and option names 2024-03-19 19:19:13 +00:00
browser.js
calendar.js
cart.js Bug 34913: DataTables upgrade: Update CSS and option names 2024-03-19 19:19:13 +00:00
cashup_modal.js Bug 31041: (follow-up) Clean up and generalise 2023-11-09 22:05:16 -10:00
catalog.js Bug 35072: Fix invalid usage of "&amp;" in JavaScript intranet-tmpl script redirects 2023-10-25 20:55:51 -10:00
cataloging.js Bug 35554: Authority search popup width 800px 2024-03-19 15:26:19 +00:00
cataloging_additem.js Bug 34913: DataTables upgrade: Update CSS and option names 2024-03-19 19:19:13 +00:00
categories.js Bug 34913: DataTables upgrade: Update CSS and option names 2024-03-19 19:19:13 +00:00
charts.js
checkout_renewals_modal.js
checkouts.js Bug 36347: Avoid return claims table being loaded twice 2024-05-28 16:15:43 +00:00
datatables.js Bug 34913: DataTables upgrade: Update CSS and option names 2024-03-19 19:19:13 +00:00
desk_selection.js
elasticsearch-mappings.js Bug 34625: Fix search engine configuration tables header problem 2023-09-07 20:16:48 -10:00
file-upload.js
funds_sorts.js Bug 22712: Make 'Show inactive funds' button on addorderiso2907.pl work for item budgets 2023-11-07 22:16:21 -10:00
holds.js Bug 34913: DataTables upgrade: Update CSS and option names 2024-03-19 19:19:13 +00:00
ill-availability-partner.js
ill-availability.js
ill-list-table.js
item_search_fields.js
job_progress.js
letter.js
localcovers.js Bug 35557: Remove LoadResultsCovers 2024-01-04 21:07:33 +00:00
mana.js
marc_modification_templates.js
marc_subfields_structure.js Bug 34913: DataTables upgrade: Update CSS and option names 2024-03-19 19:19:13 +00:00
members-menu.js Bug 35344: Warn on patron image upload if missing cardnumber 2023-12-14 21:19:31 +00:00
members-patron-selections.js Bug 34479: (RMaint follow-up) Correct selectors for 23.05.x 2024-02-07 11:51:38 +00:00
members.js
merge-record.js
messaging-preference-form.js
modal_printer.js Bug 31041: (follow-up) Clean up and generalise 2023-11-09 22:05:16 -10:00
onboarding.js
patron-webcam.js Bug 35344: Warn on patron image upload if missing cardnumber 2023-12-14 21:19:31 +00:00
recalls.js Bug 34913: DataTables upgrade: Update CSS and option names 2024-03-19 19:19:13 +00:00
register_selection.js
resolve_claim_modal.js
restrictiontypes.js Bug 34913: DataTables upgrade: Update CSS and option names 2024-03-19 19:19:13 +00:00
rotating-collections.js Bug 34913: DataTables upgrade: Update CSS and option names 2024-03-19 19:19:13 +00:00
select2.js
serials-toolbar.js
showpredictionpattern.js
sms_providers.js
staff-global.js Bug 34719: Add middle_name to patron autocomplete 2023-09-17 23:14:14 -10:00
subscription-add.js Bug 34913: DataTables upgrade: Update CSS and option names 2024-03-19 19:19:13 +00:00
table_filters.js Bug 34913: Fix Activate/Deactive filters with table_filters.js 2024-03-19 19:19:14 +00:00
tools-menu.js
upload-images.js
viewlog.js
xmlControlfield.js Bug 34565: Label mismatch in MARC21 006 and 008 cataloging plugins 2023-08-29 20:45:31 -10:00
z3950_search.js