Bugzilla – Attachment 99662 Details for
Bug 24510
When placing a hold, cursor doesn't focus on patron name
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24510: When Placing a Hold, cursor doesn't focus on Patron Name
Bug-24510-When-Placing-a-Hold-cursor-doesnt-focus-.patch (text/plain), 3.15 KB, created by
Jonathan Druart
on 2020-02-26 16:40:58 UTC
(
hide
)
Description:
Bug 24510: When Placing a Hold, cursor doesn't focus on Patron Name
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-02-26 16:40:58 UTC
Size:
3.15 KB
patch
obsolete
>From c2345e04fa58aea273b9331f72a6b8d54e10f8ac Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 26 Feb 2020 15:53:48 +0000 >Subject: [PATCH] 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: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../prog/en/modules/reserve/request.tt | 31 +++++++++++++--------- > 1 file changed, 18 insertions(+), 13 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index b393d7aad5..6bb34c5476 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -978,9 +978,25 @@ > > $(document).ready(function() { > [% UNLESS clubs %] >- $('#circ_holds_select').tabs({active: 0}); >+ $('#circ_holds_select').tabs({ >+ active: 0, >+ activate: function(){ >+ $(this).find("input.focus").focus(); >+ }, >+ create: function(){ >+ $(this).find("input.focus").focus(); >+ } >+ }); > [% ELSE %] >- $('#circ_holds_select').tabs({active: 1}); >+ $('#circ_holds_select').tabs({ >+ active: 1, >+ activate: function(){ >+ $(this).find("input.focus").focus(); >+ }, >+ create: function(){ >+ $(this).find("input.focus").focus(); >+ } >+ }); > [% END %] > function ToggleHoldsToPlace() { > if ( $("#requestany").prop('checked') ) { >@@ -1261,17 +1277,6 @@ > [% END %] > [% END %] > >- if ( $(".focus").is(":visible") ) { >- $(".focus").focus(); >- } >- >- $('[href="#holds_patronsearch_pane"]').click( function() { >- $('#patron').focus(); >- }) >- >- $('[href="#holds_clubsearch_pane"]').click( function() { >- $('#club').focus(); >- }) > }); > </script> > [% END %] >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24510
:
97887
|
97922
|
99658
|
99659
|
99660
|
99661
|
99662
|
99663
|
99665
|
99666
|
100733
|
100827
|
100828
|
100829
|
100830