@@ -, +, @@ disappear --- .../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(-) --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ a/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; +} --- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js +++ a/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(''); + $("#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(){ --