]> git.koha-community.org Git - koha.git/commit
Bug 30136: Add back to top button to OPAC
authorFridolin Somers <fridolin.somers@biblibre.com>
Fri, 18 Feb 2022 20:44:14 +0000 (10:44 -1000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 27 Apr 2022 21:20:45 +0000 (11:20 -1000)
commit09d3b36c0865a2612d750b4190513d6e8d42cf28
treebe56ac59df04a944f9669674bcc5dd1cd2b4cb4c
parentaf206b78bc4ebcb619ffa78822bf3819e3557dc6
Bug 30136: Add back to top button to OPAC

Like in many websites, when scrolling down the page make a button appear to go back to top.
This can be very useful specially in search results page.

This patch adds to OPAC using Javascript a button with id "backtotop".
Button appears when 300 pixels from top are hidden.
This value may be adapted.

Test plan
1) Go to OPAC
2) Perform a search with many results
3) Scroll down
=> Back to top button appears
4) Manually scroll back to top
=> Button disappears
5) Scroll down and click on Back to top button
=> You get to top

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc