summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/default/views/photo.html.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/themes/default/views/photo.html.php b/themes/default/views/photo.html.php
index cc4cc750..1c3b81a7 100644
--- a/themes/default/views/photo.html.php
+++ b/themes/default/views/photo.html.php
@@ -1,4 +1,18 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
+
+<? if (access::can("view_full", $theme->item())): ?>
+<!-- Use javascript to show the full size as an overlay on the current page -->
+<script src="<?= url::file("lib/gallery.show_full_size.js") ?>" type="text/javascript"></script>
+<script>
+ $(document).ready(function() {
+ $(".gFullSizeLink").click(function() {
+ show_full_size("<?= $theme->item()->file_url() ?>", "<?= $theme->item()->width ?>", "<?= $theme->item()->height ?>");
+ return false;
+ });
+ });
+</script>
+<? endif ?>
+
<div id="gItem">
<?= $theme->photo_top() ?>
@@ -27,7 +41,7 @@
<div id="gPhoto">
<?= $theme->resize_top($item) ?>
<? if (access::can("view_full", $item)): ?>
- <a href="#" class="gFullSizeLink" title="<?= t("View full size") ?>">
+ <a href="<?= $item->file_url() ?>" class="gFullSizeLink" title="<?= t("View full size") ?>">
<? endif ?>
<?= $item->resize_img(array("id" => "gPhotoId-{$item->id}", "class" => "gResize")) ?>
<? if (access::can("view_full", $item)): ?>