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/helpers/digibug_menu.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'modules/digibug/helpers') diff --git a/modules/digibug/helpers/digibug_menu.php b/modules/digibug/helpers/digibug_menu.php index 4b8db5a2..f1d4fc1d 100644 --- a/modules/digibug/helpers/digibug_menu.php +++ b/modules/digibug/helpers/digibug_menu.php @@ -32,8 +32,7 @@ class digibug_menu { Menu::factory("link") ->id("digibug") ->label(t("Print with Digibug")) - ->url("javascript:digibug_popup('" . - url::site("digibug/print_photo/$item->id?csrf=$theme->csrf") . "')") + ->url(url::site("digibug/print_photo/$item->id?csrf=$theme->csrf")) ->css_id("gDigibugLink")); } @@ -43,8 +42,7 @@ class digibug_menu { Menu::factory("link") ->id("digibug") ->label(t("Print with Digibug")) - ->url("javascript:digibug_popup('" . - url::site("digibug/print_photo/$item->id?csrf=$theme->csrf") . "')") + ->url(url::site("digibug/print_photo/$item->id?csrf=$theme->csrf")) ->css_id("gDigibugLink")); } } -- cgit v1.2.3