Bug 35638: Upgrade Enquire JS library from v2.0.1 to v2.1.6
authorOwen Leonard <oleonard@myacpl.org>
Fri, 22 Dec 2023 12:28:38 +0000 (12:28 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 22 Mar 2024 09:35:28 +0000 (10:35 +0100)
commit04624f4433ef04107de4025cae4982e1dce34291
treedc8be095b9066eb29ac6f78c5c64e698e7f0e836
parent59b940300ccaa7bfb9f6b3135df7ddbd8ca85e43
Bug 35638: Upgrade Enquire JS library from v2.0.1 to v2.1.6

This patch upgrades enquire.js in the OPAC to the latest version,
v.2.1.6. The patch also moves the file (enquire.min.js) into its own
directory for consistency's sake.

Enquire.js lets us use CSS-like "breakpoints" to trigger JS actions. We
use it to in "mobile" views (narrower browser widths): Collapsing the
facets menu and triggering automatic scroll to "main content."

The patch also removes media.match.js which should have been removed in
Bug 29960. At that time Enquire.js required that we used Modernizr to
load media.match.js as a polyfill for older browsers.

To test, apply the patch and clear your browser cache if necessary.

- In the OPAC, perform a catalog search which will return results.
- At wider browser widths the facets menu will appear in the left-hand
  sidebar.
- When you narrow your browser until the viewport is less than 992
  pixels wide* the facets menu should collapse into a "Refine your
  search" button above the search results.
- If you narrow your browser width to below 600 pixels wide and reload
  the search results page, the browser should automatically scroll down
  so that the "Your search..." heading is at the top of the viewport.

* Use Firefox's Responsive Design Mode to get pixel-level control over
  viewport width: https://firefox-source-docs.mozilla.org/devtools-user/responsive_design_mode/
  In Chrome it's called "Device Mode."

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc
koha-tmpl/opac-tmpl/lib/enquire.js [deleted file]
koha-tmpl/opac-tmpl/lib/enquire.min.js [deleted file]
koha-tmpl/opac-tmpl/lib/enquire/enquire.min.js [new file with mode: 0644]
koha-tmpl/opac-tmpl/lib/media.match.js [deleted file]
koha-tmpl/opac-tmpl/lib/media.match.min.js [deleted file]