aboutsummaryrefslogtreecommitdiff
path: root/views/default/js/photos/tidypics.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/js/photos/tidypics.php')
-rw-r--r--views/default/js/photos/tidypics.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/views/default/js/photos/tidypics.php b/views/default/js/photos/tidypics.php
index 20dcc403e..869089850 100644
--- a/views/default/js/photos/tidypics.php
+++ b/views/default/js/photos/tidypics.php
@@ -9,12 +9,14 @@ elgg.provide('elgg.tidypics');
elgg.tidypics.init = function() {
- if ($.colorbox) {
- $(".elgg-gallery .tidypics-lightbox").colorbox({
- onComplete: function() {
- $('#cboxLoadedContent .elgg-page-topbar, #cboxLoadedContent .elgg-page-header, ' +
- '#cboxLoadedContent .elgg-page-footer, #cboxLoadedContent .elgg-sidebar').css('display', 'none');
- $('#cboxLoadedContent .elgg-layout').css('background-image', 'none');
+ if (elgg.ui.lightbox) {
+ $('.elgg-lightbox, .elgg-lightbox-photo').colorbox({
+ href: function() {
+ var guid = (new RegExp("photos/image/[0-9]+", 'i')).exec($(this).attr('href')).toString().substr("photos/image/".length);
+ return elgg.config.wwwroot + "photos/thumbnail/" + guid + "/large";
+ },
+ title: function() {
+ return '<h3 style="display: inline">'+ $(this).find('img').attr('title') +'</h3> - <a href="'+ $(this).attr('href') +'">'+ elgg.echo('comments') +'</a>';
}
});
}