aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-08-01 21:13:28 +0200
committerSem <sembrestels@riseup.net>2012-08-01 21:13:28 +0200
commit3ef058394574c630726c955ba2a54a63df453d08 (patch)
tree9fa2eea3950ff6913497343fe03284b1c60d6847 /views
parent77a70ff27576649f455358b6ff18c2ad1c786f6c (diff)
downloadelgg-3ef058394574c630726c955ba2a54a63df453d08.tar.gz
elgg-3ef058394574c630726c955ba2a54a63df453d08.tar.bz2
Fixed image full view lightbox.
Diffstat (limited to 'views')
-rw-r--r--views/default/js/photos/tidypics.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/views/default/js/photos/tidypics.php b/views/default/js/photos/tidypics.php
index 869089850..1ff7b2c40 100644
--- a/views/default/js/photos/tidypics.php
+++ b/views/default/js/photos/tidypics.php
@@ -12,8 +12,12 @@ elgg.tidypics.init = function() {
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";
+ if ((new RegExp("photos/image/[0-9]+", 'i')).test($(this).attr('href'))) {
+ 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";
+ } else {
+ return $(this).attr('href');
+ }
},
title: function() {
return '<h3 style="display: inline">'+ $(this).find('img').attr('title') +'</h3> - <a href="'+ $(this).attr('href') +'">'+ elgg.echo('comments') +'</a>';