aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/default/js/lightbox.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/views/default/js/lightbox.php b/views/default/js/lightbox.php
index a7beaadcc..6e910f635 100644
--- a/views/default/js/lightbox.php
+++ b/views/default/js/lightbox.php
@@ -26,6 +26,15 @@ elgg.provide('elgg.ui.lightbox');
elgg.ui.lightbox.init = function() {
$(".elgg-lightbox").colorbox();
+ $(".elgg-lightbox-photo").colorbox({photo: true});
+ var n = 0;
+ $(".elgg-lightbox-gallery").each(function() {
+ $(this).find(".elgg-lightbox, .elgg-lightbox-photo")
+ .addClass("elgg-lightbox-" + n)
+ .colorbox({
+ rel: "elgg-lightbox-" + n++,
+ });
+ });
}
elgg.ui.lightbox.close = function() {