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> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> (cherry picked from commit1eb0cbc5bf) Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com> (cherry picked from commit53be89a5f0) Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
parent
c0c7006213
commit
e5b6e51b74
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue