Bug 9667 - Inventory scrolling to top with every click
Summary: Inventory scrolling to top with every click
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-19 18:42 UTC by Nicole C. Engard
Modified: 2015-06-04 23:33 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 9667 - Inventory scrolling to top with every click (3.69 KB, patch)
2014-07-14 13:20 UTC, Owen Leonard
Details | Diff | Splinter Review
Signed patch (3.73 KB, patch)
2014-07-24 23:48 UTC, Ian Beardslee
Details | Diff | Splinter Review
Bug 9667 - Inventory scrolling to top with every click (3.79 KB, patch)
2014-07-25 11:04 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2013-02-19 18:42:42 UTC
I was wondering if there is a way to keep the list from scrolling all the way back to the top if I click on the link to the item? If I have to set what is in the list to missing, it is a pain to have scroll down to where I was after clicking each item.
Comment 1 Bruce Metcalf 2013-10-18 04:27:06 UTC
Workaround that works in 3.6: go back one page in browser to return to original position on inventory list.
Comment 2 Katrin Fischer 2014-07-12 13:27:22 UTC
Still happens in current master.
Comment 3 Owen Leonard 2014-07-14 13:20:30 UTC Comment hidden (obsolete)
Comment 4 Aleisha Amohia 2014-07-14 23:47:10 UTC
Inventory is still scrolling to top after clicking on the link to an item and branch code is still being shown rather than branch name, so failing QA.

However the pop-up window does open showing details when clicked on on any page, and [] shows for items without call numbers, so these work as they should.
Comment 5 Owen Leonard 2014-07-15 15:03:53 UTC
Thanks for testing Aleshia, but I'm not sure why it's not working for you. Everything works for me. Perhaps someone else could take a look?
Comment 6 Ian Beardslee 2014-07-24 23:48:23 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2014-07-25 11:04:00 UTC
Created attachment 30082 [details] [review]
Bug 9667 - Inventory scrolling to top with every click

An "onclick" attribute on inventory results links causes the page to
scroll to the top each time. This patch updates the click handling to
use a progressive-enhancement method.

Unrelated changes: I added use of the Branches T:T plugin to output
library name instead of branchcode, and put a check around call number
to prevent output of empty [] in results.

To test, use the inventory tool to check a batch of items. On the
results page:

- Confirm that branch name is shown instead of code.
- Confirm that no [] shows for items without call numbers
- Confirm that clicking a title opens a pop-up window showing details
  for that title.
- Confirm that clicking a title opens a pop-up window whether you're on
  the first page of results or any subsequent page.

Signed-off-by: Ian Beardslee <ian@catalyst.net.nz>

Tested in Firefox and Chromium.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 8 Tomás Cohen Arazi 2014-07-26 13:21:47 UTC
Patch pushed to master.

Thanks Owen!