From 175bcd1e19e8094a0096dbe678e5f7748b664a89 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 11 Dec 2011 21:13:20 -0500 Subject: added lightbox to single images --- views/default/js/photos/tidypics.php | 3 +++ views/default/object/image/full.php | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'views') diff --git a/views/default/js/photos/tidypics.php b/views/default/js/photos/tidypics.php index 509d2116a..896192eea 100644 --- a/views/default/js/photos/tidypics.php +++ b/views/default/js/photos/tidypics.php @@ -8,6 +8,9 @@ elgg.provide('elgg.tidypics'); elgg.tidypics.init = function() { + + $(".tidypics-lightbox").fancybox({'type': 'image'}); + $("#tidypics-sort").sortable({ opacity: 0.7, revert: true, diff --git a/views/default/object/image/full.php b/views/default/object/image/full.php index 48ed40876..e3a2c7003 100644 --- a/views/default/object/image/full.php +++ b/views/default/object/image/full.php @@ -11,9 +11,12 @@ $image = $photo = $vars['entity']; $img = elgg_view_entity_icon($image, 'large', array( - 'href' => false, + 'href' => $image->getIconURL('master'), 'img_class' => 'tidypics-photo', + 'link_class' => 'tidypics-lightbox', )); +elgg_load_js('lightbox'); +elgg_load_css('lightbox'); $owner_link = elgg_view('output/url', array( 'href' => "photos/owner/" . $photo->getOwnerEntity()->username, -- cgit v1.2.3