diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2009-06-16 17:57:24 -0700 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2009-06-16 17:57:24 -0700 |
| commit | f6e8f34bef322e087be46274d6cc42490fd22ce3 (patch) | |
| tree | ebfdf7d1c9354f96883e5cfe2412d518b4ade959 /themes/default/views | |
| parent | 51b9873041f1a2161272ad4a3250d52a334024ef (diff) | |
Add the real image url to the anchor elements for our full size links
so that right clicking works.
Turn the full size rendering code into a function and call it with
arguments, instead of creating a hacky named data structure to hold
the info.
Further partial fixes for ticket #427.
Diffstat (limited to 'themes/default/views')
| -rw-r--r-- | themes/default/views/photo.html.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/themes/default/views/photo.html.php b/themes/default/views/photo.html.php index 0fbaa3e0..ddea75bc 100644 --- a/themes/default/views/photo.html.php +++ b/themes/default/views/photo.html.php @@ -1,15 +1,15 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <? if (access::can("view_full", $theme->item())): ?> -<script type="text/javascript"> - var fullsize_detail = { - close: "<?= url::file("modules/gallery/images/ico-close.png") ?>", - url: "<?= $theme->item()->file_url() ?>", - width: "<?= $theme->item()->width ?>", - height: "<?= $theme->item()->height ?>" - }; -</script> <script src="<?= url::file("themes/default/js/fullsize.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"> @@ -40,7 +40,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)): ?> |
