Bug 24510: When Placing a Hold, cursor doesn't focus on Patron Name
authorOwen Leonard <oleonard@myacpl.org>
Wed, 26 Feb 2020 15:53:48 +0000 (15:53 +0000)
committerJoy Nelson <joy@bywatersolutions.com>
Fri, 3 Apr 2020 20:31:45 +0000 (20:31 +0000)
commit673129ebf89616185d133d9354487e8d8e32d2ef
tree674957a14d9428cf405acb2872b3395ea8615dd6
parent161feda3dda4a8d11872757a84f829934cce0a8e
Bug 24510: When Placing a Hold, cursor doesn't focus on Patron Name

This alternate patch tries to implement a fix in a more "correct" way by
tying the cursor focus to the initialization of the jQueryUI tabs. By
configuring both the "create" and "activate" events we can make sure the
correct input field is focused.

I think the only advantage of this patch over the other one is that
tying the focus to the tabs activation makes it a little more obvious
where in the DOM loading sequence the focus is being set.

To test, follow the original patch's test plan:

TEST PLAN:
1. Go to Biblio Record
2. Place Hold (request.pl) - either the Hold above the Bib or the Hold
   on the left, it does the same thing.
3. Note that the cursor does not go to Patron Name (for whom to place
   the hold for), it goes to the Top Search bar under Checkout.
4. Apply patch and reload the page.
5. The focus should now be correctly set.
6. Toggle between 'Patrons' and 'Club' tabs.
7. Focus should stay set.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt