Bugzilla – Attachment 161913 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 on staff pages
Bug-35810-Add-back-to-top-button-on-staff-pages.patch (text/plain), 2.26 KB, created by
Pedro Amorim
on 2024-02-08 13:17:33 UTC
(
hide
)
Description:
Bug 35810: Add back to top button on staff pages
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-02-08 13:17:33 UTC
Size:
2.26 KB
patch
obsolete
>From 619d8422628c76bdea99ba6ffe672b647b38cf73 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 on staff pages > >Test plan: > >1) Apply this patch and rebuild css with 'yarn build' >2) For example, perform a search from catalogue >3) Scroll down to see the button appear and scroll up to see it > disappear > >Note that it's works also on patron search etc.. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> >--- > .../intranet-tmpl/prog/css/src/staff-global.scss | 8 ++++++++ > koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 15 ++++++++++++++- > 2 files changed, 22 insertions(+), 1 deletion(-) > >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 0723e230690..9e806a81bc2 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/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >index ab24a9304e2..b4752191649 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >@@ -243,7 +243,20 @@ $(document).ready(function() { > $("#bookbag_form a[href*='detail.pl?']").click(function(){ > resetSearchContext(); > }); >- >+ // add back to top button on each staff page >+ $("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"); >+ }); > }); > > function removeLastBorrower(){ >-- >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