aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/js/main.js14
-rwxr-xr-xview/tpl/photos_recent.tpl8
-rwxr-xr-xview/tpl/photosajax.tpl5
3 files changed, 13 insertions, 14 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 2e297c9d6..086ef3196 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -704,22 +704,26 @@ function updateConvItems(mode,data) {
}
- function justifyPhotos(bParam_page) {
+ function justifyPhotos() {
justifiedGalleryActive = true;
- $('#photo-album-contents-' + bParam_page).justifiedGallery({
- lastRow : 'nojustify',
+ $('#photo-album-contents').justifiedGallery({
margins: 3,
- sizeRangeSuffixes : {
+ sizeRangeSuffixes: {
'lt100': '-2',
'lt240': '-2',
'lt320': '-2',
- 'lt500': '-1',
+ 'lt500': '',
'lt640': '-1',
'lt1024': '-0'
}
}).on('jg.complete', function(e){ justifiedGalleryActive = false; });
}
+ function justifyPhotosAjax() {
+ justifiedGalleryActive = true;
+ $('#photo-album-contents').justifiedGallery('norewind').on('jg.complete', function(e){ justifiedGalleryActive = false; });
+ }
+
function notify_popup_loader(notifyType) {
/* notifications template */
diff --git a/view/tpl/photos_recent.tpl b/view/tpl/photos_recent.tpl
index 0f86a635d..fce518cfe 100755
--- a/view/tpl/photos_recent.tpl
+++ b/view/tpl/photos_recent.tpl
@@ -3,14 +3,12 @@
<a id="photo-top-upload-link" href="{{$upload.1}}">{{$upload.0}}</a>
{{/if}}
-<div id="photo-album-contents-{{$page}}">
+<div id="photo-album-contents">
{{foreach $photos as $photo}}
{{include file="photo_top.tpl"}}
{{/foreach}}
-
-</div>
-<script>justifyPhotos({{$page}});</script>
<div id="page-end"></div>
+</div>
<div class="photos-end"></div>
-<script>$(document).ready(function() { loadingPage = false;});</script>
+<script>$(document).ready(function() { loadingPage = false; justifyPhotos(); });</script>
<div id="page-spinner"></div>
diff --git a/view/tpl/photosajax.tpl b/view/tpl/photosajax.tpl
index a9a9605d0..632aab2b3 100755
--- a/view/tpl/photosajax.tpl
+++ b/view/tpl/photosajax.tpl
@@ -1,7 +1,4 @@
-<!-- -->
-<div id="photo-album-contents-{{$page}}">
{{foreach $photos as $photo}}
{{include file="photo_top.tpl"}}
{{/foreach}}
-</div>
-<script>justifyPhotos({{$page}});</script>
+<script>justifyPhotosAjax()</script>