From 200b78ee59ad54eb18d36334e2302b88511429ba Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 30 Jun 2009 20:32:59 -0700 Subject: Revert the change that removed adding the click handler for the digibug print functionality. Just return false when using javascript:digibug_popup was not enough from having the browser switch pages and show a page with the word false. Using an event handler allows us to call event.preventDefault which cancels the page switch. --- modules/digibug/js/digibug.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'modules/digibug/js/digibug.js') diff --git a/modules/digibug/js/digibug.js b/modules/digibug/js/digibug.js index 78ca8cf3..30bff47d 100644 --- a/modules/digibug/js/digibug.js +++ b/modules/digibug/js/digibug.js @@ -1,3 +1,15 @@ +$(document).ready(function() { + $(".gDigibugPrintButton a").click(function(e) { + e.preventDefault(); + return digibug_popup(e.currentTarget.href, { width: 800, height: 600 } ); + }); + + $("#gDigibugLink").click(function(e) { + e.preventDefault(); + return digibug_popup(e.currentTarget.href, { width: 800, height: 600 } ); + }); +}); + function digibug_popup(url, options) { options = $.extend({ /* default options */ -- cgit v1.2.3