From: Sem Date: Wed, 1 Aug 2012 19:13:28 +0000 (+0200) Subject: Fixed image full view lightbox. X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=3ef058394574c630726c955ba2a54a63df453d08;p=lorea%2Felgg.git Fixed image full view lightbox. --- 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 '

'+ $(this).find('img').attr('title') +'

- '+ elgg.echo('comments') +'';