aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/css/mod_photos.css4
-rw-r--r--view/js/main.js25
-rw-r--r--view/php/theme_init.php3
-rwxr-xr-xview/tpl/photo_album.tpl10
-rwxr-xr-xview/tpl/photo_top.tpl9
-rwxr-xr-xview/tpl/photos_recent.tpl6
-rwxr-xr-xview/tpl/photosajax.tpl3
7 files changed, 40 insertions, 20 deletions
diff --git a/view/css/mod_photos.css b/view/css/mod_photos.css
index fa3b5b35a..b81145cd5 100644
--- a/view/css/mod_photos.css
+++ b/view/css/mod_photos.css
@@ -182,3 +182,7 @@
margin-left: 200px;
}
+div[id^='photo-album-contents-'] {
+ margin-bottom: 3px;
+}
+
diff --git a/view/js/main.js b/view/js/main.js
index 8c4fcdc13..e263fd116 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -704,6 +704,22 @@ function updateConvItems(mode,data) {
}
+ function justifyPhotos(bParam_page) {
+ $('#photo-album-contents-' + bParam_page).justifiedGallery({
+ lastRow : 'nojustify',
+ captions: true,
+ margins: 3,
+ rowHeight : 150,
+ sizeRangeSuffixes : {
+ 'lt100': '',
+ 'lt240': '',
+ 'lt320': '',
+ 'lt500': '',
+ 'lt640': '',
+ 'lt1024': ''
+ }
+ });
+ }
function notify_popup_loader(notifyType) {
@@ -1050,7 +1066,6 @@ function previewTheme(elm) {
}
$(document).ready(function() {
-
jQuery.timeago.settings.strings = {
prefixAgo : aStr['t01'],
prefixFromNow : aStr['t02'],
@@ -1089,7 +1104,7 @@ $(document).ready(function() {
-$(window).scroll(function () {
+$(window).scroll(function () {
if(typeof buildCmd == 'function') {
// This is a content page with items and/or conversations
$('#more').hide();
@@ -1099,8 +1114,8 @@ $(window).scroll(function () {
$('#more').css("top","400");
$('#more').show();
}
-
- if($(window).scrollTop() + $(window).height() > $(document).height() - 100) {
+
+ if($(window).scrollTop() + $(window).height() == $(document).height()) {
if((pageHasMoreContent) && (! loadingPage)) {
$('#more').hide();
$('#no-more').hide();
@@ -1120,7 +1135,7 @@ $(window).scroll(function () {
$('#more').show();
}
- if($(window).scrollTop() + $(window).height() > $(document).height() - 100) {
+ if($(window).scrollTop() + $(window).height() == $(document).height()) {
if((pageHasMoreContent) && (! loadingPage)) {
$('#more').hide();
$('#no-more').hide();
diff --git a/view/php/theme_init.php b/view/php/theme_init.php
index 45eb2fc1d..36504ec54 100644
--- a/view/php/theme_init.php
+++ b/view/php/theme_init.php
@@ -10,10 +10,13 @@ head_add_css('library/colorbox/colorbox.css');
head_add_css('view/css/conversation.css');
head_add_css('view/css/widgets.css');
+head_add_css('library/justifiedGallery/dist/css/justifiedGallery.css');
head_add_js('jquery.js');
head_add_js('jquery-migrate-1.1.1.js');
+head_add_js('library/justifiedGallery/dist/js/jquery.justifiedGallery.js');
+
//head_add_js('jquery-compat.js');
head_add_js('spin.js');
head_add_js('jquery.spin.js');
diff --git a/view/tpl/photo_album.tpl b/view/tpl/photo_album.tpl
index a63bff78c..b5ea14c14 100755
--- a/view/tpl/photo_album.tpl
+++ b/view/tpl/photo_album.tpl
@@ -1,7 +1,3 @@
-<div class="photo-album-image-wrapper{{$twist}}" id="photo-album-image-wrapper-{{$id}}">
- <a href="{{$photolink}}" class="photo-album-photo-link" id="photo-album-photo-link-{{$id}}" title="{{$phototitle}}" rel="{{$rel}}">
- <img src="{{$imgsrc}}" alt="{{$imgalt}}" title="{{$phototitle}}" class="photo-album-photo lframe resize" id="photo-album-photo-{{$id}}" />
- <p class='caption'>{{$desc}}</p>
- </a>
-</div>
-<div class="photo-album-image-wrapper-end"></div>
+<a href="{{$photolink}}" id="photo-album-photo-link-{{$id}}" title="{{$phototitle}}" rel="{{$rel}}">
+ <img src="{{$imgsrc}}" alt="{{if $desc}}{{$desc}}{{else}}{{$imgalt}}{{/if}}" title="{{$phototitle}}" id="photo-album-photo-{{$id}}" />
+</a>
diff --git a/view/tpl/photo_top.tpl b/view/tpl/photo_top.tpl
index 944928f85..4a106c30d 100755
--- a/view/tpl/photo_top.tpl
+++ b/view/tpl/photo_top.tpl
@@ -1,7 +1,4 @@
-<div class="photo-top-image-wrapper lframe {{$photo.twist}}" id="photo-top-image-wrapper-{{$photo.id}}">
- <a href="{{$photo.link}}" class="photo-top-photo-link" id="photo-top-photo-link-{{$photo.id}}" title="{{$photo.title}}">
- <img src="{{$photo.src}}" alt="{{$photo.alt}}" title="{{$photo.title}}" class="photo-top-photo" id="photo-top-photo-{{$photo.id}}" />
- </a>
- <div class="photo-top-album-name"><a href="{{$photo.album.link}}" class="photo-top-album-link" title="{{$photo.album.alt}}" >{{$photo.album.name}}</a></div>
-</div>
+<a href="{{$photo.link}}" id="photo-top-photo-link-{{$photo.id}}" title="{{$photo.title}}">
+ <img src="{{$photo.src}}" alt="{{$photo.album.name}}" title="{{$photo.title}}" id="photo-top-photo-{{$photo.id}}" />
+</a>
diff --git a/view/tpl/photos_recent.tpl b/view/tpl/photos_recent.tpl
index 386979de5..0f86a635d 100755
--- a/view/tpl/photos_recent.tpl
+++ b/view/tpl/photos_recent.tpl
@@ -3,12 +3,14 @@
<a id="photo-top-upload-link" href="{{$upload.1}}">{{$upload.0}}</a>
{{/if}}
-<div id="photo-album-contents" class="photos">
+<div id="photo-album-contents-{{$page}}">
{{foreach $photos as $photo}}
{{include file="photo_top.tpl"}}
{{/foreach}}
-<div id="page-end"></div>
+
</div>
+<script>justifyPhotos({{$page}});</script>
+<div id="page-end"></div>
<div class="photos-end"></div>
<script>$(document).ready(function() { loadingPage = false;});</script>
<div id="page-spinner"></div>
diff --git a/view/tpl/photosajax.tpl b/view/tpl/photosajax.tpl
index a88682e8b..a9a9605d0 100755
--- a/view/tpl/photosajax.tpl
+++ b/view/tpl/photosajax.tpl
@@ -1,4 +1,7 @@
<!-- -->
+<div id="photo-album-contents-{{$page}}">
{{foreach $photos as $photo}}
{{include file="photo_top.tpl"}}
{{/foreach}}
+</div>
+<script>justifyPhotos({{$page}});</script>