Bugzilla – Attachment 161111 Details for
Bug 35810
Add back to top button to the staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35810: Add back to top button to staff result page
Bug-35810-Add-back-to-top-button-to-staff-result-p.patch (text/plain), 2.03 KB, created by
Owen Leonard
on 2024-01-17 14:20:29 UTC
(
hide
)
Description:
Bug 35810: Add back to top button to staff result page
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2024-01-17 14:20:29 UTC
Size:
2.03 KB
patch
obsolete
>From 629e49fefdcd5c6b0087ba1fe53950a867cd08bc Mon Sep 17 00:00:00 2001 >From: Thibaud Guillot <thibaud.guillot@biblibre.com> >Date: Mon, 15 Jan 2024 11:19:51 +0100 >Subject: [PATCH] Bug 35810: Add back to top button to staff result page > >Test plan: > >1) Apply this patch and rebuild css with 'yarn build' >2) Perform a search from catalogue >3) Scroll down to see the button appear and scroll up to see it > disappear > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../intranet-tmpl/prog/css/src/staff-global.scss | 8 ++++++++ > koha-tmpl/intranet-tmpl/prog/js/pages/results.js | 14 ++++++++++++++ > 2 files changed, 22 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >index 0723e23069..9e806a81bc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -4775,3 +4775,11 @@ div .suggestion_note { > border-bottom-right-radius: 5px; > } > } >+ >+#backtotop { >+ font-size: 140%; >+ position: fixed; >+ bottom: 40px; >+ right: 40px; >+ z-index: 1000; >+} >\ No newline at end of file >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/results.js b/koha-tmpl/intranet-tmpl/prog/js/pages/results.js >index 4d4f2d74b9..65d0cc9458 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/results.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/results.js >@@ -297,6 +297,20 @@ $(document).ready(function() { > var op = $(this).data("op"); > resultsBatchProcess( op ); > }); >+ >+ $("body").append('<button id="backtotop" class="btn btn-default"><i class="fa fa-arrow-up" aria-hidden="true"></i></button>'); >+ $("#backtotop").hide(); >+ $(window).scroll(function(){ >+ if ( $(window).scrollTop() < 300 ) { >+ $("#backtotop").fadeOut(); >+ } else { >+ $("#backtotop").fadeIn(); >+ } >+ }); >+ $("#backtotop").click(function(e) { >+ e.preventDefault(); >+ $("html,body").animate({scrollTop: 0}, "slow"); >+ }); > }); > > >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35810
:
161032
|
161033
|
161034
|
161111
|
161882
|
161913
|
162296
|
162298