summaryrefslogtreecommitdiff
path: root/modules/digibug/js/digibug.js
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-06-30 20:32:59 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-06-30 20:32:59 -0700
commit200b78ee59ad54eb18d36334e2302b88511429ba (patch)
tree1b631c35e0d96e817cc6cd4439a5b78713198249 /modules/digibug/js/digibug.js
parentb541935d6f2dd0a135b923683a41c4488b896f55 (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.js12
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 */