static/phpc.js
// set the location of the div relative to the current link and display it
set the location of the div relative to the current link and display it
set the location of the div relative to the current link and display it
function showSummaryDiv(elem) {
	var div = $("#phpc-summary-view");
	var newTop = $(elem).offset().top + $(elem).innerHeight();
	$(elem).append(div);
	if(newTop + div.outerHeight()
			> $(window).height() + $(window).scrollTop())
		newTop -= $(elem).outerHeight() + div.outerHeight();
	var newLeft = $(elem).offset().left - ((div.outerWidth()
			- $(elem).outerWidth()) / 2)
	if(newLeft < 1)
		newLeft = 1;
	else if(newLeft + div.outerWidth() > $(window).width()) 
		newLeft -= (newLeft + div.outerWidth()) - $(window).width();
	div.css("top", newTop + "px");
	div.css("left", newLeft + "px");
	div.show();
}
function showSummaryDiv ( elem ) { var div = $ ( "#phpc-summary-view" ) ; var newTop = $ ( elem ) . offset ( ) . top + $ ( elem ) . innerHeight ( ) ; $ ( elem ) . append ( div ) ; if ( newTop + div . outerHeight ( ) > $ ( window ) . height ( ) + $ ( window ) . scrollTop ( ) ) newTop -= $ ( elem ) . outerHeight ( ) + div . outerHeight ( ) ; var newLeft = $ ( elem ) . offset ( ) . left - ( ( div . outerWidth ( ) - $ ( elem ) . outerWidth ( ) ) / 2 ) if ( newLeft < 1 ) newLeft = 1 ; else if ( newLeft + div . outerWidth ( ) > $ ( window ) . width ( ) ) newLeft -= ( newLeft + div . outerWidth ( ) ) - $ ( window ) . width ( ) ; div . css ( "top" , newTop + "px" ) ; div . css ( "left" , newLeft + "px" ) ; div . show ( ) ; }
set the location of the div relative to the current link and display it
set the location of the div relative to the current link and display it