Bugzilla – Attachment 179588 Details for
Bug 39400
"Jump to add item form" doesn't work while editing an existing item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39400: "Jump to add item form" doesn't work while editing an existing item
Bug-39400-Jump-to-add-item-form-doesnt-work-while-.patch (text/plain), 3.30 KB, created by
Phil Ringnalda
on 2025-03-21 13:34:35 UTC
(
hide
)
Description:
Bug 39400: "Jump to add item form" doesn't work while editing an existing item
Filename:
MIME Type:
Creator:
Phil Ringnalda
Created:
2025-03-21 13:34:35 UTC
Size:
3.30 KB
patch
obsolete
>From 41fbf9607956ce6a77032bc5ae327f36b4f2f86e Mon Sep 17 00:00:00 2001 >From: Phil Ringnalda <phil@chetcolibrary.org> >Date: Fri, 21 Mar 2025 06:09:10 -0700 >Subject: [PATCH] Bug 39400: "Jump to add item form" doesn't work while editing > an existing item > >The link at the top of the item editor page to "Jump to add item form" tries >to scrollIntoView the element with id="additema", but that element only exists >while you are adding a new item. While you are editing an existing item, it is >replaced by an element with id="edititem". Whichever element you have at the >moment is always just below the form with id="f", so we can just scroll that >into view instead. > >Test plan: > 1. Without the patch, go to the details page for any bib record with at > least one item, and click the Edit button on the row for an item in the > holdings table. > 2. You should be scrolled down to the form for editing that item > 3. Scroll up to the top of the page, click the Jump to add item form link > 4. You will not be scrolled back down to the form > 5. Apply patch, shift+reload page > 6. Now the link should scroll you back down to the form > 7. Return to the biblio details page, click Edit - Manage items and verify > that the Jump to add item form link still works when you are not editing > an existing item > 8. Click the Add multiple copies of this item button and add 30 items > 9. Make sure that the link still scrolls the form into view both while > you are editing an existing item, and while you are adding a new item > >Sponsored-by: Chetco Community Public Library >--- > koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >index 90fe28057e..e622ab2300 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >@@ -87,7 +87,7 @@ > </div> > [% END %] > <h1>Items for [% biblio.title | html %] [% IF ( biblio.author ) %]by [% biblio.author | html %][% END %] (Record #[% biblio.biblionumber | html %])</h1> >- <a id="newitem_jump" href="#additema"><i class="fa fa-arrow-down"></i> Jump to add item form</a> >+ <a id="newitem_jump" href="#f"><i class="fa fa-arrow-down"></i> Jump to add item form</a> > > [% IF ( barcode_not_unique ) %]<div class="alert alert-warning"><strong>Error saving item</strong>: Barcode must be unique.</div>[% END %] > [% IF ( no_next_barcode ) %]<div class="alert alert-warning"><strong>Error saving items</strong>: Unable to automatically determine values for barcodes. No item has been inserted.</div>[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js b/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >index cfe10df1d8..065d400e34 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >@@ -168,7 +168,7 @@ $(document).ready(function () { > > $("#newitem_jump").on("click", function (e) { > e.preventDefault(); >- document.getElementById("additema").scrollIntoView(); >+ document.getElementById("f").scrollIntoView(); > }); > }); > >-- >2.48.1
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 39400
:
179588
|
179624
|
180052
|
180053