Bug 33590: Fix DOM id name for tabs after WRAPPER code added to article-requests.tt

This commit fixed two cases:
1. Fixing "Select all" and "Clear all" links on the page.
2. Fixing the interaction with selected entries when switching between the "New" and "Pending" tabs.

To test:
(Create article requests if they don't exist)

Case 1:
1. Go to /cgi-bin/koha/circ/article-requests.pl and don't switch between tabs.
2. Click on "Select all" and verify that it's not working -- the checkboxes are not selected.
3. Activate any checkbox and click "Clear all" -- the checkbox is not cleared.
4. Apply the patch.
5. Restart the page and, without switching between tabs, repeat steps 2 and 3. Verify that it works now.

Case 2:
1. Go to /cgi-bin/koha/circ/article-requests.pl.
2. Switch between tabs and leave "New" active.
3. Select any entry and delete or move it to another tab.
4. Verify that the entry remains in the table until the page reloads.
5. Apply the patch.
6. Restart the page and repeat steps 2 and 3. Make sure that everything works now.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6ebe303e14)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Slava Shishkin 2023-04-26 19:59:14 +03:00 committed by Martin Renvoize
parent e65aa28abe
commit 8ae8bb11b4
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 3 additions and 3 deletions

View File

@ -521,15 +521,15 @@
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'datatables.inc' %]
<script>
var active_tab = "#article-requests-requested";
var active_tab = "#article-requests-requested_panel";
var last_cancel_reason, requested_datatable, pending_datatable, processing_datatable, active_datatable;
$(document).ready(function() {
$("#article-request-tabs a[data-toggle='tab']").on("shown.bs.tab", function (e) {
active_tab = e.target.hash;
if( active_tab == "#article-requests-requested" ){
if( active_tab == "#article-requests-requested_panel" ){
active_datatable = requested_datatable;
} else if( active_tab == "#article-requests-pending" ){
} else if( active_tab == "#article-requests-pending_panel" ){
active_datatable = pending_datatable;
} else {
active_datatable = processing_datatable;