aboutsummaryrefslogtreecommitdiff
path: root/views/default/js/photos/tidypics.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-08-01 20:32:15 +0200
committerSem <sembrestels@riseup.net>2012-08-01 20:32:15 +0200
commit77a70ff27576649f455358b6ff18c2ad1c786f6c (patch)
treea5bcd472b6b7b7691964f48df1731b75d32029a8 /views/default/js/photos/tidypics.php
parent6ef62a444fbcebea25cf475613d5cab0c43b58c8 (diff)
downloadelgg-77a70ff27576649f455358b6ff18c2ad1c786f6c.tar.gz
elgg-77a70ff27576649f455358b6ff18c2ad1c786f6c.tar.bz2
Ajax views was messy and wasn't resizing well, moved to only images.
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>';
}
});
}