[Koha-bugs] [Bug 33585] New: Remove javascript code duplicate in shelf browser

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Apr 21 17:41:51 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33585

            Bug ID: 33585
           Summary: Remove javascript code duplicate in shelf browser
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: OPAC
          Assignee: oleonard at myacpl.org
          Reporter: virgil.dupras at collecto.ca
        QA Contact: testopia at bugs.koha-community.org

Created attachment 150056
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150056&action=edit
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.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list