Koha/koha-tmpl/intranet-tmpl/prog/en/modules
Lari Taskula 1b1dbee18f Bug 28170: Fix upload.tt search result buttons for page two onwards
From https://datatables.net/faqs/index

"When attaching events to cells in a table controlled by DataTables, you need
to be careful how it is done. Because DataTables removes nodes from the DOM,
events applied with a static event listener might not be able to bind
themselves to all nodes in the table."

Before this patch, there were three non-functional buttons on upload search
result page, "+ Choose", "Download" and "Delete".

This patch binds the handlers to a static element so that the three buttons
in upload.tt on page two onwards are functional again.

To test:
1. This test is for the "Download" and "Delete" buttons
1.1. Before applying patch, go to cgi-bin/koha/tools/upload.pl
1.2. Make sure you have at least 21 files uploaded
1.3. Perform a search via "Search term" form so that at least 21 results are
     returned (e.g. a dot (.) as the search term should return all files with
     filetype)
1.4. Press "Download" and "Delete" for the first result row, it should work
     as expected (no need to actually delete the file - as long as it pops up
     a confirmation, it works as expected)
1.5. Go to page 2 of results
1.6. Press "Download" and "Delete" for the first result in page 2
1.7. Observe nothing happening
1.8. Apply patch
1.9. Repeat steps 3-6
1.10. Observe buttons working as expected

2. This test is for the "+ Choose" button
2.1. Go to cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=856&frameworkcode=#subufield
2.2. Under "Other options (choose one), for "Plugin", select "upload.pl"
2.3. Find a biblio and click Edit Record
2.4. Go to 856$u and click "Upload"
2.5. Repeat steps 1.1. - 1.10., but this time for the "+ Choose" button

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-30 17:07:32 +02:00
..
acqui Bug 27240: Basket export cleanup. 2021-04-22 14:50:11 +02:00
admin Bug 28207: Fix biblio_framework.frameworktext isn't in GROUP BY 2021-04-30 17:07:32 +02:00
authorities Bug 26703: authorities, basket and batch folders 2021-04-21 11:16:33 +02:00
basket Bug 26703: authorities, basket and batch folders 2021-04-21 11:16:33 +02:00
batch Bug 26703: authorities, basket and batch folders 2021-04-21 11:16:33 +02:00
catalogue Bug 28178: Display the correct image in the image viewer 2021-04-27 16:23:49 +02:00
cataloguing Bug 26703: cataloguing folder 2021-04-21 11:16:33 +02:00
circ Bug 28148: Remove 'print' class from 'Print transfer slip' when transfer exists 2021-04-28 11:16:14 +02:00
clubs Bug 26703: clubs, common & course_reserves folders 2021-04-21 11:16:34 +02:00
common Bug 26703: clubs, common & course_reserves folders 2021-04-21 11:16:34 +02:00
course_reserves Bug 26703: clubs, common & course_reserves folders 2021-04-21 11:16:34 +02:00
errors Bug 26703: errors, ill and installer folders 2021-04-21 11:16:34 +02:00
ill Bug 26703: errors, ill and installer folders 2021-04-21 11:16:34 +02:00
installer Bug 26703: errors, ill and installer folders 2021-04-21 11:16:34 +02:00
labels Bug 28119: Use full description in layout type selection 2021-04-21 15:25:07 +02:00
mana
members Bug 27636: (QA follow-up) Fix tests and validate 2021-04-30 17:07:31 +02:00
offline_circ Bug 26703: offline_circ and onboarding folders 2021-04-21 11:16:34 +02:00
onboarding Bug 26703: offline_circ and onboarding folders 2021-04-21 11:16:34 +02:00
patron_lists Bug 26703: patroncards and patron_lists folders 2021-04-21 11:16:35 +02:00
patroncards Bug 26703: patroncards and patron_lists folders 2021-04-21 11:16:35 +02:00
plugins Bug 26703: plugins and pos folders 2021-04-21 11:16:35 +02:00
pos Bug 28127: add transaction timestamp to register details tables 2021-04-21 15:25:07 +02:00
reports Bug 27644: (QA follow-up) Remove size=1 from template 2021-04-21 15:25:07 +02:00
reserve Bug 28169: Add quotes around value in template to render proper JS 2021-04-28 11:16:14 +02:00
reviews Bug 26703: reserve, reviews & rotating_collections folders 2021-04-21 11:16:35 +02:00
rotating_collections Bug 26703: reserve, reviews & rotating_collections folders 2021-04-21 11:16:35 +02:00
serials Bug 23243: (follow-up) Update wording as requested 2021-04-21 15:25:07 +02:00
services Bug 28066: Remove select tag's size attribute where it is 1 2021-04-06 15:56:31 +02:00
suggestion Bug 26703: suggestion and tags folders 2021-04-21 11:16:35 +02:00
tags Bug 26703: suggestion and tags folders 2021-04-21 11:16:35 +02:00
test
tools Bug 28170: Fix upload.tt search result buttons for page two onwards 2021-04-30 17:07:32 +02:00
virtualshelves Bug 26703: virtualshelves folder 2021-04-21 11:16:35 +02:00
about.tt Bug 26703: modules and modules/acqui folders 2021-04-21 11:16:33 +02:00
auth.tt Bug 26703: (follow-up) fixed some page titles in files 2021-04-22 09:09:28 +02:00
intranet-main.tt Bug 27846: (follow-up) Add id back to breadcrumbs container 2021-04-01 18:51:38 +02:00