Created attachment 150056 [details] [review] Initial patch The handling of JS "previous" and "next" links in the shelf browser duplicate non-trivial code, which increases the chances for accidental bugs and makes the integration of other cover providers harder than it should (that is, duplication is propagated to each further provider). This patch removes that duplication by harmonizing the "itemnumber" data element attached to the buttons and by making the jquery selector apply to both buttons at once. Test Plan: 1) Apply patch. 2) Open the detail page of a document with enough adjacent documents to have a more-than-full shelf. 3) Open the shelf for the document. 4) Click previous and check that the handler still does its thing as expected. 5) Same thing for Next. I'm new to Koha (and perl) and its development workflow, I hope that this bug report doesn't break too many rules.