[Koha-bugs] [Bug 28901] showCart incorrectly calculates position if content above navbar
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Oct 8 07:43:57 CEST 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28901
David Cook <dcook at prosentient.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|Needs Signoff |Failed QA
--- Comment #5 from David Cook <dcook at prosentient.com.au> ---
Sorry, Owen, but I couldn't get your patch to work.
I ran both "yarn build" and "yarn build --view opac" but the "Your cart is
currently empty" message is still appearing way too low when an image is
prepended to the wrapper.
Am I doing something wrong?
The following is the patch I used to fix it locally:
diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/basket.js
b/koha-tmpl/opac-tmpl/bootstrap/js/basket.js
index 58e77c13c5..17ff077aeb 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/js/basket.js
+++ b/koha-tmpl/opac-tmpl/bootstrap/js/basket.js
@@ -469,10 +469,8 @@ function vShelfAdd() {
function showCart(){
var position = $("#cartmenulink").offset();
var scrolld = $(window).scrollTop();
- var top = position.top + $("#cartmenulink").outerHeight();
- if( scrolld > top ){
- top = scrolld + 15;
- }
+ //BZ 28901
+ var top = $("#cartmenulink").outerHeight() + 10;
var menuWidth = 200;
var buttonWidth = $("#cartmenulink").innerWidth();
var buttonOffset = menuWidth - buttonWidth;
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list