Bugzilla – Attachment 7326 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]
Proposed fix
0001-Bug-7466-Cart-notification-popup-should-appear-onscr.patch (text/plain), 2.01 KB, created by
Owen Leonard
on 2012-01-24 20:52:16 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2012-01-24 20:52:16 UTC
Size:
2.01 KB
patch
obsolete
>From 9c83c2b44865090ca67b19bff43f20f75fb600fa 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 >Content-Type: text/plain; charset="utf-8" > >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. >--- > 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.3 >
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