Bugzilla – Attachment 145200 Details for
Bug 32204
in-page anchor to edititem on additem.pl not working
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32204: Check for hash before setting focus
Bug-32204-Check-for-hash-before-setting-focus.patch (text/plain), 1.92 KB, created by
Lucas Gass (lukeg)
on 2023-01-10 18:12:27 UTC
(
hide
)
Description:
Bug 32204: Check for hash before setting focus
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2023-01-10 18:12:27 UTC
Size:
1.92 KB
patch
obsolete
>From bd819dd89988331f77f34c88e40de8ea5de9601a Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 10 Jan 2023 18:10:43 +0000 >Subject: [PATCH] Bug 32204: Check for hash before setting focus > >1. Search the catalog and view a record detail page of a record with items >2. Click 'Edit items' >3. Choose one item from the list and click 'Edit' >4. The URL fragment or in-page anchor (#edititem) is appended to the end of the URL but you are not placed on it. Instead you are placed at the top of the page and must scroll down to edit the particular item. >5. Apply patch >6. Try steps 1 - 3 again, now you should be placed in the correct location (#edititem) when editing an item. >--- > .../intranet-tmpl/prog/js/staff-global.js | 21 +++++++++++-------- > 1 file changed, 12 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >index dd380236fcf..c452e0226fa 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >@@ -49,15 +49,18 @@ $.fn.selectTabByID = function (tabID) { > }; > > $(document).ready(function() { >- $('#header_search').tabs({ >- create: function( e, ui ){ >- ui.panel.find("input:text:first").focus(); >- }, >- activate: function ( e, ui ) { >- ui.newPanel.find("input:text:first").focus(); >- } >- }); >- >+ //check for a hash before setting focus >+ let hash = window.location.hash; >+ if ( ! hash ) { >+ $('#header_search').tabs({ >+ create: function( e, ui ){ >+ ui.panel.find("input:text:first").focus(); >+ }, >+ activate: function ( e, ui ) { >+ ui.newPanel.find("input:text:first").focus(); >+ } >+ }); >+ } > $(".close").click(function(){ window.close(); }); > > $("#checkin_search form").preventDoubleFormSubmit(); >-- >2.30.2
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 32204
:
145200
|
145203
|
145572