diff options
| author | mamouneyya <mamoun.diraneyya@gmail.com> | 2010-09-07 08:41:25 +0300 |
|---|---|---|
| committer | mamouneyya <mamoun.diraneyya@gmail.com> | 2010-09-07 08:41:25 +0300 |
| commit | ba950bec0c84a1467aa2545ca815d5af7b0b002b (patch) | |
| tree | 307cdacf0ece60ae9b2db94ad43fcf00d769dcfc /themes/wind | |
| parent | 9572c664d2bfff0877d4f2062eb0ef6665a109cf (diff) | |
| parent | 7c80bc0c3db1ca20ce424a36a05f1337de9e1e31 (diff) | |
Merge remote branch 'gallery3/master'
Diffstat (limited to 'themes/wind')
| -rw-r--r-- | themes/wind/views/page.html.php | 4 | ||||
| -rw-r--r-- | themes/wind/views/photo.html.php | 15 |
2 files changed, 16 insertions, 3 deletions
diff --git a/themes/wind/views/page.html.php b/themes/wind/views/page.html.php index 4938ed60..e620d652 100644 --- a/themes/wind/views/page.html.php +++ b/themes/wind/views/page.html.php @@ -105,9 +105,9 @@ // containing that photo. For now, we just do it for // the immediate parent so that when you go back up a // level you're on the right page. ?> - <a href="<?= $parent->url($parent == $theme->item()->parent() ? + <a href="<?= $parent->url($parent->id == $theme->item()->parent_id ? "show={$theme->item()->id}" : null) ?>"> - <!-- limit the title length to something reasonable (defaults to 15) --> + <? // limit the title length to something reasonable (defaults to 15) ?> <?= html::purify(text::limit_chars($parent->title, module::get_var("gallery", "visible_title_length"))) ?> </a> diff --git a/themes/wind/views/photo.html.php b/themes/wind/views/photo.html.php index f8b5511c..cb830e23 100644 --- a/themes/wind/views/photo.html.php +++ b/themes/wind/views/photo.html.php @@ -4,10 +4,23 @@ <!-- Use javascript to show the full size as an overlay on the current page --> <script type="text/javascript"> $(document).ready(function() { + full_dims = [<?= $theme->item()->width ?>, <?= $theme->item()->height ?>]; $(".g-fullsize-link").click(function() { - $.gallery_show_full_size(<?= html::js_string($theme->item()->file_url()) ?>, "<?= $theme->item()->width ?>", "<?= $theme->item()->height ?>"); + $.gallery_show_full_size(<?= html::js_string($theme->item()->file_url()) ?>, full_dims[0], full_dims[1]); return false; }); + + // After the image is rotated or replaced we have to reload the image dimensions + // so that the full size view isn't distorted. + gallery_image_replaced_hook = function(data, thumb) { + $.ajax({ + url: "<?= url::site("items/dimensions/" . $theme->item()->id) ?>", + dataType: "json", + success: function(data, textStatus) { + full_dims = data.full; + } + }); + } }); </script> <? endif ?> |
