Bugzilla – Attachment 7397 Details for
Bug 7466
Cart notification popup should appear onscreen even when button is offscreen
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] 7326: Proposed fix
0001-Bug-7466-Cart-notification-popup-should-appear-onscr.patch (text/plain), 2.03 KB, created by
Aleksa Vujicic
on 2012-01-31 03:37:53 UTC
(
hide
)
Description:
[SIGNED-OFF] 7326: Proposed fix
Filename:
MIME Type:
Creator:
Aleksa Vujicic
Created:
2012-01-31 03:37:53 UTC
Size:
2.03 KB
patch
obsolete
>From d1e6462b0a6c8de6787318e8e517ab639b577fff Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 24 Jan 2012 15:46:20 -0500 >Subject: [PATCH] Bug 7466 - Cart notification popup should appear onscreen > even when button isn't > >This patch compares the scroll position of the window with the page >position of the cart button and displays the cart notification >popup at the top of the visible page if the cart button has moved >offscreen. > >Includes fix for OPAC and staff client. > >Signed-off-by: Aleksa Vujicic <aleksa@catalyst.net.nz> >--- > koha-tmpl/intranet-tmpl/prog/en/js/basket.js | 4 ++++ > koha-tmpl/opac-tmpl/prog/en/js/basket.js | 4 ++++ > 2 files changed, 8 insertions(+), 0 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/basket.js b/koha-tmpl/intranet-tmpl/prog/en/js/basket.js >index 3a09f64..5b96c12 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/basket.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/basket.js >@@ -422,7 +422,11 @@ function vShelfAdd() { > > function showCart(){ > var position = $("#cartmenulink").offset(); >+ var scrolld = $(window).scrollTop(); > var top = position.top + $("#cartmenulink").outerHeight(); >+ if( scrolld > top ){ >+ top = scrolld + 15; >+ } > var left = position.left > $("#cartDetails").css("position","absolute").css("top",top); > $("#cartDetails").css("position","absolute").css("left",left); >diff --git a/koha-tmpl/opac-tmpl/prog/en/js/basket.js b/koha-tmpl/opac-tmpl/prog/en/js/basket.js >index c83e001..76d668b 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/js/basket.js >+++ b/koha-tmpl/opac-tmpl/prog/en/js/basket.js >@@ -428,7 +428,11 @@ function vShelfAdd() { > > function showCart(){ > var position = $("#cartmenulink").offset(); >+ var scrolld = $(window).scrollTop(); > var top = position.top + $("#cartmenulink").outerHeight(); >+ if( scrolld > top ){ >+ top = scrolld + 15; >+ } > var menuWidth = 200; > var buttonWidth = $("#cartmenulink").innerWidth(); > var buttonOffset = menuWidth - buttonWidth; >-- >1.7.5.4 >
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 7466
:
7326
| 7397