summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-06-24 18:02:36 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-06-24 18:02:36 -0700
commit292d216f7c133152cb921db1cbc7a0c4843a977a (patch)
tree6939325eed13464b6c5a6bb8437c21c45355b27f /modules
parentf56d372629df5b08a30d0182d4e1e7c97a44d79f (diff)
Implement printing support on the photo page. I've used an icon that doesn't
quite match the theme temporarily. I'm hoping to have a matching icon soon.
Diffstat (limited to 'modules')
-rw-r--r--modules/digibug/helpers/digibug_menu.php18
-rw-r--r--modules/digibug/js/digibug.js4
2 files changed, 11 insertions, 11 deletions
diff --git a/modules/digibug/helpers/digibug_menu.php b/modules/digibug/helpers/digibug_menu.php
index 1ff0f6bf..6c466031 100644
--- a/modules/digibug/helpers/digibug_menu.php
+++ b/modules/digibug/helpers/digibug_menu.php
@@ -27,17 +27,13 @@ class digibug_menu {
}
static function photo($menu, $theme) {
- }
-
- static function site($menu, $theme) {
$item = $theme->item();
-
- if ($item && access::can("edit", $item)) {
- $options_menu = $menu->get("options_menu")
- ->append(Menu::factory("dialog")
- ->id("digibug")
- ->label(t("Peform Digibug Processing"))
- ->url(url::site("digibug/index/$item->id")));
- }
+ $csrf = access::csrf_token();
+ $menu
+ ->append(Menu::factory("link")
+ ->id("digibug")
+ ->label(t("Print with Digibug"))
+ ->url(url::site("digibug/print_photo/{$item->id}?csrf={$csrf}"))
+ ->css_id("gDigibugLink"));
}
}
diff --git a/modules/digibug/js/digibug.js b/modules/digibug/js/digibug.js
index e9e8933e..837c8f7f 100644
--- a/modules/digibug/js/digibug.js
+++ b/modules/digibug/js/digibug.js
@@ -3,6 +3,10 @@ $(document).ready(function() {
e.preventDefault();
queue_print(e);
});
+ $("#gDigibugLink").click(function(e) {
+ e.preventDefault();
+ return queue_print(e);
+ });
});
function popUp(url, options) {