diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-06-30 20:32:59 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-06-30 20:32:59 -0700 |
commit | 200b78ee59ad54eb18d36334e2302b88511429ba (patch) | |
tree | 1b631c35e0d96e817cc6cd4439a5b78713198249 /modules/digibug/js/digibug.js | |
parent | b541935d6f2dd0a135b923683a41c4488b896f55 (diff) |
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.
Diffstat (limited to 'modules/digibug/js/digibug.js')
-rw-r--r-- | modules/digibug/js/digibug.js | 12 |
1 files changed, 12 insertions, 0 deletions
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 */ |