Bug 33278

Summary: Correct JS for activating default tab on various pages
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, lucas, matt.blenkinsop, sally.healey, testopia
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.05
Bug Depends on: 32683    
Bug Blocks: 33181    
Attachments: Bug 33278: Correct JS for activating default tab on various pages
Bug 33278: Correct JS for activating default tab on various pages
Bug 33278: Correct JS for activating default tab on various pages

Description Owen Leonard 2023-03-20 15:41:45 UTC
The JS which triggers the display of a default tab on the advanced search page uses a selector which isn't specific enough now that the header search tabs are Bootstrap too.
Comment 1 Owen Leonard 2023-03-20 16:32:21 UTC
There are other pages which need the same correction, so I'm re-titling the bug.
Comment 2 Owen Leonard 2023-03-20 16:39:50 UTC
Created attachment 148420 [details] [review]
Bug 33278: Correct JS for activating default tab on various pages

The conversion of the header search tabs to Bootstrap resulted in a bug
on several staff interface pages: The first tab isn't selected by
default. The jQuery selector isn't specific enough.

The patch also corrects a template error which was introduced to
merge-record.inc by Bug 32683.

To test, apply the patch and test the following pages to confirm that
the first tab on each page is selected by default:

- Catalog -> Advanced search
- Catalog -> MARC details
- Catalog -> Search results -> Merge
- Administration -> Authorized values -> Edit
- Administratoin -> Library transfer limits
- Administration -> Item types -> Edit
- Authorities -> Authority details
- Authorities -> Search -> Merge
Comment 3 ByWater Sandboxes 2023-03-21 13:40:54 UTC
Created attachment 148468 [details] [review]
Bug 33278: Correct JS for activating default tab on various pages

The conversion of the header search tabs to Bootstrap resulted in a bug
on several staff interface pages: The first tab isn't selected by
default. The jQuery selector isn't specific enough.

The patch also corrects a template error which was introduced to
merge-record.inc by Bug 32683.

To test, apply the patch and test the following pages to confirm that
the first tab on each page is selected by default:

- Catalog -> Advanced search
- Catalog -> MARC details
- Catalog -> Search results -> Merge
- Administration -> Authorized values -> Edit
- Administratoin -> Library transfer limits
- Administration -> Item types -> Edit
- Authorities -> Authority details
- Authorities -> Search -> Merge

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 4 Sally 2023-03-21 13:41:53 UTC
Works as described, thanks for the patch.
Comment 5 Jonathan Druart 2023-03-22 13:50:20 UTC
Created attachment 148549 [details] [review]
Bug 33278: Correct JS for activating default tab on various pages

The conversion of the header search tabs to Bootstrap resulted in a bug
on several staff interface pages: The first tab isn't selected by
default. The jQuery selector isn't specific enough.

The patch also corrects a template error which was introduced to
merge-record.inc by Bug 32683.

To test, apply the patch and test the following pages to confirm that
the first tab on each page is selected by default:

- Catalog -> Advanced search
- Catalog -> MARC details
- Catalog -> Search results -> Merge
- Administration -> Authorized values -> Edit
- Administratoin -> Library transfer limits
- Administration -> Item types -> Edit
- Authorities -> Authority details
- Authorities -> Search -> Merge

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Tomás Cohen Arazi 2023-03-27 10:06:32 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 7 Matt Blenkinsop 2023-04-11 09:01:53 UTC
Nice work everyone!

Pushed to stable for 22.11.x
Comment 8 Lucas Gass 2023-04-24 17:04:45 UTC
Missing dependencies for 22.05.x, no backport.